frida / frida-node

Frida Node.js bindings
282 stars 66 forks source link

Error occurred when import frida #43

Closed xiaozhuai closed 3 years ago

xiaozhuai commented 5 years ago

I am using frida with electron, when import frida I got this

Uncaught TypeError: Cannot read property 'indexOf' of undefined
    at Function.getFileName (bindings.js?dfc1:178)
    at bindings (bindings.js?dfc1:82)
    at eval (native.js?1459:4)
    at Object../node_modules/frida/dist/native.js (app.js:3721)
    at __webpack_require__ (app.js:727)
    at fn (app.js:101)
    at eval (cancellable.js?607d:3)
    at Object../node_modules/frida/dist/cancellable.js (app.js:3661)
    at __webpack_require__ (app.js:727)
    at fn (app.js:101)
xiaozhuai commented 5 years ago

see https://github.com/TooTallNate/node-bindings/issues/50

farism commented 5 years ago

I am seeing the same on frida@12.7.16

And yea, seems to be an issue with webpack/electron. I don't have this problem when using require in a regular js file and run that directly with node. But using electron-renderer target with webpack is problematic.

warpdesign commented 5 years ago

I am having the same error. I tried including the native lib I use from the main-process and got the same error.