jsreport / jsreport-phantom-pdf

jsreport recipe which is rendering pdf from html using phantomjs
GNU Lesser General Public License v3.0
11 stars 8 forks source link

Error during rendering report #7

Closed juliolopezn closed 7 years ago

juliolopezn commented 8 years ago
"Error: Command failed: E:\Proyectos\Electron\UTEFI\dist\win-unpacked\resources\app.asar.unpacked\node_modules\phantomjs\lib\phantom\phantomjs.exe --ignore-ssl-errors=yes --web-security=false --ssl-protocol=any E:\Proyectos\Electron\UTEFI\dist\win-unpacked\resources\app.asar\node_modules\jsreport-phantom-pdf\node_modules\phantom-html-to-pdf\lib\scripts\standaloneScript.js C:\Users\JULIOL~1\AppData\Local\Temp\jsreport-temp\eae9af10-7b67-11e6-856f-17a78e476567settings.html
Can't open 'E:\Proyectos\Electron\UTEFI\dist\win-unpacked\resources\app.asar\node_modules\jsreport-phantom-pdf\node_modules\phantom-html-to-pdf\lib\scripts\standaloneScript.js'\r
    at ChildProcess.exithandler (child_process.js:214:12)\n    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)\n    at maybeClose (internal/child_process.js:852:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)\nFrom previous event:
    at E:\Proyectos\Electron\UTEFI\node_modules\jsreport-core\lib\render\render.js:143:54
    at _fulfilled (E:\Proyectos\Electron\UTEFI\node_modules\listener-collection\node_modules\q\q.js:794:54)
    at self.promiseDispatch.done (E:\Proyectos\Electron\UTEFI\node_modules\listener-collection\node_modules\q\q.js:823:30)
    at Promise.promise.promiseDispatch (E:\Proyectos\Electron\UTEFI\node_modules\listener-collection\node_modules\q\q.js:756:13)
    at E:\Proyectos\Electron\UTEFI\node_modules\listener-collection\node_modules\q\q.js:564:44
    at flush (E:\Proyectos\Electron\UTEFI\node_modules\listener-collection\node_modules\q\q.js:110:17)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)\n    at process._tickCallback (internal/process/next_tick.js:98:9)"
pofider commented 8 years ago

Can you check if you use jsreport-phantom-pdf@1.0.3 There was a minor change in the latest that could fix it.

For some reason the installation of jsreport-phantom-pdf was not complete or errored. Please try to reinstall it or copy the missing file phantom-html-to-pdf\lib\scripts\standaloneScript.js from another installation there.

juliolopezn commented 8 years ago

yes, I'm using jsreport-phantom-pdf@1.0.3. This problem only occurs when the application is packaged in .asar.

pofider commented 8 years ago

Is the file standaloneScript.js actually there?

juliolopezn commented 8 years ago

Yes, I guess phantomjs.exe can not access the package app.asar

juliolopezn commented 8 years ago

I already checked the problem. phantomjs.exe is not packaged inside the app.asar and can not access the other dependencies. What can you recommend?

pofider commented 8 years ago

@bjrmatos you are experienced in electron... did you ever tried an app in asar with jsreport together? I was not able to make it working some time ago, but maybe I'm missing something? Thank you

juliolopezn commented 7 years ago

Already solved the problem. I created a module to create reports outside of the app.asar. Thanks for helping. :) and sorry for my bad English.

pofider commented 7 years ago

Thanks for the info.

HZSamir commented 6 years ago

@JulioLopezN Can you please develop your answer? I'm running into the same issue

sanshrestha21 commented 2 years ago

jsreport v3.3.0 jsreport/jsreport-phantom-pdf is not working

2022-01-21T05:43:04.184Z - debug: Adding sample data Sy5S19ncg rootId=f3ngmoxp32drexo, id=f3ngmoxp32drexo 2022-01-21T05:43:04.185Z - debug: Base url not specified, skipping its injection. rootId=f3ngmoxp32drexo, id=f3ngmoxp32drexo 2022-01-21T05:43:04.185Z - debug: Rendering engine handlebars rootId=f3ngmoxp32drexo, id=f3ngmoxp32drexo 2022-01-21T05:43:04.561Z - error: Report render failed: Cannot find module 'phantomjs' Require stack:

sanshrestha21 commented 2 years ago

installed extension and there version are as

jsreport-server@ /home/devops/jsreport ├── @jsreport/client@3.0.0-beta.1 ├── @jsreport/jsreport-phantom-pdf@3.0.0 ├── core-js@3.20.3 ├── handlebars-intl@1.1.2 ├── handlebars@4.7.7 ├── jsreport-core@2.10.1 ├── jsreport@3.3.0 ├── puppeteer@13.1.1 └── uuid@8.3.2