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

Crash when using crypto on Linux #6778

Closed
mheppner opened this issue Aug 31, 2018 · 2 comments
Closed

Crash when using crypto on Linux #6778

mheppner opened this issue Aug 31, 2018 · 2 comments

Comments

@mheppner
Copy link

NWJS Version : 0.31.5
Operating System : CentOS 7 Linux 3.10.0-862.9.1.el7.x86_64
Node version : v8.11.3

Expected behavior

When requiring crypto module, NW.js immediately crashes.

Actual behavior

On Linux, any time crypto is used, NW.js immediately crashes after launched, with no error messages. Nothing appears in the CLI, and I can't get the browser console to open fast enough to see if any errors exist.

The same codebase with the same NW.js version on Windows works as expected.

How to reproduce

declare var nw: any;
const crypto = nw.require('crypto');

console.log('test', crypto.randomBytes(16));

This issue was discovered by including the uuid module, which uses crypto for random number generation.

There are other crypto issues (#6251, #713, #540) but they don't seem directly related, and I'm not even sure how to get an error log or crash to be generated by NW.js. If it's because of #540, how can I use the uuid module if it's importing the library with the variable name of crypto?

@rogerwang
Copy link
Member

Could you please try with latest version? It seems working for me here.

@rogerwang
Copy link
Member

close until more information is available.

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

2 participants