HPE_HEADER_OVERFLOW error with jsreport.binary > 2.5.0 (works fine with 2.5.0)



  • Hi all.

    I was facing the problem described in the Reosurce busy or locked post on a production instance of a .net Core 2.2 web app. I then tried to upgrade jsreport.binary from v. 2.5.0 to v. 2.6.2-beta to solve that issue on the production server. After the upgrade jsreport stopped generating any report on the dev machine (which was working correctly before the upgrade).
    The report is configured to build a PDF through the Chrome recipe using a razor view. Using the older jsreport allows me to successfully generate and download the PDF file. After upgrading to v. 2.6.2-beta jsreport a HPE_HEADER_OVERFLOW error.

    Here's the raw exception details:

    jsreport.Local.JsReportBinaryException: Error rendering report: rendering has finished with errors:A critical error occurred while trying to execute the render command: Parse Error (1). caused by error (1) -> meta = {"bytesParsed":65536,"code":"HPE_HEADER_OVERFLOW","disableExit":false}, stack = Error:     at Socket.socketOnData (_http_client.js:442:20)    at Socket.emit (events.js:189:13)    at addChunk (_stream_readable.js:284:12)    at readableAddChunk (_stream_readable.js:265:11)    at Socket.Readable.push (_stream_readable.js:220:10)    at TCP.onStreamRead (internal/stream_base_commons.js:94:17)
    
       at jsreport.Local.Internal.LocalUtilityReportingService.RenderAsync(String requestString, CancellationToken ct)
       at jsreport.AspNetCore.JsReportMiddleware.Invoke(HttpContext context)
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
       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()
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
       at Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext)
       at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(HttpContext httpContext)
       at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
       at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context)
       at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
       at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
       at DC.Web.ProtectFolder.Invoke(HttpContext httpContext, IAuthorizationService authorizationService) in D:\Progetti\Web\NetCore\DentalCare\DC.Web\Middleware\Authorization\StaticFiles\ProtectFolderMiddleware.cs:line 37
       at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.Invoke(HttpContext context)
       at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
       at Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.MigrationsEndPointMiddleware.Invoke(HttpContext context)
       at Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.Invoke(HttpContext httpContext)
       at Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.DatabaseErrorPageMiddleware.Invoke(HttpContext httpContext)
       at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
    

    The Request header length is around 13kB.
    Please is the error related to the node.js max header length default value of 8kB, as per node.js specs? I'f I'm not mistaken, wasn't it 80kB in the previous node.js releases?
    Is there anything I can do to solve this problem?

    The jsreport nuget packages are included as follows:

    <PackageReference Include="jsreport.AspNetCore" Version="2.0.2" />
    <PackageReference Include="jsreport.Binary" Version="2.6.2-beta" />
    <PackageReference Include="jsreport.Local" Version="2.1.2" />
    

    After some trial and error, the actual jsreport configuration is as follows:

    services.AddJsReport(new LocalReporting()
                    .UseBinary(JsReportBinary.GetBinary())
                    .KillRunningJsReportProcesses()
                    .Configure(cfg=> {
                        cfg.BaseUrlAsWorkingDirectory().AllowedLocalFilesAccess();
                        cfg.TempDirectory = Path.Combine(Directory.GetCurrentDirectory(), "jsreport", "temp");
                        return cfg;
                    })
                    .AsUtility()
                    .Create());
    

    Thank you so much.
    Regards!



  • I apologize for the delay.
    This bug should be fixed in the jsreport.Binary@2.6.2-beta2



  • Thank you for the reply. Please, do you have any estimated release date for the jsreport.Binary@2.6.2-beta2 package?



  • It is already there
    https://www.nuget.org/packages/jsreport.Binary/

    Make sure you select the "include pre-release" nugets in the vs and delete nuget cache if you still don't' see it.



  • Hi @jan_blaha I had the same issue mentioned above.
    I fixed the problem using jsreport.Binary@2.6.2-beta2 on Windows, but I need to fix the issue on OSX, do you have any estimated release date for @2.6.2-beta2 on OSX?

    Thank you,
    Regards!


Log in to reply
 

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