Timeout in jsreport v2 / .net sdk v2
-
It seems something with jsreport .net package on windows 7 maybe. I installed windows 7 on vmware on a windows 10 PC, and had the same timeout issue, with the .net core example.
-
Thank you very much for trying this out.
Is there any plan for you to update to windows 10?
I am not sure if our full schedule will let us find out what is the reason it doesn't work on windows 7 soon.
It can be some dependency issue we won't be able to solve anyway.
-
No, it seems there is no near future plans to upgrade to windows 10
-
so, should we expect any fix, like this month, or move to using jsreport.Client with raw jsreport-cli?
-
If you can use the other options than waiting for us to check win 7, please do it. I cannot guarantee timeframe we get to it.
Or if you have some time you can try to debug jsreport.Local code.
We start thejsreport.exe
process somewhere here
https://github.com/jsreport/jsreport-dotnet-local/blob/master/jsreport.Local/Internal/BinaryProcess.cs#L123You see we are removing some strange environment variables which likely VS adds.
It was causing some issues in the past for the jsreport.exe
It could be that there are some other strange environment variables your system is passing and we may need to remove them as well.
-
I tried checking around jsreport.Local Repo. The issue only happens with the chrome-pdf recipe. test and html recipe work fine.
The error occurs at the following point in jsReport.Local:
An unhandled exception occurred while processing the request. JsReportBinaryException: Error rendering report: A critical error occurred while trying to execute the render command: Timeout Error: pdf generation not completed after 30000ms (1). caused by error (1) -> meta = {"remoteStack":"Error: Timeout Error: pdf generation not completed after 30000ms\n at Timeout.setTimeout (jsreportRuntime.js:134749:19)\n at ontimeout (timers.js:482:11)\n at tryOnTimeout (timers.js:317:5)\n at Timer.listOnTimeout (timers.js:277:5)"}, stack = Error: at responseToBuffer ([eval]:42206:29) at concat ([eval]:42259:40) at ConcatStream.<anonymous> ([eval]:13929:43) at emitNone (events.js:111:20) at ConcatStream.emit (events.js:208:7) at finishMaybe ([eval]:88932:14) at afterWrite ([eval]:88794:3) at _combinedTickCallback (internal/process/next_tick.js:144:20) at process._tickCallback (internal/process/next_tick.js:180:9) jsreport.Local.Internal.LocalUtilityReportingService+<RenderAsync>d__10.MoveNext() in LocalUtilityReportingService.cs, line 74 Stack Query Cookies Headers JsReportBinaryException: Error rendering report: A critical error occurred while trying to execute the render command: Timeout Error: pdf generation not completed after 30000ms (1). caused by error (1) -> meta = {"remoteStack":"Error: Timeout Error: pdf generation not completed after 30000ms\n at Timeout.setTimeout (jsreportRuntime.js:134749:19)\n at ontimeout (timers.js:482:11)\n at tryOnTimeout (timers.js:317:5)\n at Timer.listOnTimeout (timers.js:277:5)"}, stack = Error: at responseToBuffer ([eval]:42206:29) at concat ([eval]:42259:40) at ConcatStream.<anonymous> ([eval]:13929:43) at emitNone (events.js:111:20) at ConcatStream.emit (events.js:208:7) at finishMaybe ([eval]:88932:14) at afterWrite ([eval]:88794:3) at _combinedTickCallback (internal/process/next_tick.js:144:20) at process._tickCallback (internal/process/next_tick.js:180:9) jsreport.Local.Internal.LocalUtilityReportingService+<RenderAsync>d__10.MoveNext() in LocalUtilityReportingService.cs var metaDictionary = new Dictionary<string, string>(); System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) System.Runtime.CompilerServices.TaskAwaiter.GetResult() jsreport.AspNetCore.JsReportMiddleware+<Invoke>d__3.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextResourceFilter>d__22.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context) Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeFilterPipelineAsync>d__17.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeAsync>d__15.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNetCore.Builder.RouterMiddleware+<Invoke>d__4.MoveNext() System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7.MoveNext()
This is the final list of env variables on the VM:
https://www.dropbox.com/s/neylkhs5qduibxt/env3.txt?dl=0
I also tried after two additional similar variables I found in the initial list, but it didn't helped either:
worker.StartInfo.EnvironmentVariables.Remove("COMPLUS_ForceENC"); worker.StartInfo.EnvironmentVariables.Remove("COMPLUS_MDA");
any other pointers to look for?
-
It doesn't seems to be the issue with the environment variables, as I compared all the ones available on the win10 machine, and win 7 vm, and nearly all of them are same. I also tried removing all the ones that are different, but it doesn't changes anything.
-
You see in debug exactly what command is called... What if you take it and run it in the separate command line manually. Does it also timeout?
-
Yes, still getting a timeout. below is the command and the response C:\Users\Saad\AppData\Local\Temp\jsreport\dotnet\binary-default-2.3.1.0>jsreport render --keepAlive --request="C:\Users\Saad\AppData\Local\Temp\jsreport\autocleanup\req9799b535-f5c3-4eb4-8dcb-ceeac90442a3.json" --out="C:\Users\Saad\AppData\Local\Temp\jsreport\autocleanup\out673df5ac-04d7-4090-9b20-9312bf1ced8a" --meta="C:\Users\Saad\AppData\Local\Temp\jsreport\autocleanup\meta0d98e9b2-28c8-4010-8533-54b1bdb643db" instance has been daemonized and initialized successfully (pid: 4112) A critical error occurred while trying to execute the render command: Timeout Error: pdf generation not completed after 30000ms (1). caused by error (1) -> meta = {"remoteStack":"Error: Timeout Error: pdf generation not completed after 30000ms\n at Timeout.setTimeout (jsreportRuntime.js:134749:19)\n at ontimeout (timers.js:482:11)\n at tryOnTimeout (timers.js:317:5)\n at Timer.listOnTimeout (timers.js:277:5)"}, stack = Error: at responseToBuffer ([eval]:42206:29) at concat ([eval]:42259:40) at ConcatStream.<anonymous> ([eval]:13929:43) at emitNone (events.js:111:20) at ConcatStream.emit (events.js:208:7) at finishMaybe ([eval]:88932:14) at afterWrite ([eval]:88794:3) at _combinedTickCallback (internal/process/next_tick.js:144:20) at process._tickCallback (internal/process/next_tick.js:180:9)
-
Thanks. You mentioned here that render command using binary actually works for you.
If this is true, what is the difference? I know you were trying at first the binary without thekeepAlive
, can you try if this is the issue?
The request json contains I guess something normal, however anyway try to adapt it it your original workingjsreport render
request so we know there is not an issue.
-
Try to kill background node processes before to be sure that
jsreport render
command always runs fresh without trying to reuse an already existing jsreport instance.
-
Sorry for the delayed reply. The render command was giving the error as I way trying it during the debugging session, and there was another jsreport process running. Killing the process, will make the command run correctly.
I checked the task manager with the keepAlive parameter and without it. With the parameter, I can see two jsreport processes running, and without it only one. But I will still get the timeout issue.