vivliostyle-electron issueshttps://gitlab.coko.foundation/fchasen/vivliostyle-electron/-/issues2017-04-09T02:01:50Zhttps://gitlab.coko.foundation/fchasen/vivliostyle-electron/-/issues/4V-E hanging when electron-html-to spawned2017-04-09T02:01:50ZAdam Hydeadam@coko.foundationV-E hanging when electron-html-to spawnedsame result with Node v4.5.0 and v6.9.1
Ubuntu 16.04
I duckducked a bit and see there is some issue with either linking of node or electron-prebuilt installation method (documented in the readme of electron-html-to). But I couldn't wor...same result with Node v4.5.0 and v6.9.1
Ubuntu 16.04
I duckducked a bit and see there is some issue with either linking of node or electron-prebuilt installation method (documented in the readme of electron-html-to). But I couldn't work it out. Somethings funny here I rekin...the below is the debug output. same result use framebuffer or without. hangs at the last line with no result. Interestingly, if I use a hyphenation parameter then I get the hyphenated HTML output, but still it then hangs and no PDF.
```JavaScript
DEBUG=* vivliostyle-electron --debug index2.html --output sssa3s.pdf
electron-html-to Creating a new conversion function with options: +0ms { timeout: 300000,
numberOfWorkers: 2,
chromeCommandLineSwitches: { 'ignore-certificate-errors': null },
allowLocalFilesAccess: true,
tmpDir: '/tmp/electron-html-to-tmp-data',
strategy: 'dedicated-process',
converterPath: '/home/adam/.nvm/versions/node/v6.9.1/lib/node_modules/vivliostyle-electron/node_modules/electron-html-to/lib/converters/pdf.js' }
electron-workers:manager trying to get electron path from electron-prebuilt module.. +0ms
electron-workers Creating a new manager with options: +1ms { timeout: 300000,
numberOfWorkers: 2,
chromeCommandLineSwitches: { 'ignore-certificate-errors': null },
allowLocalFilesAccess: true,
tmpDir: '/tmp/electron-html-to-tmp-data',
strategy: 'dedicated-process',
converterPath: '/home/adam/.nvm/versions/node/v6.9.1/lib/node_modules/vivliostyle-electron/node_modules/electron-html-to/lib/converters/pdf.js',
hostEnvVarName: 'ELECTRON_WORKER_HOST',
portEnvVarName: 'ELECTRON_WORKER_PORT',
pathToScript: '/home/adam/.nvm/versions/node/v6.9.1/lib/node_modules/vivliostyle-electron/node_modules/electron-html-to/lib/scripts/serverScript.js',
env:
{ ELECTRON_HTML_TO_DEBUGGING: 'true',
chromeCommandLineSwitches: '{"ignore-certificate-errors":null}',
allowLocalFilesAccess: 'true' },
stdio:
[ null,
WriteStream {
connecting: false,
_hadError: false,
_handle: [Object],
_parent: null,
_host: null,
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 3,
_maxListeners: undefined,
_writableState: [Object],
writable: true,
allowHalfOpen: false,
destroyed: false,
_bytesDispatched: 0,
_sockname: null,
_writev: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
columns: 212,
rows: 55,
_type: 'tty',
fd: 1,
_isStdio: true,
destroySoon: [Function],
destroy: [Function] },
WriteStream {
connecting: false,
_hadError: false,
_handle: [Object],
_parent: null,
_host: null,
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 3,
_maxListeners: undefined,
_writableState: [Object],
writable: true,
allowHalfOpen: false,
destroyed: false,
_bytesDispatched: 570,
_sockname: null,
_writev: null,
_pendingData: null,
_pendingEncoding: '',
server: null,
_server: null,
columns: 212,
rows: 55,
_type: 'tty',
fd: 2,
_isStdio: true,
destroySoon: [Function],
destroy: [Function] },
'ipc' ],
killSignal: 'SIGKILL',
connectionMode: 'server',
electronArgs: [],
pathToElectron: '/home/adam/.nvm/versions/node/v6.9.1/lib/node_modules/vivliostyle-electron/node_modules/electron-prebuilt/dist/electron',
maxConcurrencyPerWorker: Infinity,
host: '127.0.0.1' }
vivliostyle-electron:renderer Processing from input index2.html +0ms
vivliostyle-electron:renderer Converting from file:///home/adam/.nvm/versions/node/v6.9.1/lib/node_modules/vivliostyle-electron/renderer/renderer.html?url=..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2FDesktop%2Ffc%2Findex2.html&pageSize=A4&debug=true +2ms
electron-html-to:conversion generating new conversion task.. +17ms
electron-html-to:conversion conversion task id: 2076fe39-4f0b-4555-b36e-63fcf7ec5dac +1ms
electron-html-to:conversion creating temporal html files in /tmp/electron-html-to-tmp-data.. +0ms
electron-html-to:conversion starting conversion task [strategy:dedicated-process][task id:2076fe39-4f0b-4555-b36e-63fcf7ec5dac] with options: +0ms { browserWindow: { webPreferences: {} },
waitForJSVarName: 'ELECTRON_HTML_TO_READY',
url: 'file:///home/adam/.nvm/versions/node/v6.9.1/lib/node_modules/vivliostyle-electron/renderer/renderer.html?url=..%2F..%2F..%2F..%2F..%2F..%2F..%2F..%2FDesktop%2Ffc%2Findex2.html&pageSize=A4&debug=true',
waitForJS: true,
pdf:
{ marginsType: 0,
pageSize: 'A4',
printBackground: true,
landscape: false },
chromeCommandLineSwitches: { 'ignore-certificate-errors': null },
extraHeaders: {},
output:
{ tmpDir: '/tmp/electron-html-to-tmp-data',
id: '2076fe39-4f0b-4555-b36e-63fcf7ec5dac' } }
electron-html-to:dedicated-process-strategy saving settings in temporal file.. +1ms
electron-html-to:dedicated-process-strategy searching electron executable path.. +4ms
electron-html-to:dedicated-process-strategy electron executable path returned from electron-prebuilt module: /home/adam/.nvm/versions/node/v6.9.1/lib/node_modules/vivliostyle-electron/node_modules/electron-prebuilt/dist/electron +0ms
electron-html-to:dedicated-process-strategy electron process debugging mode activated +0ms
electron-html-to:dedicated-process-strategy spawing new electron process.. +0ms
electron-html-to:dedicated-process-strategy processing conversion.. +0ms
```Fred ChasenFred Chasenhttps://gitlab.coko.foundation/fchasen/vivliostyle-electron/-/issues/3doent not generate since update to new version2017-04-09T02:01:50Zjulientaqjulien@coko.foundationdoent not generate since update to new versionHere is what i have since upgrade to new version when tryng to generate a pdf:
`
=> DEBUG=* vivliostyle-electron index.html -o test.pdf
electron-html-to Creating a new conversion function with options: +0ms { timeout: 300000,
...Here is what i have since upgrade to new version when tryng to generate a pdf:
`
=> DEBUG=* vivliostyle-electron index.html -o test.pdf
electron-html-to Creating a new conversion function with options: +0ms { timeout: 300000,
numberOfWorkers: 2,
chromeCommandLineSwitches: { 'ignore-certificate-errors': null },
allowLocalFilesAccess: true,
tmpDir: '/var/folders/58/18jp56t13nj8s4wd1ybxz2kc0000gn/T/electron-html-to-tmp-data',
strategy: 'dedicated-process',
converterPath: '/Users/julientaq/.npm-packages/lib/node_modules/vivliostyle-electron/node_modules/electron-html-to/lib/converters/pdf.js' }
electron-workers:manager trying to get electron path from electron-prebuilt module.. +17ms
electron-workers Creating a new manager with options: +2ms { timeout: 300000,
numberOfWorkers: 2,
chromeCommandLineSwitches: { 'ignore-certificate-errors': null },
allowLocalFilesAccess: true,
tmpDir: '/var/folders/58/18jp56t13nj8s4wd1ybxz2kc0000gn/T/electron-html-to-tmp-data',
strategy: 'dedicated-process',
converterPath: '/Users/julientaq/.npm-packages/lib/node_modules/vivliostyle-electron/node_modules/electron-html-to/lib/converters/pdf.js',
hostEnvVarName: 'ELECTRON_WORKER_HOST',
portEnvVarName: 'ELECTRON_WORKER_PORT',
pathToScript: '/Users/julientaq/.npm-packages/lib/node_modules/vivliostyle-electron/node_modules/electron-html-to/lib/scripts/serverScript.js',
env:
{ chromeCommandLineSwitches: '{"ignore-certificate-errors":null}',
allowLocalFilesAccess: 'true' },
stdio: [ null, null, null, 'ipc' ],
killSignal: 'SIGKILL',
connectionMode: 'server',
electronArgs: [],
pathToElectron: '/Users/julientaq/.npm-packages/lib/node_modules/vivliostyle-electron/node_modules/electron-prebuilt/dist/Electron.app/Contents/MacOS/Electron',
host: '127.0.0.1' }
Processing index.html file:///Users/julientaq/.npm-packages//node_modules/vivliostyle-electron/librenderer/renderer.html?url=..%2F..%2F..%2F..%2FDesktop%2Fwood%2Findex.html&pageSize=A4
electron-html-to:conversion generating new conversion task.. +8ms
electron-html-to:conversion conversion task id: 757d0a4c-22c1-4dcc-8f7a-48195bf425e6 +1ms
electron-html-to:conversion creating temporal html files in /var/folders/58/18jp56t13nj8s4wd1ybxz2kc0000gn/T/electron-html-to-tmp-data.. +0ms
electron-html-to:conversion starting conversion task [strategy:dedicated-process][task id:757d0a4c-22c1-4dcc-8f7a-48195bf425e6] with options: +1ms { browserWindow: { webPreferences: {} },
waitForJSVarName: 'ELECTRON_HTML_TO_READY',
url: 'file:///Users/julientaq/.npm-packages//node_modules/vivliostyle-electron/librenderer/renderer.html?url=..%2F..%2F..%2F..%2FDesktop%2Fwood%2Findex.html&pageSize=A4',
waitForJS: true,
pdf:
{ marginsType: 0,
pageSize: { width: 228600, height: 50800 },
printBackground: true,
landscape: false },
chromeCommandLineSwitches: { 'ignore-certificate-errors': null },
extraHeaders: {},
output:
{ tmpDir: '/var/folders/58/18jp56t13nj8s4wd1ybxz2kc0000gn/T/electron-html-to-tmp-data',
id: '757d0a4c-22c1-4dcc-8f7a-48195bf425e6' } }
electron-html-to:dedicated-process-strategy saving settings in temporal file.. +1ms
electron-html-to:dedicated-process-strategy searching electron executable path.. +3ms
electron-html-to:dedicated-process-strategy electron executable path returned from electron-prebuilt module: /Users/julientaq/.npm-packages/lib/node_modules/vivliostyle-electron/node_modules/electron-prebuilt/dist/Electron.app/Contents/MacOS/Electron +1ms
electron-html-to:dedicated-process-strategy spawing new electron process.. +0ms
electron-html-to:dedicated-process-strategy processing conversion.. +0ms
electron-html-to:electron-log [Worker 757d0a4c-22c1-4dcc-8f7a-48195bf425e6] +337ms reading settings file from /var/folders/58/18jp56t13nj8s4wd1ybxz2kc0000gn/T/electron-html-to-tmp-data/757d0a4c-22c1-4dcc-8f7a-48195bf425e6settings.html
electron-html-to:electron-log [Worker 757d0a4c-22c1-4dcc-8f7a-48195bf425e6] +1ms requiring converter module from /Users/julientaq/.npm-packages/lib/node_modules/vivliostyle-electron/node_modules/electron-html-to/lib/converters/pdf.js
electron-html-to:electron-log [Worker 757d0a4c-22c1-4dcc-8f7a-48195bf425e6] +56ms establishing chrome command line switch [ignore-certificate-errors]
electron-html-to:electron-log [Worker 757d0a4c-22c1-4dcc-8f7a-48195bf425e6] +65ms electron process ready..
electron-html-to:electron-log [Worker 757d0a4c-22c1-4dcc-8f7a-48195bf425e6] +4ms interception for file protocol register successfully
electron-html-to:electron-log [Worker 757d0a4c-22c1-4dcc-8f7a-48195bf425e6] +0ms waitForJS enabled..
electron-html-to:electron-log [Worker 757d0a4c-22c1-4dcc-8f7a-48195bf425e6] +1ms creating new browser window with options: { width: 600,
height: 600,
webPreferences:
{ nodeIntegration: false,
javascript: true,
webSecurity: false,
preload: '/Users/julientaq/.npm-packages/lib/node_modules/vivliostyle-electron/node_modules/electron-html-to/lib/scripts/preload.js' },
show: false }
electron-html-to:electron-log [Worker 757d0a4c-22c1-4dcc-8f7a-48195bf425e6] +20ms loading url in browser window: file:///Users/julientaq/.npm-packages//node_modules/vivliostyle-electron/librenderer/renderer.html?url=..%2F..%2F..%2F..%2FDesktop%2Fwood%2Findex.html&pageSize=A4, with headers:
electron-html-to:electron-log [Worker 757d0a4c-22c1-4dcc-8f7a-48195bf425e6] +96ms file protocol request for: file:///Users/julientaq/.npm-packages//node_modules/vivliostyle-electron/librenderer/renderer.html?url=..%2F..%2F..%2F..%2FDesktop%2Fwood%2Findex.html&pageSize=A4
electron-html-to:electron-log [Worker 757d0a4c-22c1-4dcc-8f7a-48195bf425e6] +1ms request to load a file: /Users/julientaq/.npm-packages//node_modules/vivliostyle-electron/librenderer/renderer.html?url=..%2F..%2F..%2F..%2FDesktop%2Fwood%2Findex.html&pageSize=A4
electron-html-to:electron-log [Worker 757d0a4c-22c1-4dcc-8f7a-48195bf425e6] +0ms resolving file protocol request. response file url: /Users/julientaq/.npm-packages//node_modules/vivliostyle-electron/librenderer/renderer.html mime type: text/html
electron-html-to:electron-log [Worker 757d0a4c-22c1-4dcc-8f7a-48195bf425e6] +97ms [Browser window - 1 log ]: loading preload script
electron-html-to:electron-log [Worker 757d0a4c-22c1-4dcc-8f7a-48195bf425e6] +1ms [Browser window - 1 log ]: defining waitForJS callback..
electron-html-to:electron-log [Worker 757d0a4c-22c1-4dcc-8f7a-48195bf425e6] +2ms browser window loaded..
electron-html-to:electron-log [Worker 757d0a4c-22c1-4dcc-8f7a-48195bf425e6] +3ms [Browser window - 1 log ]: evaluating javascript in page..
electron-html-to:electron-log [Worker 757d0a4c-22c1-4dcc-8f7a-48195bf425e6] +1ms waiting for browser window resolution..
electron-html-to:dedicated-process-strategy conversion timeout.. +5m
{ Error: Timeout when executing in electron
at Timeout._onTimeout (/Users/julientaq/.npm-packages/lib/node_modules/vivliostyle-electron/node_modules/electron-html-to/lib/dedicatedProcessStrategy.js:227:20)
at tryOnTimeout (timers.js:224:11)
at Timer.listOnTimeout (timers.js:198:5) electronTimeout: true }
electron-workers:manager process exit: trying to kill workers.. +45ms
electron-workers:manager killing all workers.. +0ms
`https://gitlab.coko.foundation/fchasen/vivliostyle-electron/-/issues/1CLI Timeout2017-04-09T02:01:50ZFred ChasenCLI TimeoutI downloaded the CLI and it looks like it installed on my mac ok using the one liner from gitlab. But, I haven't been able to get it to paginate an html file. The command starts things processing, but it times out after 5 minutes ("ded...I downloaded the CLI and it looks like it installed on my mac ok using the one liner from gitlab. But, I haven't been able to get it to paginate an html file. The command starts things processing, but it times out after 5 minutes ("dedicated-process-strategy conversion timeout"). I've attached the terminal command along with the debugging output that I'm getting. I've tried this with very simple and more complex html files. Any ideas?Fred ChasenFred Chasen