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

Loading non-context-aware native module in renderer #264

Open
latenightgames opened this issue Jun 9, 2020 · 9 comments · May be fixed by #300
Open

Loading non-context-aware native module in renderer #264

latenightgames opened this issue Jun 9, 2020 · 9 comments · May be fixed by #300

Comments

@latenightgames
Copy link

Hi there,

It's generating this on load now:

(node:6644) Electron: Loading non-context-aware native module in renderer: '\node_modules\greenworks\lib\greenworks-win64.node'. This is deprecated, see [https://github.com/electron/electron/issues/18397].

Not a problem yet, but I guess it will be in future? Judging by the info on the Electron issue link, this might be a really easy fix? Or might not? I'm really not sure.

@latenightgames
Copy link
Author

Having had a bit of a look at the code, and judging by this example, getting Greenworks to be context aware shouldn't be too hard? It still works in the current version of Electron by explicitly setting allowRendererProcessReuse=false but that probably won't be true for long.

https://github.com/atom/node-keytar/pull/182/files

@SomeRanDev SomeRanDev linked a pull request Sep 2, 2021 that will close this issue
@framerate
Copy link

@Kruithne this seems breaking, any chance I can get admin access on this project? I can help maintain it since my game depends on it...

@latenightgames
Copy link
Author

I realised that this isn't actually a problem, because you shouldn't be loading it in a render process anyway. It's much better to load it in the main process and communicate with it from any renderers with IPC.

@framerate
Copy link

framerate commented Jun 14, 2022 via email

@patrickklug
Copy link
Member

Sorry if I misread this post but do you mean maintain greenworks itself?

There's been a long discussion with some other folks who wanted to reboot/take over greenworks here:
#306

They setup a new repo here but it seems like it didn't get past the kick off talk:

greenworksjs/greenworks#1

@ceifa
Copy link

ceifa commented Jun 14, 2022

Yes, it's better not to use node libraries inside the renderer process, but is also a pain to use the IPC api. If you want you can take a look at my project (steamworks.js) which is context-aware and still mantained.

@latenightgames
Copy link
Author

I was just about to mention your project too ;) Although I don't find IPC any real hassle to use.

@Kruithne
Copy link
Collaborator

@Kruithne this seems breaking, any chance I can get admin access on this project? I can help maintain it since my game depends on it...

Why did you tag me for this? 👀

@framerate
Copy link

framerate commented Jun 14, 2022

@Kruithne you were the most active dev on this and the PR linked is ~2 years old. I was hoping to get it merged/closed and you seemed like the most likely contributor to help (or to give me access to help).

Plus the new community fork wasn't linked anywhere I saw so I wasn't aware of it!

Thanks @patrickklug for the heads up, I'll take a look over there soon and see if I can help! Not sure if they need more help but more than willing to assist where I can!

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

Successfully merging a pull request may close this issue.

5 participants