Unable to render template. Broken pipe



  • Hi I am receiving this error whe running my code:

    <ExceptionMessage>Unable to render template. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Error</title> </head> <body> <pre>Error: EPIPE: broken pipe, write<br> &nbsp; &nbsp;at Socket._write (internal/net.js:62:25)<br> &nbsp; &nbsp;at doWrite (_stream_writable.js:441:12)<br> &nbsp; &nbsp;at writeOrBuffer (_stream_writable.js:425:5)<br> &nbsp; &nbsp;at Socket.Writable.write (_stream_writable.js:316:11)<br> &nbsp; &nbsp;at Object.log (D:\snapshot\jsreport\node_modules\winston\lib\winston\transports\console.js:119:20)<br> &nbsp; &nbsp;at transportLog (D:\snapshot\jsreport\node_modules\winston\lib\winston\logger.js:234:15)<br> &nbsp; &nbsp;at D:\snapshot\jsreport\node_modules\winston\node_modules\async\lib\async.js:157:13<br> &nbsp; &nbsp;at _each (D:\snapshot\jsreport\node_modules\winston\node_modules\async\lib\async.js:57:9)<br> &nbsp; &nbsp;at Object.&lt;anonymous&gt; (D:\snapshot\jsreport\node_modules\winston\node_modules\async\lib\async.js:156:9)<br> &nbsp; &nbsp;at Object.log (D:\snapshot\jsreport\node_modules\winston\lib\winston\logger.js:246:9)<br> &nbsp; &nbsp;at D:\snapshot\jsreport\node_modules\winston\lib\winston\common.js:54:18<br> &nbsp; &nbsp;at handleErrorMiddleware (D:\snapshot\jsreport\node_modules\jsreport-express\lib\handleError.js:76:7)<br> &nbsp; &nbsp;at D:\snapshot\jsreport\node_modules\jsreport-express\lib\reporter.express.js:199:36<br> &nbsp; &nbsp;at Layer.handle_error (D:\snapshot\jsreport\node_modules\express\lib\router\layer.js:71:5)<br> &nbsp; &nbsp;at trim_prefix (D:\snapshot\jsreport\node_modules\express\lib\router\index.js:315:13)<br> &nbsp; &nbsp;at D:\snapshot\jsreport\node_modules\express\lib\router\index.js:284:7<br> &nbsp; &nbsp;at Function.process_params (D:\snapshot\jsreport\node_modules\express\lib\router\index.js:335:12)<br> &nbsp; &nbsp;at next (D:\snapshot\jsreport\node_modules\express\lib\router\index.js:275:10)<br> &nbsp; &nbsp;at Layer.handle_error (D:\snapshot\jsreport\node_modules\express\lib\router\layer.js:67:12)<br> &nbsp; &nbsp;at trim_prefix (D:\snapshot\jsreport\node_modules\express\lib\router\index.js:315:13)<br> &nbsp; &nbsp;at D:\snapshot\jsreport\node_modules\express\lib\router\index.js:284:7<br> &nbsp; &nbsp;at Function.process_params (D:\snapshot\jsreport\node_modules\express\lib\router\index.js:335:12)<br> &nbsp; &nbsp;at next (D:\snapshot\jsreport\node_modules\express\lib\router\index.js:275:10)<br> &nbsp; &nbsp;at Layer.handle_error (D:\snapshot\jsreport\node_modules\express\lib\router\layer.js:67:12)<br> &nbsp; &nbsp;at trim_prefix (D:\snapshot\jsreport\node_modules\express\lib\router\index.js:315:13)<br> &nbsp; &nbsp;at D:\snapshot\jsreport\node_modules\express\lib\router\index.js:284:7<br> &nbsp; &nbsp;at Function.process_params (D:\snapshot\jsreport\node_modules\express\lib\router\index.js:335:12)<br> &nbsp; &nbsp;at next (D:\snapshot\jsreport\node_modules\express\lib\router\index.js:275:10)<br> &nbsp; &nbsp;at next (D:\snapshot\jsreport\node_modules\express\lib\router\route.js:127:14)<br> &nbsp; &nbsp;at processTicksAndRejections (internal/process/task_queues.js:97:5)</pre> </body> </html> </ExceptionMessage>
    <ExceptionType>jsreport.Client.JsReportException</ExceptionType>
    <StackTrace> at jsreport.Client.ReportingService.<RenderAsync>d__33.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at mmars_webapi.Controllers.StudentReportController.<SaveToServer>d__1.MoveNext() in C:\Users\ryans\Documents\Visual Studio 2019\Projects\MMARS\Development\Development\Source\mmars12\mmars_webapi\Controllers\StudentReportController.cs:line 211 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at mmars_webapi.Controllers.SSRController.<RunReport>d__0.MoveNext() in C:\Users\ryans\Documents\Visual Studio 2019\Projects\MMARS\Development\Development\Source\mmars12\mmars_webapi\Controllers\SSRController.cs:line 19 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__1`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()</StackTrace>
    

    My code is:

    var rs = new LocalReporting().UseBinary(JsReportBinary.GetBinary())
                    .Configure(cfg => { cfg.TrustUserCode = true; cfg.ReportTimeout = 260000; cfg.Chrome = new ChromeConfiguration { Timeout = 260000 }; return cfg; }).AsWebServer().Create();
    
     await rs.StartAsync();
    
    .
    .
    .
    
     var rpt = await rs.RenderAsync(new RenderRequest()
     {
         Template = template,
         Options  = new RenderOptions { Timeout = 260000 }
     });
    
    

    I am running all the newest jsreport package versions. What is going on here? Thanks



  • It looks like some stdio piping issue, however, I'm not sure what is wrong exactly.

    Observing the stack trace, it looks like you communicate with jsreport v2 server but you mention you have the latest jsreport package versions. Are you sure you have jsreport.Binary@3.11.0?
    If you open http://localhost:5488, don't you see an old jsreport?
    You can check in taskmgr the node.exe processes a kill them to be sure there is no old jsreport running.


Log in to reply
 

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