Strange error on PROD but not local dev

68 views
Skip to first unread message

Steven Roberts

unread,
Apr 24, 2017, 5:36:28 PM4/24/17
to RavenDB - 2nd generation document database
I get the following error on my prod machine but not local.  I've pulled the prod db and run it locally and all is good.  The difference appears to be engine version.  Locally I'm running 30171, the server has 30155.  Before I upgrade the server can anyone confirm this is a bug with the version?

{
 
"Url": "/databases/goPMO.Impel.goPMO/queries/?&transformer=ProjectTraceabilityTransformer&id=ProjectTraceabilities/projects/1",
 
"Error": "Microsoft.CSharp.RuntimeBinder.RuntimeBinderInternalCompilerException: An unexpected exception occurred while binding a dynamic operation\r\n   at Microsoft.CSharp.RuntimeBinder.Semantics.ExpressionBinder.WhichSimpleConversionIsBetter(PredefinedType pt1, PredefinedType pt2)\r\n   at Microsoft.CSharp.RuntimeBinder.Semantics.ExpressionBinder.WhichBofsIsBetter(BinOpFullSig bofs1, BinOpFullSig bofs2, CType type1, CType type2)\r\n   at Microsoft.CSharp.RuntimeBinder.Semantics.ExpressionBinder.FindBestSignatureInList(List`1 binopSignatures, BinOpArgInfo info)\r\n   at Microsoft.CSharp.RuntimeBinder.Semantics.ExpressionBinder.BindStandardBinop(ExpressionKind ek, EXPR arg1, EXPR arg2)\r\n   at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.DispatchPayload(DynamicMetaObjectBinder payload, ArgumentObject[] arguments, Dictionary`2 dictionary)\r\n   at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.BindCore(DynamicMetaObjectBinder payload, IEnumerable`1 parameters, DynamicMetaObject[] args, DynamicMetaObject& deferredBinding)\r\n   at Microsoft.CSharp.RuntimeBinder.RuntimeBinder.Bind(DynamicMetaObjectBinder payload, IEnumerable`1 parameters, DynamicMetaObject[] args, DynamicMetaObject& deferredBinding)\r\n   at Microsoft.CSharp.RuntimeBinder.BinderHelper.Bind(DynamicMetaObjectBinder action, RuntimeBinder binder, IEnumerable`1 args, IEnumerable`1 arginfos, DynamicMetaObject onBindingError)\r\n   at Microsoft.CSharp.RuntimeBinder.CSharpBinaryOperationBinder.FallbackBinaryOperation(DynamicMetaObject target, DynamicMetaObject arg, DynamicMetaObject errorSuggestion)\r\n   at System.Dynamic.DynamicObject.MetaDynamic.CallMethodWithResult(String methodName, DynamicMetaObjectBinder binder, Expression[] args, Fallback fallback, Fallback fallbackInvoke)\r\n   at System.Dynamic.DynamicObject.MetaDynamic.BindBinaryOperation(BinaryOperationBinder binder, DynamicMetaObject arg)\r\n   at System.Dynamic.DynamicMetaObjectBinder.Bind(Object[] args, ReadOnlyCollection`1 parameters, LabelTarget returnLabel)\r\n   at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args)\r\n   at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)\r\n   at Transformer_ProjectTraceabilityTransformer.<>c__DisplayClassd0.<.ctor>b__bf(Object this3)\r\n   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()\r\n   at Raven.Abstractions.Linq.DynamicList.<Enumerate>d__0.MoveNext() in c:\\Builds\\RavenDB-Stable-3.0\\Raven.Abstractions\\Linq\\DynamicList.cs:line 74\r\n   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)\r\n   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\r\n   at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)\r\n   at Transformer_ProjectTraceabilityTransformer.<.ctor>b__b9(<>f__AnonymousType3`2 this2)\r\n   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()\r\n   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\r\n   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)\r\n   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\r\n   at Raven.Database.Actions.DocumentActions.<>c__DisplayClass44.<GetWithTransformer>b__42(IStorageActionsAccessor actions) in c:\\Builds\\RavenDB-Stable-3.0\\Raven.Database\\Actions\\DocumentActions.cs:line 645\r\n   at Raven.Storage.Esent.TransactionalStorage.Batch(Action`1 action) in c:\\Builds\\RavenDB-Stable-3.0\\Raven.Database\\Storage\\Esent\\TransactionalStorage.cs:line 771\r\n   at Raven.Database.Actions.DocumentActions.GetWithTransformer(String key, String transformer, TransactionInformation transactionInformation, Dictionary`2 transformerParameters, HashSet`1& itemsToInclude) in c:\\Builds\\RavenDB-Stable-3.0\\Raven.Database\\Actions\\DocumentActions.cs:line 661\r\n   at Raven.Database.Server.Controllers.QueriesController.<>c__DisplayClass6.<GetQueriesResponse>b__1(IStorageActionsAccessor actions) in c:\\Builds\\RavenDB-Stable-3.0\\Raven.Database\\Server\\Controllers\\QueriesController.cs:line 96\r\n   at Raven.Storage.Esent.TransactionalStorage.ExecuteBatch(Action`1 action, EsentTransactionContext transactionContext) in c:\\Builds\\RavenDB-Stable-3.0\\Raven.Database\\Storage\\Esent\\TransactionalStorage.cs:line 850\r\n   at Raven.Storage.Esent.TransactionalStorage.Batch(Action`1 action) in c:\\Builds\\RavenDB-Stable-3.0\\Raven.Database\\Storage\\Esent\\TransactionalStorage.cs:line 811\r\n   at Raven.Database.Server.Controllers.QueriesController.<GetQueriesResponse>d__9.MoveNext() in c:\\Builds\\RavenDB-Stable-3.0\\Raven.Database\\Server\\Controllers\\QueriesController.cs:line 131\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()"
}


