Open xiewh7 opened 2 years ago
The problem is lack of cleanup, doing location.reload()
or advancing to any different html page crashes, and doing iohook.unload()
often crashes.
You can see my experiments towards this end at https://github.com/marcelblum/iohook but I didn't get very far and ended up needing to use Electron pre-v14 anyway.
@marcelblum But we need to use Electron V16. How can we fix this problem in Electron after-v14?
I'm not sure, I probably don't have the c++ expertise to solve this, but like I said you can see what progress I made towards it in my fork. If you don't ever need to do a reload()
or load a different html page in the same renderer BrowserWindow
then the problem can probably be ignored...
@WilixLead / @Djiit Can you help with the above PR? I am not familiar with C++, to help out. It would be great though if we can get this working again. Electron is currently at version 21.
Hi is this still a relevant change? We can merge it if so.
fix: 'non-context-aware' error for Electron
Description
The latest releases of Electron prevent "non-context-aware" native modules. By Replacing NODE_MODULE with NAN_MODULE_WORKER_ENABLED this fixes the errors for Electron.