Nested Exception

    Exception: Sitecore.JavaScriptServices.ViewEngine.NodeServices.HostingModels.NodeInvocationException
    Message: 2 errors were thrown when executing your fetchData functions. See the Sitecore logs preceding this error for details.
    Error: 2 errors were thrown when executing your fetchData functions. See the Sitecore logs preceding this error for details.
        at C:\inetpub\wwwroot\sc90.local\dist\gh-app\server.bundle.js:1:328251
        at <anonymous>
        at process._tickCallback (internal/process/next_tick.js:188:7)
    Source: Sitecore.JavaScriptServices.ViewEngine.NodeServices
       at Sitecore.JavaScriptServices.ViewEngine.NodeServices.HostingModels.Http.HttpNodeInstance.<InvokeExportAsync>d__7`1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Sitecore.JavaScriptServices.ViewEngine.NodeServices.HostingModels.OutOfProcessNodeInstance.<InvokeExportAsync>d__13`1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Sitecore.JavaScriptServices.ViewEngine.NodeServices.DefaultNodeServices.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at Sitecore.JavaScriptServices.ViewEngine.NodeServices.DefaultNodeServices.<InvokeExportWithPossibleRetryAsync>d__10`1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Sitecore.JavaScriptServices.ViewEngine.Node.Helpers.AsyncHelpers.RunSync[TResult](Func`1 func)
       at Sitecore.JavaScriptServices.ViewEngine.Presentation.JssRenderer.PerformRender(TextWriter writer, IRenderEngine renderEngine, String moduleName, String functionName, Object[] functionArgs)
       at Sitecore.JavaScriptServices.ViewEngine.Presentation.JssRenderer.Render(TextWriter writer)
       at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args)
       at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args)
       at (Object , Object[] )
       at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
       at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
       at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
       at Sitecore.Mvc.Presentation.RenderingView.Render(ViewContext viewContext, TextWriter writer)
       at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)

I'm trying to run the graphql sample app but the application is throwing a query error. Does anyone know if there is anything else I need to change to get the sample application running?

I already completed the following tasks:

  • Enabled websockets on IIS
  • Configured the host file with the url found on the app.config file
  • Added the appropriate bindings in IIS
  • Deployed the app to sitecore
  • Change the web.config

I'll debug the code, but I was expecting a working example. Any help will be appreciated.

  • 1
    Have you checked the logs preceding this error in your Sitecore logs as instructed by the error message? Could you please share them in your question? – jflheureux May 2 at 0:03
  • Did you install the JSS packages into Sitecore too for JSS Server and Sitecore Ship? O'm assuming so if you've deployed it successfully but wanted to check. – Adam Seabridge May 2 at 22:24
  • @AdamSeabridge yes I did, the problem seems to be on the initial scaffolding of the sample app; but I'm not 100% sure if that is the case. I was hoping for somebody to tell me that the sample app was working fine in their environment. – user1807334 May 3 at 20:25
  • I did try and install it the other week and it didn’t work for me but I was rushing so may have missed some steps. I’ll try again over the weekend if I get an minute and see – Adam Seabridge May 3 at 21:55
  • As @jflheureux said we'll need to see the preceding entries from the Sitecore .log files. When that error occurs it means some errors occurred executing the GraphQL queries during server-side rendering. The Sitecore logs will contain the JS error messages and stack traces, which are what you actually need here. – Kam Figy May 7 at 20:17

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.