Failed to launch chrome Razor View to PDF .Net Core



  • keep getting this error intermittently. is there any solution for this? I saw some past posts about it, but i dont see a solid resolution. thanks in advance



  • Please share the full error output.



  • it's not currently erroring out. i closed everything out and did a restart. could it be a cookie issue?



  • Here you go. it's erroring out again:

    fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
    An unhandled exception has occurred while executing the request.
    jsreport.Local.JsReportBinaryException: Error rendering report: rendering has finished with errors:A critical error occurred while trying to execute the render command (2). Failed to launch chrome! spawn C:\Users\username\AppData\Local\Temp\jsreport\compile\jsreport-2.9.0-SJEB3Pyev\chrome\chrome.exe ENOENTTROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md (1). caused by error (2):-> stackError: at onCriticalError (D:\snapshot\jsreport\node_modules\jsreport-cli\lib\commands\render.js:302:19) at D:\snapshot\jsreport\node_modules\jsreport-cli\lib\commands\render.js:201:16 at processTicksAndRejections (internal/process/task_queues.js:97:5)caused by error (1):-> stackError: Failed to launch chrome! spawn C:\Users\username\AppData\Local\Temp\jsreport\compile\jsreport-2.9.0-SJEB3Pyev\chrome\chrome.exe ENOENTTROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md at Client.render (D:\snapshot\jsreport\node_modules\jsreport-client\lib\client.js) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async startRender (D:\snapshot\jsreport\node_modules\jsreport-cli\lib\commands\render.js:319:24) at async D:\snapshot\jsreport\node_modules\jsreport-cli\lib\commands\render.js:186:24 at async Commander.executeCommand (D:\snapshot\jsreport\node_modules\jsreport-cli\lib\commander.js:242:22)Remote stack: Error: Failed to launch chrome! spawn C:\Users\username\AppData\Local\Temp\jsreport\compile\jsreport-2.9.0-SJEB3Pyev\chrome\chrome.exe ENOENTTROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md at onClose (D:\snapshot\jsreport\node_modules\puppeteer\lib\Launcher.js:348:14) at ChildProcess.<anonymous> (D:\snapshot\jsreport\node_modules\puppeteer\lib\Launcher.js:339:64) at ChildProcess.emit (events.js:311:20) at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12) at onErrorNT (internal/child_process.js:469:16) at processTicksAndRejections (internal/process/task_queues.js:84:21)
    at jsreport.Local.Internal.LocalUtilityReportingService.<RenderAsync>d__12.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 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
    at jsreport.AspNetCore.JsReportMiddleware.<Invoke>d__3.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 Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextResourceFilter>d__23.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
    at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeFilterPipelineAsync>d__18.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 Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeAsync>d__16.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 Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.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 AppNamePlatform.Middleware.AppNameAuthenticationMiddleware.<Invoke>d__5.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 Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.<Invoke>d__6.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 Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>d__6.MoveNext()



  • if i deploy to a web server it seems to work fine. just not locally.



  • Do you have some extra antivirus that could block running chrome process?
    Please try to delete the folder C:\Users\username\AppData\Local\Temp\jsreport and run again.



  • that worked... i was able to run it after deleting the folder. although i had trouble deleting it because it said it was open in another process. i actually had to do a restart to clear whatever leftover connection to that folder was remaining. at least i know what to do now if it won't open. thanks for the help.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.