jsreport/jsreport-dotnet

Error rendering HtmlToXlsx

spk27 opened this issue · 4 comments

spk27 commented

After a few days without testing.. i get this error, i don't know why, it was working perfectly.
This happends only when try render HtmlToXlsx .. however "ChromePdf" works.

JsReportBinaryException: Error rendering report: A critical error occurred while trying to execute the render command: Command failed: C:\ProjectPath\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe --ignore-ssl-errors=yes --web-security=false --ssl-protocol=any \work\jsreport\jsreport\node_modules\phantom-page-eval\lib\scripts\runPage.js C:\Users\Danie\AppData\Local\Temp\jsreport\autocleanup\Ri_k0Kc-eval-input.jsonCan't open '\work\jsreport\jsreport\node_modules\phantom-page-eval\lib\scripts\runPage.js' (1). caused by error (1) -> meta = {"remoteStack":"Error: Command failed: C:\\ProjectPath\\node_modules\\phantomjs-prebuilt\\lib\\phantom\\bin\\phantomjs.exe --ignore-ssl-errors=yes --web-security=false --ssl-protocol=any \\work\\jsreport\\jsreport\\node_modules\\phantom-page-eval\\lib\\scripts\\runPage.js C:\\Users\\Danie\\AppData\\Local\\Temp\\jsreport\\autocleanup\\Ri_k0Kc-eval-input.json\nCan't open '\\work\\jsreport\\jsreport\\node_modules\\phantom-page-eval\\lib\\scripts\\runPage.js'\r\n\n at ChildProcess.exithandler (child_process.js:276:12)\n at emitTwo (events.js:126:13)\n at ChildProcess.emit (events.js:214:7)\n at maybeClose (internal/child_process.js:925:16)\n at Process.ChildProcess._handle.onexit (internal/child_process.js:209: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)

I have update Binary to v2.3.1 but still.. any idea? thanks!

You use jsreport binary v2.3.0 which you downloaded from here?

How do you start jsreport, using jsreport start? or do you use it from command line with jsreport render?
How does your rendering request looks like?

spk27 commented

Ups Sorry.. i placed this issue in the wrong repository.. Im using jsreport for dotnet

image

Request:

image

Does this example with excel works for you?
https://github.com/jsreport/jsreport-dotnet-example-webapp

It does for me and it has the same deps as you use. Not sure what is different in your set up.
Maybe you can share a simple repo for me to check?

spk27 commented

After watching carefully at https://github.com/jsreport/jsreport-dotnet-example-webapp i realized that i was missing this line:

.Configure((r) => r.Template.HtmlToXlsx = new HtmlToXlsx() { HtmlEngine = "chrome" })

after put in it works .. thanks Jan!