Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout issue #459

Open
Ctucker9233 opened this issue Nov 17, 2019 · 3 comments
Open

Timeout issue #459

Ctucker9233 opened this issue Nov 17, 2019 · 3 comments

Comments

@Ctucker9233
Copy link

I get this timeout error when I use electron-to-html to convert an html file to pdf.

{ Error: Worker Timeout, the worker process does not respond after 10000 ms
at Timeout._onTimeout (C:\Users\Owner\Desktop\code\PDF-Profile-Generator\node_modules\electron-workers\lib\ElectronManager.js:377:21)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
workerTimeout: true,
message:
'Worker Timeout, the worker process does not respond after 10000 ms',
electronTimeout: true }

Here's the js call:
var convertFactory = require('electron-html-to');

        var conversion = convertFactory({
            converterPath: convertFactory.converters.PDF
        });

        conversion({ file: './profile.html' }, function (err, result) {
            if (err) {
                return console.error(err);
            }

            console.log(result.numberOfPages);
            console.log(result.logs);
            result.stream.pipe(fs.createWriteStream(__dirname + '/profile.pdf'));
            conversion.kill();

Any assistance with an extra parameters I need to use would be helpful.

@StephanieZ
Copy link

@Ctucker9233 I had to back down to an earlier version of electron and electron-html-to to get this to work properly again. I went back to "electron": "^5.0.12", "electron-html-to": "^2.6.0". In case you need a workaround in the meantime.

@bjrmatos
Copy link
Owner

@StephanieZ yes, i think new versions of electron have a bit of different api for startup, so it probably breaks some internal calls.. i will try to check the support for these new versions (should be 6.x.x, 7.x.x), as always PR welcome if someone can find some time before i can get to this.

@Ctucker9233 just to confirm, i guess you are using a version of electron > 5.x.x, right?

@Ctucker9233
Copy link
Author

@bjrmatos Most likely. I simply did npm install and I'm sure it grabbed the newest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants