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

SSL handshake error #307

Closed
drmrbrewer opened this issue Oct 19, 2021 · 6 comments · Fixed by #500
Closed

SSL handshake error #307

drmrbrewer opened this issue Oct 19, 2021 · 6 comments · Fixed by #500
Assignees
Labels

Comments

@drmrbrewer
Copy link

Recently I'm getting an SSL handshake error when calling a remote url from within my worker script. I suspect it relates to this issue but I don't understand enough about it to be sure. The error doesn't occur if I use http rather than https.

I see that phantom.js has various command line switches which may be relevant, e.g. --ignore-ssl-errors=true and --ssl-protocol=any... but I'm not sure how to pass these switches to phantom.js via the node export server.

Note that I'm using the export server as a node module and passing in a custom worker via exporter.initPool().

@KacperMadej
Copy link

Hello @drmrbrewer ,

Thank you for reporting the problem.

We are currently in the middle of implementing some big changes for the export server - changing from outdated PhantomJS to Puppeteer. A beta version for testing is expected later this year. The transition is planned for Q4 2021 - Q1 2022.

Because of this, all minor fixes are placed on hold and will be picked up after the transition - in case the transition itself won't fix the problems. If the problem that you have currently is critical for security reasons it will be fixed right away, but other problems will have to wait a bit. While waiting we will be trying to suggest a workaround solution for you.

Thank you for your patience and understanding.

@drmrbrewer
Copy link
Author

Hi @KacperMadej is a puppeteer-based beta version nearly ready yet? Can't wait... :)

@dpetrov
Copy link

dpetrov commented Mar 22, 2022

hey @KacperMadej how is the transition coming along? Is this still WIP and planned Q1 2022 or postponed/delayed? Thank you for the awesome work.

@KacperMadej
Copy link

The current state is described here

@jszuminski jszuminski added the bug label Sep 6, 2023
@PaulDalek PaulDalek self-assigned this Nov 22, 2023
@Nicolas-Boreal-is
Copy link

I think I found the solution to this problem (mind you, I'm a junior dev, so my solution might not be the best)
In the following code (in node-export-server/lib/server/server.js):

if (key && cert) {
        // Main server instance (HTTPS)
        const httpsServer = https.createServer(app);

        // Attach error handlers and listen to the server
        attachErrorHandlers(httpsServer);

        // Listen
        httpsServer.listen(serverConfig.ssl.port, serverConfig.host);

        log(
          3,
          `[server] Started HTTPS server on ${serverConfig.host}:${serverConfig.ssl.port}.`
        );
      }

The variables key and cert are verified, but not used anywhere. After some testing, I found that https.createServer({key: key, cert: cert}, app) solves the ssl handshake error and the empty responses. This issue is old, but I hope my comment is helpful to someone.

Happy coding!

@jszuminski
Copy link
Contributor

Thanks for the hint @Nicolas-Boreal-is!

I've created a pull request based on your suggestion: #500 and this will be a part of our next release (v4.0.0) where this should no longer be a problem.

Feel free to review it and test it out.

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

Successfully merging a pull request may close this issue.

6 participants