aven.Client.Exceptions.RavenException
System.NullReferenceException: Object reference not set to an instance of an object.
at Jint.Engine.TryHandleStringValue(JsValue property, JsString s, ObjectInstance& o, JsValue& jsValue)
at Jint.Engine.GetValue(Reference reference, Boolean returnReferenceToPool)
at Jint.Runtime.Interpreter.Expressions.JintExpression.GetValue(EvaluationContext context)
at Jint.Runtime.Interpreter.Expressions.JintBinaryExpression.EqualBinaryExpression.EvaluateInternal(EvaluationContext context)
at Jint.Runtime.Interpreter.Expressions.JintExpression.GetValue(EvaluationContext context)
at Jint.Runtime.Interpreter.Statements.JintReturnStatement.ExecuteInternal(EvaluationContext context)
at Jint.Native.Function.ScriptFunction.Call(JsValue thisObject, JsValue[] arguments)
at Jint.Runtime.Interpreter.Expressions.JintCallExpression.EvaluateInternal(EvaluationContext context)
at Jint.Runtime.Interpreter.Expressions.JintExpression.GetValue(EvaluationContext context)
at Jint.Runtime.Interpreter.Statements.JintReturnStatement.ExecuteInternal(EvaluationContext context)
at Jint.Native.Function.ScriptFunction.Call(JsValue thisObject, JsValue[] arguments)
at Jint.Native.Function.Function.Jint.Native.ICallable.Call(JsValue thisObject, JsValue[] arguments)
at Jint.Native.Function.FunctionPrototype.CallImpl(JsValue thisObject, JsValue[] arguments)
at Jint.Runtime.Interop.ClrFunction.Call(JsValue thisObject, JsValue[] arguments)
at Jint.Runtime.Interpreter.Expressions.JintCallExpression.EvaluateInternal(EvaluationContext context)
at Jint.Runtime.Interpreter.Expressions.JintExpression.GetValue(EvaluationContext context)
at Jint.Runtime.Interpreter.Statements.JintReturnStatement.ExecuteInternal(EvaluationContext context)
at Jint.Native.Function.ScriptFunction.Call(JsValue thisObject, JsValue[] arguments)
at Jint.Engine.Call(Function function, JsValue thisObject, JsValue[] arguments, JintExpression expression)
at Jint.Engine.<>c__DisplayClass134_0.<Call>g__Callback|0()
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback)
at Jint.Engine.Call(JsValue callable, JsValue thisObject, JsValue[] arguments)
at Raven.Server.Documents.Patch.ScriptRunner.SingleRun.Run(JsonOperationContext jsonCtx, DocumentsOperationContext docCtx, String method, String documentId, Object[] args, QueryTimingsScope scope, CancellationToken token) in D:\workspaces\ravendb_3\src\Raven.Server\Documents\Patch\ScriptRunner.cs:line 2114
at Raven.Server.Documents.Patch.ScriptRunner.SingleRun.Run(JsonOperationContext jsonCtx, DocumentsOperationContext docCtx, String method, Object[] args, QueryTimingsScope scope, CancellationToken token) in D:\workspaces\ravendb_3\src\Raven.Server\Documents\Patch\ScriptRunner.cs:line 2093
at Raven.Server.Documents.Indexes.Persistence.QueryFilter.GetScriptRunnerResult(Object translatedDoc) in D:\workspaces\ravendb_3\src\Raven.Server\Documents\Indexes\Persistence\QueryFilter.cs:line 37
at Raven.Server.Documents.Indexes.Persistence.AbstractQueryFilter.Apply(Object doc) in D:\workspaces\ravendb_3\src\Raven.Server\Documents\Indexes\Persistence\AbstractQueryFilter.cs:line 52
at Raven.Server.Documents.Indexes.Persistence.QueryFilter.Apply(RetrieverInput& input, String key) in D:\workspaces\ravendb_3\src\Raven.Server\Documents\Indexes\Persistence\QueryFilter.cs:line 32
at Raven.Server.Documents.Indexes.Persistence.Corax.CoraxIndexReadOperation.HasQueryFilter.Apply(RetrieverInput& input, String key) in D:\workspaces\ravendb_3\src\Raven.Server\Documents\Indexes\Persistence\Corax\CoraxIndexReadOperation.cs:line 518
at Raven.Server.Documents.Indexes.Persistence.Corax.CoraxIndexReadOperation.QueryInternal[THighlighting,TQueryFilter,THasProjection,TDistinct](IndexQueryServerSide query, QueryTimingsScope queryTimings, FieldsToFetch fieldsToFetch, Reference`1 totalResults, Reference`1 skippedResults, Reference`1 scannedDocuments, IQueryResultRetriever`1 retriever, DocumentsOperationContext documentsContext, Func`2 getSpatialField, CancellationToken token)+MoveNext() in D:\workspaces\ravendb_3\src\Raven.Server\Documents\Indexes\Persistence\Corax\CoraxIndexReadOperation.cs:line 716
at Raven.Server.Documents.Indexes.Index.QueryInternal[TQueryResult](TQueryResult resultToFill, IndexQueryServerSide query, QueryOperationContext queryContext, Boolean pulseDocsReadingTransaction, OperationCancelToken token) in D:\workspaces\ravendb_3\src\Raven.Server\Documents\Indexes\Index.cs:line 3474
at Raven.Server.Documents.Indexes.Index.QueryInternal[TQueryResult](TQueryResult resultToFill, IndexQueryServerSide query, QueryOperationContext queryContext, Boolean pulseDocsReadingTransaction, OperationCancelToken token) in D:\workspaces\ravendb_3\src\Raven.Server\Documents\Indexes\Index.cs:line 3513
at Raven.Server.Documents.Indexes.Index.Query(IndexQueryServerSide query, QueryOperationContext queryContext, OperationCancelToken token) in D:\workspaces\ravendb_3\src\Raven.Server\Documents\Indexes\Index.cs:line 3295
at Raven.Server.Documents.Queries.Dynamic.DynamicQueryRunner.ExecuteQuery(IndexQueryServerSide query, QueryOperationContext queryContext, Nullable`1 existingResultEtag, OperationCancelToken token) in D:\workspaces\ravendb_3\src\Raven.Server\Documents\Queries\Dynamic\DynamicQueryRunner.cs:line 64
at Raven.Server.Documents.Queries.QueryRunner.ExecuteQuery(IndexQueryServerSide query, QueryOperationContext queryContext, Nullable`1 existingResultEtag, OperationCancelToken token) in D:\workspaces\ravendb_3\src\Raven.Server\Documents\Queries\QueryRunner.cs:line 68
at Raven.Server.Documents.Handlers.Processors.Queries.DatabaseQueriesHandlerProcessorForGet.GetQueryResultsAsync(IndexQueryServerSide query, QueryOperationContext queryContext, Nullable`1 existingResultEtag, Boolean metadataOnly, OperationCancelToken token) in D:\workspaces\ravendb_3\src\Raven.Server\Documents\Handlers\Processors\Queries\DatabaseQueriesHandlerProcessorForGet.cs:line 52
at Raven.Server.Documents.Handlers.Processors.Queries.AbstractQueriesHandlerProcessorForGet`4.ExecuteAsync() in D:\workspaces\ravendb_3\src\Raven.Server\Documents\Handlers\Processors\Queries\AbstractQueriesHandlerProcessorForGet.cs:line 147
at Raven.Server.Documents.Handlers.QueriesHandler.Post() in D:\workspaces\ravendb_3\src\Raven.Server\Documents\Handlers\QueriesHandler.cs:line 14
at Raven.Server.Routing.RequestRouter.HandlePath(RequestHandlerContext reqCtx) in D:\workspaces\ravendb_3\src\Raven.Server\Routing\RequestRouter.cs:line 413
at Raven.Server.RavenServerStartup.RequestHandler(HttpContext context) in D:\workspaces\ravendb_3\src\Raven.Server\RavenServerStartup.cs:line 192
at Raven.Client.Exceptions.ExceptionDispatcher.Throw(JsonOperationContext context, HttpResponseMessage response, CommandUnsuccessfulResponseBehavior unsuccessfulResponseBehavior) in D:\workspaces\ravendb_3\src\Raven.Client\Exceptions\ExceptionDispatcher.cs:line 116
at Raven.Client.Exceptions.ExceptionDispatcher.Throw(JsonOperationContext context, HttpResponseMessage response, CommandUnsuccessfulResponseBehavior unsuccessfulResponseBehavior) in D:\workspaces\ravendb_3\src\Raven.Client\Exceptions\ExceptionDispatcher.cs:line 120
at Raven.Client.Http.Behaviors.DefaultCommandResponseBehavior.TryHandleUnsuccessfulResponseAsync[TResult](JsonOperationContext context, RavenCommand`1 command, HttpResponseMessage response, CommandUnsuccessfulResponseBehavior unsuccessfulResponseBehavior) in D:\workspaces\ravendb_3\src\Raven.Client\Http\Behaviors\DefaultCommandResponseBehavior.cs:line 52
at Raven.Client.Http.RequestExecutor.HandleUnsuccessfulResponse[TResult](ServerNode chosenNode, Nullable`1 nodeIndex, JsonOperationContext context, RavenCommand`1 command, HttpRequestMessage request, HttpResponseMessage response, String url, SessionInfo sessionInfo, Boolean shouldRetry, CancellationToken token) in D:\workspaces\ravendb_3\src\Raven.Client\Http\RequestExecutor.cs:line 1629
at Raven.Client.Http.RequestExecutor.ExecuteAsync[TResult](ServerNode chosenNode, Nullable`1 nodeIndex, JsonOperationContext context, RavenCommand`1 command, Boolean shouldRetry, SessionInfo sessionInfo, CancellationToken token) in D:\workspaces\ravendb_3\src\Raven.Client\Http\RequestExecutor.cs:line 1025
at Raven.Client.Http.RequestExecutor.ExecuteAsync[TResult](ServerNode chosenNode, Nullable`1 nodeIndex, JsonOperationContext context, RavenCommand`1 command, Boolean shouldRetry, SessionInfo sessionInfo, CancellationToken token) in D:\workspaces\ravendb_3\src\Raven.Client\Http\RequestExecutor.cs:line 1051
at Raven.Client.Util.AsyncHelpers.<>c__DisplayClass3_0.<<RunSync>b__0>d.MoveNext() in D:\workspaces\ravendb_3\src\Raven.Client\Util\AsyncHelpers.cs:line 62
--- End of stack trace from previous location ---
at Raven.Client.Util.AsyncHelpers.HandleException(AggregateException ex, Stopwatch sw) in D:\workspaces\ravendb_3\src\Raven.Client\Util\AsyncHelpers.cs:line 215
at Raven.Client.Util.AsyncHelpers.RunSync(Func`1 task) in D:\workspaces\ravendb_3\src\Raven.Client\Util\AsyncHelpers.cs:line 78
at Raven.Client.Http.RequestExecutor.Execute[TResult](RavenCommand`1 command, JsonOperationContext context, SessionInfo sessionInfo) in D:\workspaces\ravendb_3\src\Raven.Client\Http\RequestExecutor.cs:line 608
at Raven.Client.Documents.Session.DocumentQuery`1.ExecuteActualQuery() in D:\workspaces\ravendb_3\src\Raven.Client\Documents\Session\DocumentQuery.cs:line 987
at Raven.Client.Documents.Session.DocumentQuery`1.InitSync() in D:\workspaces\ravendb_3\src\Raven.Client\Documents\Session\DocumentQuery.cs:line 979
at Raven.Client.Documents.Session.DocumentQuery`1.ExecuteQueryOperation(Nullable`1 take) in D:\workspaces\ravendb_3\src\Raven.Client\Documents\Session\DocumentQuery.cs:line 899
at Raven.Client.Documents.Session.DocumentQuery`1.Raven.Client.Documents.Session.IDocumentQueryBase<T>.ToList() in D:\workspaces\ravendb_3\src\Raven.Client\Documents\Session\DocumentQuery.cs:line 957
at FastTests.Issues.FilterTests.GetTimings(Options options) in D:\workspaces\ravendb_3\test\FastTests\Issues\RavenDB-17636.cs:line 750
at FastTests.Issues.FilterTests.Timings(Options options) in D:\workspaces\ravendb_3\test\FastTests\Issues\RavenDB-17636.cs:line 708
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
Version used
3.1.1
Describe the bug
We are getting following NRE after upgrading:
To Reproduce
Happens each time in our repository: https://github.com/ravendb/ravendb Test:
FastTests.Issues.FilterTests.Timings
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Was thinking that the issue is that we are passing the Undefined to the call
But passing ScripEngine.Global did not help, looks like it might be some internal issue (?).