Timeout in jsreport v2 / .net sdk v2

  • Hi, I am getting strangely a timeout when trying to render any template of any size from the studio or RenderAsync.

    This is how I have setup jsreport in asp.net core 2.2:

    var _reportingService =
                new LocalReporting()
                .RunInDirectory(Path.Combine(Directory.GetCurrentDirectory(), "jsreport"))
                .Configure(cfg => 
                    new Configuration() {
                        Chrome = new ChromeConfiguration() { Timeout = 60000 },
                        Extensions = new ExtensionsConfiguration() {
                            Express = new ExpressConfiguration() { InputRequestLimit = "100mb" },
                            Scripts = new ScriptsConfiguration() { }

    Also I am unable to find the Timeout property in Templating Engines or Extensions/Scripts, which seems a bit weird.

    For the template, even trying to render this results in error:

        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <h1>Test Text</h1>

    The error is:

    2019-02-05T07:24:36.871Z - error: Error when processing render request Timeout Error: pdf generation not completed after 60000ms Error: Timeout Error: pdf generation not completed after 60000ms
    at Timeout.setTimeout (jsreportRuntime.js:134749:19)
    at ontimeout (timers.js:482:11)
    at tryOnTimeout (timers.js:317:5)
    at Timer.listOnTimeout (timers.js:277:5)

  • How can I know what is causing the timeout?

  • The same report seems to be running fine on other pc, but timing out on this one.
    Anyway I can get more detailed logs from jsReport.Local?

    Timeout Error: pdf generation not completed after 30000ms
    +0      Starting rendering request 3 (user: null)
    +1      Rendering template { name: Test, recipe: chrome-pdf, engine: none, preview: true }
    +1      Data item not defined for this template.
    +2      Resources not defined for this template.
    +4      Base url injected: file:///C:/Users\xx\Desktop\xx\xx\xx\xx\src\xxx.Web\jsreport/
    +4      Rendering engine none
    +8      Taking compiled template from engine cache
    +9      Executing recipe chrome-pdf
    +2132   Converting with chrome HeadlessChrome/72.0.3617.0 using dedicated-process strategy
    Error: Timeout Error: pdf generation not completed after 30000ms
        at Timeout.setTimeout (jsreportRuntime.js:134749:19)
        at ontimeout (timers.js:482:11)
        at tryOnTimeout (timers.js:317:5)
        at Timer.listOnTimeout (timers.js:277:5)

  • Hm, nothing comes to my mind why the chrome should timeout on such plain html.
    Please try to reboot if it doesn't help. There can be some wrong orphan jsreport.exe running.

    I would personally try if the jsreport.exe behaves the same because .net packages are just wrapping around.

    If it is the same, I would try to install full jsreport and try to render a template. Maybe chrome somehow doesn't work on this machine, but it looks very unusual.


  • Thank you for the reply.

    This really seem strange. the jsreport cli seems to be working fine. both the sample reports are being generated. even the above mentioned template is working fine

    but when after testing the cli, I tried the .net app again I am still getting the same error.

  • any pointers where I should be looking to fix it?

  • Hm. I don't know. You can try to stop an antivirus if it helps.

    Does the asp.net core sample work for you?

    If it does, what is the difference in yours setup?

  • Getting the timeout error from the sample:

    JsReportBinaryException: Error rendering report: instance has been daemonized and initialized successfully (pid: 3152)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)
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    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)
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

  • Also, I dont have any anti-virus running.

    the jsrepot-cli is running fine, but the not the .net version.

    Also, I am facing this issue on Windows 7. The .net version seems to work fine on another PC with windows 10.

  • Also, I dont have any anti-virus running.

    Not even a windows defender?

    Please try to close VS and delete this folder
    C:\Users[your user]\AppData\Local\Temp\jsreport

    Then try to start and run the sample jsreport project again.

    If it won't help I try to get a windows 7 vm in azure and try it out there.

  • no, not even windows defender.

    I tired after deleting the folder, but still getting the same error.

  • Hm. I guess you don't have access to another Windows 7 machine right?
    Just that we would know it is about Windows 7 or something particular on your pc.
    I wanted to create windows 7 vm in azure but seems it is not available and I currently don't have space for another VM on my local.


    Somewhere here should be the binary the .net uses
    That one is able to render chrome for you?

  • I found the exe at the path, but What do you mean by: "That one is able to render chrome for you?"

    and yes, unfortunately, that is the only windows 7 machine available for me.

  • Run something like this in cmd

    c:\Users\janbl\AppData\Local\Temp\jsreport\dotnet\binary-default->echo foo > in.html
    c:\Users\janbl\AppData\Local\Temp\jsreport\dotnet\binary-default->jsreport.exe render --template.content=in.html --template.engine=handlebars --template.recipe=chrome-pdf --out=out.pdf
    starting rendering process..
    rendering has finished successfully and saved in: c:\Users\janbl\AppData\Local\Temp\jsreport\dotnet\binary-default-\out.pdf

  • This works, generates the pdf with foo.

    C:\Users\xxx\AppData\Local\Temp\jsreport\dotnet\binary-default->echo foo > in.html
    C:\Users\xxx\AppData\Local\Temp\jsreport\dotnet\binary-default->jsreport.exe render --template.content=in.html --template.engine=handlebars --template.recipe=chrome-pdf --out=out.pdf
    starting rendering process..
    rendering has finished successfully and saved in: C:\Users\xxx\AppData\Local\Temp\jsreport\dotnet\binary-default-\out.pdf

  • 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 the jsreport.exe process somewhere here

    You 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.

Log in to reply

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