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

Can't use frida with electron #55

Closed
alexisab opened this issue Aug 31, 2020 · 6 comments
Closed

Can't use frida with electron #55

alexisab opened this issue Aug 31, 2020 · 6 comments

Comments

@alexisab
Copy link

Hi ! I'm trying to use frida in my electron app but I get this error when starting the app :

(node:21768) UnhandledPromiseRejectionWarning: Error: The module '/home/alexis/perso/dofus-kraken/node_modules/frida/build/Release/frida_binding.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 80. Please try re-compiling or re-installing

Here are the version of the packages I use :

"electron": "^9.2.0",
"frida": "^12.11.11"

I'm on ubuntu 18.04 if it can help !

Thank you !

@FrenchYeti
Copy link

It commonly happens when your local NodeJS version is too high, or if you upgraded nodejs after frida-node install. In most of cases, removing frida-node, clearing npm cache, and reinstalling frida-node solves the issue.

@alexisab
Copy link
Author

alexisab commented Sep 1, 2020

I've clean my npm cache but it doesn't work better 😞 . I use node v12.16.3, it should work with frida because in an other project I also use this node version with frida but without electron and it works perfectly

@FrenchYeti
Copy link

Did you try to remove your node_modules folder and your package-lock.json from your project's root folder and to run 'npm install' ?

@alexisab
Copy link
Author

alexisab commented Sep 1, 2020

Yes I did

@oleavr
Copy link
Member

oleavr commented Sep 1, 2020

The issue is that you need to set two config options so the prebuild for Electron is fetched instead of the one for Node.js:

export npm_config_runtime=electron npm_config_target=9.0.0

Remember to wipe node_modules and re-run npm install after doing this, and be careful so these environment variables are set whenever you use npm in this context.

@oleavr oleavr closed this as completed Sep 1, 2020
@oleavr
Copy link
Member

oleavr commented Sep 1, 2020

@alexisab Just released Frida 12.11.12, which comes with prebuilds for Electron v10 and v11, in addition to v9. The next release will drop prebuilds for v9, so would recommend upgrading to Electron v10 (or v11) soon.

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

3 participants