-
Notifications
You must be signed in to change notification settings - Fork 155
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
Comments
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 |
@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... |
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. |
That makes it a little better! I'm doing a big upgrade of all of my
dependencies right now so I haven't got to fixing it over to use IPC.
That being sad, my offer to help maintain this project still stands! I've
been using it about 5 years!
…On Mon, Jun 13, 2022, 7:52 PM latenightgames ***@***.***> wrote:
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.
—
Reply to this email directly, view it on GitHub
<#264 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAASEM5KRSPLPKDA63SW2HDVO7XXLANCNFSM4NZXTBLA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
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: They setup a new repo here but it seems like it didn't get past the kick off talk: |
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. |
I was just about to mention your project too ;) Although I don't find IPC any real hassle to use. |
Why did you tag me for this? 👀 |
@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! |
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.
The text was updated successfully, but these errors were encountered: