chaitin / passionfruit

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

cant complete installation for passionfruit #48

Closed iamsidharthbnair closed 5 years ago

iamsidharthbnair commented 5 years ago

following error is throwing up whenever I tried to install passion fruit

C:\WINDOWS\system32>npm install -g passionfruit
C:\Users\sidharth.b\AppData\Roaming\npm\passionfruit -> C:\Users\sidharth.b\AppData\Roaming\npm\node_modules\passionfruit\bin\cli.js

> frida@12.5.0 install C:\Users\sidharth.b\AppData\Roaming\npm\node_modules\passionfruit\node_modules\frida
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.2.0 runtime=node arch=x64 libc= platform=win32)

C:\Users\sidharth.b\AppData\Roaming\npm\node_modules\passionfruit\node_modules\frida>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp: binding.gyp not found (cwd: C:\Users\sidharth.b\AppData\Roaming\npm\node_modules\passionfruit\node_modules\frida) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:257:12)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\sidharth.b\AppData\Roaming\npm\node_modules\passionfruit\node_modules\frida
gyp ERR! node -v v12.2.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.6 (node_modules\passionfruit\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.6: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frida@12.5.0 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the frida@12.5.0 install 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!     C:\Users\sidharth.b\AppData\Roaming\npm-cache\_logs\2019-05-10T19_25_51_318Z-debug.log

C:\WINDOWS\system32>
ChiChou commented 5 years ago

The frida npm module failed to be installed. Have you tried Node.js Long Time Support version (currently 10.15.3)?

mr-gosh commented 5 years ago

The frida npm module failed to be installed. Have you tried Node.js Long Time Support version (currently 10.15.3)?

i have the same problem and downgraded to 10.15 - still having the same problem.

:/usr/lib# npm install -g passionfruit --unsafe-perm
/usr/bin/passionfruit -> /usr/lib/node_modules/passionfruit/bin/cli.js

> frida@12.5.5 install /usr/lib/node_modules/passionfruit/node_modules/frida
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.15.3 runtime=node arch=arm libc= platform=linux)
gyp: binding.gyp not found (cwd: /usr/lib/node_modules/passionfruit/node_modules/frida) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.19.42-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/passionfruit/node_modules/frida
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.6 (node_modules/passionfruit/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.6: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frida@12.5.5 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the frida@12.5.5 install 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!     /root/.npm/_logs/2019-05-16T11_38_07_723Z-debug.log
ChiChou commented 5 years ago

@mr-gosh Can you post that 2019-05-16T11_38_07_723Z-debug.log here? Thanks

mr-gosh commented 5 years ago

2019-05-16T11_38_07_723Z-debug.log

mr-gosh commented 5 years ago

@mr-gosh Can you post that 2019-05-16T11_38_07_723Z-debug.log here? Thanks

@ChiChou - did you have time to look into it?

ChiChou commented 5 years ago

@mr-gosh

It seems the problem is that npm fails to skip the optional dependency fsevents and this problem only occurs on Windows and Linux. I am currently on a business trip have no test machine to check.

iamsidharthbnair commented 5 years ago

Node.js Long Time Support version (currently 10.15.3) this worked for me with the installation part. Thanks alot @ChiChou

ChiChou commented 5 years ago

It's definitely npm's bug: https://github.com/npm/npm/issues/14042

People that also suffering from the exact bug: https://stackoverflow.com/questions/48898312/npm-error-unsupported-platform-for-fsevents-when-deploying-to-azure https://github.com/angular/angular/issues/13935

These articles have suggested some solution:

  1. npm install --no-optional to skip optional dependencies
  2. Upgrade npm to the latest. But it seems @mr-gosh is already on the newest
  3. npm install -f to force continue installation

I don't have access to a Windows machine to check yet.

iamsidharthbnair commented 5 years ago

@ChiChou Error: Unable to communicate with remote frida-server; please ensure that major versions match and that the remote Frida has the feature you are trying to use

Version In use: Frida version in use: 12.5.6 iOS version:11.2

mr-gosh commented 5 years ago

i now tried to let him install this by using npm install -g passionfruit --unsafe-perm --no-optional -f he ran trough - but threw a lot of errors.

when i try to start passionfruit it outputs this:

root@passionfruitpi:~# passionfruit 
/usr/lib/node_modules/passionfruit/node_modules/bindings/bindings.js:135
  throw err;
  ^

Error: Could not locate the bindings file. Tried:
 → /usr/lib/node_modules/passionfruit/node_modules/frida/build/frida_binding.node
 → /usr/lib/node_modules/passionfruit/node_modules/frida/build/Debug/frida_binding.node
 → /usr/lib/node_modules/passionfruit/node_modules/frida/build/Release/frida_binding.node
 → /usr/lib/node_modules/passionfruit/node_modules/frida/out/Debug/frida_binding.node
 → /usr/lib/node_modules/passionfruit/node_modules/frida/Debug/frida_binding.node
 → /usr/lib/node_modules/passionfruit/node_modules/frida/out/Release/frida_binding.node
 → /usr/lib/node_modules/passionfruit/node_modules/frida/Release/frida_binding.node
 → /usr/lib/node_modules/passionfruit/node_modules/frida/build/default/frida_binding.node
 → /usr/lib/node_modules/passionfruit/node_modules/frida/compiled/12.3.1/linux/arm/frida_binding.node
 → /root/frida_binding.node
    at bindings (/usr/lib/node_modules/passionfruit/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (/usr/lib/node_modules/passionfruit/node_modules/frida/dist/index.js:17:17)
    at Module._compile (internal/modules/cjs/loader.js:774:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
    at Module.load (internal/modules/cjs/loader.js:641:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Module.require (internal/modules/cjs/loader.js:681:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (/usr/lib/node_modules/passionfruit/app.js:7:15)
    at Module._compile (internal/modules/cjs/loader.js:774:30) {
  tries: [
    '/usr/lib/node_modules/passionfruit/node_modules/frida/build/frida_binding.node',
    '/usr/lib/node_modules/passionfruit/node_modules/frida/build/Debug/frida_binding.node',
    '/usr/lib/node_modules/passionfruit/node_modules/frida/build/Release/frida_binding.node',
    '/usr/lib/node_modules/passionfruit/node_modules/frida/out/Debug/frida_binding.node',
    '/usr/lib/node_modules/passionfruit/node_modules/frida/Debug/frida_binding.node',
    '/usr/lib/node_modules/passionfruit/node_modules/frida/out/Release/frida_binding.node',
    '/usr/lib/node_modules/passionfruit/node_modules/frida/Release/frida_binding.node',
    '/usr/lib/node_modules/passionfruit/node_modules/frida/build/default/frida_binding.node',
    '/usr/lib/node_modules/passionfruit/node_modules/frida/compiled/12.3.1/linux/arm/frida_binding.node',
    '/root/frida_binding.node'
  ]
}

by the way - that i try to install this on a rpi shouldn't be a problem right?

the latest log is attached... - i really don't get it. 2019-05-23T07_30_17_545Z-debug.log

ChiChou commented 5 years ago

@sidh104 I'll try to upgrade the frida dependency to the latest to resolve this

ChiChou commented 5 years ago

@mr-gosh I don't know if frida has prebuilt package for rpi (ARM). You may need to build from source

iamsidharthbnair commented 5 years ago

@ChiChou Yes, Thanks alot... Let us know once its upgraded and I will check from my end

iamsidharthbnair commented 5 years ago

@ChiChou with the latest update of frida its working now. Thanks alot for your support

vincentcox commented 5 years ago

Unfortunately, I have the same issue on Ubuntu:

npm install -g passionfruit --unsafe-perm
/usr/bin/passionfruit -> /usr/lib/node_modules/passionfruit/bin/cli.js

> frida@12.6.8 install /usr/lib/node_modules/passionfruit/node_modules/frida
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=11.15.0 runtime=node arch=x64 libc= platform=linux)
gyp: binding.gyp not found (cwd: /usr/lib/node_modules/passionfruit/node_modules/frida) while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:193:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:255:12)
gyp ERR! System Linux 4.20.0-042000-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/passionfruit/node_modules/frida
gyp ERR! node -v v11.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.7 (node_modules/passionfruit/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frida@12.6.8 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the frida@12.6.8 install 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!     /root/.npm/_logs/2019-06-20T10_21_59_325Z-debug.log
root@usbstick:/home/vincent# 
ChiChou commented 5 years ago

@vincentcox No prebuilt binaries found is the reason. Downgrade to node.js LTS (currently 10.16.0) and retry

vincentcox commented 5 years ago

Thanks that solved it! In the end I had to use "sudo su" and "npm install -g passionfruit --unsafe-perm" to get it install.

rustymagnet3000 commented 4 years ago

Thanks @ChiChou and @vincentcox. I upgraded everything ( Frida, NPM, node ).

It worked for me after the following:

bin node -v                             
v11.x.x
npm install -g n
n 10.16.0
npm install -g passionfruit --unsafe-perm