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

[0.46.1] Trying to access process.env or global.process.env the application crashes.. #7493

Closed
DimPaDev opened this issue Jun 4, 2020 · 7 comments

Comments

@DimPaDev
Copy link

DimPaDev commented Jun 4, 2020

NWJS Version : 0.46.1
Operating System : Linux, Windows

Expected behavior

If you try to access process.env or global.process.env in the code or from the dev tools console the application should not crash.

Actual behavior

The nw.js application crashes completely without warnings or errors

How to reproduce

Just run a hello world application using this snippet :


<!DOCTYPE html>
<html>
  <head>
    <title>Hello World!</title>
  </head>
  <body>
    <h1>Hello World!</h1>
    We are using node.js <script>document.write(process.version)</script>.
    Trying to access <script>document.write(process.env)</script>.
    Trying to access <script>document.write(global.process.env)</script>.
  </body>
</html>
@DimPaDev
Copy link
Author

DimPaDev commented Jun 4, 2020

The same issue persists on Windows 10

@krneticz
Copy link

krneticz commented Jun 5, 2020

I have experienced the same. Tested on Windows Server 2016, process.env crashes nwjs. But I can also confirm that in nwjs 0.46.0 it DOES NOT cause the crash.

@rogerwang
Copy link
Member

This is fixed in git and will be available in the next nightly build.

@DimPaDev
Copy link
Author

DimPaDev commented Jun 6, 2020

I confirm this is fixed in the latest nightly build! Thanks

@krneticz
Copy link

krneticz commented Jun 8, 2020

@rogerwang @DimPaDev I just tested nwjs-sdk-v0.46.1-win-x64 and it still crashes when I do process.env from the console!

@DimPaDev
Copy link
Author

DimPaDev commented Jun 8, 2020

@krneticz this is fixed in the latest version (0.46.2)

@krneticz
Copy link

@DimPaDev you are right! It is fine in 0.46.2. Thanks!

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

No branches or pull requests

3 participants