Oren Eini (Ayende Rahien)

unread,
Apr 25, 2017, 1:06:53 AM4/25/17
to ravendb
This isn't something that we have seen in the past, this is typically something that is handled internally, and I don't recall anything related to this.

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steven Roberts

unread,
Apr 25, 2017, 5:59:47 AM4/25/17
to rav...@googlegroups.com
Any idea on how to troubleshoot? 

You received this message because you are subscribed to a topic in the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ravendb/jyhId6hNrUY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ravendb+unsubscribe@googlegroups.com.

Oren Eini (Ayende Rahien)

unread,
Apr 25, 2017, 6:34:15 AM4/25/17
to ravendb
Can you reproduce reliably? If you can upgrade to the latest, please do so

Steven Roberts

unread,
Apr 25, 2017, 7:22:36 AM4/25/17
to rav...@googlegroups.com
I can reproduce every time on PROD but never locally.  I will try and upgrade the server 

Steven Roberts

unread,
Apr 25, 2017, 7:38:24 AM4/25/17
to RavenDB - 2nd generation document database
I'm updated the server and I still get this error.  Any other ideas?

Oren Eini (Ayende Rahien)

unread,
Apr 25, 2017, 7:39:33 AM4/25/17
to ravendb
Please share full details on how to reproduce it. Index, query, transformer, query params, etc.

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


On Tue, Apr 25, 2017 at 2:38 PM, Steven Roberts <reachs...@gmail.com> wrote:
I'm updated the server and I still get this error.  Any other ideas?

--

Steven Roberts

unread,
Apr 25, 2017, 7:44:19 AM4/25/17
to RavenDB - 2nd generation document database
I can reproduce by just using this in the browser.

http://localhost:8080/databases/goPMO.Impel.goPMO/queries/?&transformer=ProjectTraceabilityTransformer&id=ProjectTraceabilities/projects/1

The transformer looks like this.

