chaitin / passionfruit

[WIP] Crappy iOS app analyzer
MIT License
1.67k stars 226 forks source link

Unhandled rejection in general tab for app #55

Closed BreakfastSerial closed 5 years ago

BreakfastSerial commented 5 years ago

I have an iOS app I'm trying to load in Passionfruit (version 0.5.3; Frida version 12.6.12)

When I try to open the app on the general tab I receive the following error message in the web application: unhandled rejection: ReferenceError: identifier 'Set' undefined

and the console logs:

Uncaught RPC ReferenceError: identifier 'Set' undefined
    at [anon] (duk_js_var.c:1208)
    at checksec (/script1.js:80)
    at e (frida/runtime/message-dispatcher.js:45)
    at t (frida/runtime/message-dispatcher.js:25)
method: info args: null

If i try to update Passionfruit (even to a specific version e.g. `npm install -g passionfruit@0.5.0) I receive the following

npm install -g passionfruit@latest
/usr/local/Cellar/node/10.9.0/bin/passionfruit -> /usr/local/Cellar/node/10.9.0/lib/node_modules/passionfruit/bin/cli.js

> passionfruit@0.5.5 postinstall /usr/local/Cellar/node/10.9.0/lib/node_modules/passionfruit
> node scripts/post-install.js

internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module '/usr/local/Cellar/node/10.9.0/lib/node_modules/passionfruit/node_modules/sqlite3/lib/binding/node-v64-darwin-x64/node_sqlite3.node'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/usr/local/Cellar/node/10.9.0/lib/node_modules/passionfruit/node_modules/sqlite3/lib/sqlite3.js:4:15)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! passionfruit@0.5.5 postinstall: `node scripts/post-install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the passionfruit@0.5.5 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/theuser/.npm/_logs/2019-08-06T13_02_59_439Z-debug.log
BreakfastSerial commented 5 years ago

I am not sure what changed, but today, for the very same iOS app, Passionfruit prints the following error in the console:

An unhandledRejection occurred: 
Rejection: Error: GDBus.Error:re.frida.Error.InvalidOperation: JIT may only be enabled before the first script is created
Error: GDBus.Error:re.frida.Error.InvalidOperation: JIT may only be enabled before the first script is created
ChiChou commented 5 years ago

Since 0.5.0 we use v8 as the javascript interpreter. You need to upgrade frida to the latest version on iOS device

ChiChou commented 5 years ago

From the error stack it is Duktape obviously

BreakfastSerial commented 5 years ago

That was it, thank you and sorry for the issue!