0

Sitecore : 9.1 Initial release + JSS 11.0 integrated mode

We tried to abandon the session using the URL snippet /sitecore/api/jss/track/flush mentioned at https://jss.sitecore.com/docs/fundamentals/services/tracking

Unfortunately, when we hit the URL we are getting the following error:

Server Error in '/' Application.
Value cannot be null.
Parameter name: apiKeyResolver
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: apiKeyResolver

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ArgumentNullException: Value cannot be null.
Parameter name: apiKeyResolver]
   Sitecore.Diagnostics.Assert.ArgumentNotNull(Object argument, String argumentName) +64
   Sitecore.Services.GraphQL.Hosting.Mvc.SscSecurity.ImpersonateApiKeyUser..ctor(IApiKeyResolver apiKeyResolver, IUserService userService, BaseLog log) +48
   System.RuntimeTypeHandle.CreateCaInstance(RuntimeType type, IRuntimeMethodInfo ctor) +0
   System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +2179
   System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeMethodInfo method, RuntimeType caType, Boolean inherit) +518
   System.Web.Mvc.<>c.<.cctor>b__1_0(TMemberInfo memberInfo) +69
   System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) +88
   System.Web.Mvc.ReflectedActionDescriptor.GetFilterAttributes(Boolean useCache) +88
   System.Web.Mvc.<GetFilters>d__5.MoveNext() +474
   System.Web.Mvc.FilterProviderCollection.GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor) +276
   System.Web.Mvc.ControllerActionInvoker.GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor) +55
   System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state) +243
   System.Web.Mvc.<>c.<BeginExecuteCore>b__152_0(AsyncCallback asyncCallback, Object asyncState, ExecuteCoreState innerState) +48
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +73
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +163
   System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +787
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +163
   System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +630
   System.Web.Mvc.<>c.<BeginProcessRequest>b__20_0(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState) +99
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallBeginDelegate(AsyncCallback callback, Object callbackState) +73
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +163
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +524
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1128
   System.Web.<>c__DisplayClass285_0.<ExecuteStepImpl>b__0() +40
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +155
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134

We are not sure what we are missing in this.

3
  • Based on the documentation, it looks like you just have to visit the /sitecore/api/jss/track/flush endpoint but exception says that there is problem with apiKeyResolver so I would assume that Api Key has to be provided or stored somewhere but cannot find any reference in documentation. Have you also published your API Key in that environment? – Peter Procházka May 11 at 7:30
  • @PeterProcházka: Yes, it is published and it is a full-pledged running application. – NutsAndBolts May 11 at 8:08
  • Stack Traces as text, not images. For SEO. – Mark Cassidy May 11 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.