from traceability in results
select new { 
traceability = traceability,
roots = traceability.Connections.Select(x => new {
data = this.LoadDocument(x.Id),
Links = x.Links
})
} into this0
select new {
this0 = this0,
deliverables = this.LoadDocument(this0.roots.Select(x0 => x0.data.DeliverableId))
} into this1
select new {
this1 = this1,
project = this.LoadDocument(this1.this0.traceability.ProjectId)
} into this2
select new {
Id = this2.this1.this0.traceability.ProjectId,
Traceables = Enumerable.ToArray(this2.this1.this0.roots.Select(root => new {
root = root,
r = root.data
}).Select(this01 => new {
this0 = this01,
type = this01.r["@metadata"].Value<string>("Raven-Entity-Name")
}).Select(this12 => new {
this1 = this12,
deliverable = DynamicEnumerable.FirstOrDefault(this2.this1.deliverables, x3 => x3.Id == this12.this0.r.DeliverableId)
}).Select(this24 => new {
this2 = this24,
collection = this24.this1.type == "Requirements" ? this24.deliverable.Requirements : (this24.this1.type == "Solutions" ? this24.deliverable.Solutions : this24.deliverable.TestScenarios)
}).Select(this3 => new {
Sequence = (((object)(this2.project.Deliverables.IndexOf(this3.this2.deliverable.Id) + 1)) + ".") + ((object)(this3.collection.IndexOf(this3.this2.this1.this0.r.Id) + 1)),
DeliverableId = this3.this2.this1.this0.r.DeliverableId,
Group = this3.this2.this1.this0.r.Group,
Status = this3.this2.this1.this0.r.Status.State.ToString(),
Type = this3.this2.this1.type,
Connections = Enumerable.ToDictionary(this2.this1.this0.roots.Where(lookedup => this3.this2.this1.this0.root.Links.Contains(lookedup.data.Id)).Select(lookedup5 => new {
lookedup = lookedup5,
lookupType = lookedup5.data["@metadata"].Value<string>("Raven-Entity-Name")
}).Select(this06 => new {
this0 = this06,
deliverableInner = DynamicEnumerable.FirstOrDefault(this2.this1.deliverables, x7 => x7.Id == this06.lookedup.data.DeliverableId)
}).Select(this18 => new {
this1 = this18,
collectionInner = this18.this0.lookupType == "Requirements" ? this18.deliverableInner.Requirements : (this18.this0.lookupType == "Solutions" ? this18.deliverableInner.Solutions : this18.deliverableInner.TestScenarios)
}).Select(this29 => new {
type = this29.this1.this0.lookupType,
data = new {
Sequence = (((object)(this2.project.Deliverables.IndexOf(this29.this1.deliverableInner.Id) + 1)) + ".") + ((object)(this29.collectionInner.IndexOf(this29.this1.this0.lookedup.data.Id) + 1)),
DeliverableId = this29.this1.this0.lookedup.data.DeliverableId,
Group = this29.this1.this0.lookedup.data.Group,
Status = this29.this1.this0.lookedup.data.Status.State.ToString(),
Type = this29.this1.this0.lookupType
}
}).GroupBy(x10 => x10.type, x11 => x11.data), x12 => x12.Key, x13 => Enumerable.ToArray(x13))
}))
}



On Tuesday, April 25, 2017 at 7:39:33 AM UTC-4, Oren Eini wrote:
Please share full details on how to reproduce it. Index, query, transformer, query params, etc.

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


On Tue, Apr 25, 2017 at 2:38 PM, Steven Roberts <reachs...@gmail.com> wrote:
I'm updated the server and I still get this error.  Any other ideas?

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.

Oren Eini (Ayende Rahien)

unread,
Apr 25, 2017, 7:46:23 AM4/25/17
to ravendb
Can you send us the ProjectTraceabilities/projects/1 document and all the documents that it loads?
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Steven Roberts

unread,
Apr 25, 2017, 7:52:35 AM4/25/17
to RavenDB - 2nd generation document database
Is there a way to send privately?

Oren Eini (Ayende Rahien)

unread,
Apr 25, 2017, 8:00:30 AM4/25/17
to ravendb
Send it to our support with the order id
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Steven Roberts

unread,
Apr 25, 2017, 8:07:11 AM4/25/17
to RavenDB - 2nd generation document database
done, thank you.

dani...@ayende.com

unread,
Apr 26, 2017, 11:02:01 AM4/26/17
to RavenDB - 2nd generation document database

Hello Steven,

The issue encountered here was:
A null dynamic object value was used in the addition operation run within the transformer method.

A fix for this will be provided in the next release.

In the meanwhile, you can use the following workaround:
Modify ProjectTraceabilityTransformer so that some value is returned when object is null.

Instead of:
Sequence = (((object)(this2.project.Deliverables.IndexOf(this3.this2.deliverable.Id) + 1)) + ".") + ((object)(this3.collection.IndexOf(this3.this2.this1.this0.r.Id) + 1)),
Use:
Sequence = (((object)(this2.project.Deliverables.IndexOf(this3.this2.deliverable.Id) + 1)) + ".") + ((object)((this3.collection.IndexOf(this3.this2.this1.this0.r.Id) ?? 0) + 1)),

Regards
Danielle

Reply all
Reply to author
Forward
0 new messages