macacajs / app-inspector

App-inspector is a mobile UI viewer in browser.
https://macacajs.github.io/app-inspector/
MIT License
389 stars 78 forks source link

Error updating app-inspector #225

Closed jade685 closed 5 years ago

jade685 commented 5 years ago

I was using app inspector fine before this update, but after this update, my 'xctestwd' seems got deleted.

I tried reinstall app inspector, but I got error : Carthage is not existed, please reinstall! But I've already installed Carthage. So I'm really confused. Please help, thanks!

I will put the log in the end.

P.S. I'm only using iOS, so you should ignore Android checklist.

Environment check:

$ npm i macaca-cli -g && macaca doctor

 macaca-doctor version: 2.0.16

  Node.js checklist:

  node env: /usr/local/bin/node
  node version: v10.15.0

  iOS checklist:

  Xcode Command Line Tools is ready, version: 2354.
  xcodebuild version: 10.1
  iproxy[usbmuxd] is installed at: `/usr/local/bin/iproxy`
  ios_webkit_debug_proxy is installed at: `/usr/local/bin/ios_webkit_debug_proxy`

  Android checklist:

  JAVA version is `1.8`
  JAVA_HOME is set to `/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home`
  ANDROID_HOME is set to `/Users/yaoweiqi/Applications/android-sdk-macosx`
  Android SDK Platforms directory is not exist, please install the whole thing
  Command Line Tools: gradle is uninstalled

  Installed driver list:

  ios: 2.0.35
  location: /usr/local/lib/node_modules/macaca-ios

try app-inspector -u xxxx --verbose for more log detail.

Log for npm i app-inspector -g:

npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated node-uuid@1.4.7: Use uuid module instead
/usr/local/bin/inspector -> /usr/local/lib/node_modules/app-inspector/bin/app-inspector.js
/usr/local/bin/app-inspector -> /usr/local/lib/node_modules/app-inspector/bin/app-inspector.js

> xctestwd@1.4.6 install /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd
> node ./scripts/install.js

start to mv /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd-frameworks/Carthage /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd
mv: no such file or directory: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd-frameworks/Carthage

/usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/scripts/install.js:104
  throw _.chalk.red('Carthage is not existed, please reinstall!');
  ^
Carthage is not existed, please reinstall!
npm WARN react-syntax-highlighter@7.0.4 requires a peer of react@>= 0.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xctestwd@1.4.6 (node_modules/app-inspector/node_modules/xctestwd):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xctestwd@1.4.6 install: `node ./scripts/install.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ app-inspector@2.0.24
updated 1 package in 44.74s

Log for brew install carthage:

Warning: carthage 0.31.2 is already installed and up-to-date
To reinstall 0.31.2, run `brew reinstall carthage`
macaca-bot commented 5 years ago

This is the translated issue:


Error updating app-inspector

I was using app inspector fine before this update, but after this update, my 'xctestwd' seems got deleted.

I tried reinstall app inspector, but I got error : Carthage is not existed, please reinstall! But I've already installed Carthage. So I'm really confused. Please help, thanks!

I will put the log in the end.

P.S. I'm only using iOS, so you should ignore Android checklist.

Environment check:

$ npm i macaca-cli -g && macaca doctor

 Macaca-doctor version: 2.0.16

  Node.js checklist:

  Node env: /usr/local/bin/node
  Node version: v10.15.0

  iOS checklist:

  Xcode Command Line Tools is ready, version: 2354.
  Xcodebuild version: 10.1
  Iproxy[usbmuxd] is installed at: `/usr/local/bin/iproxy`
  Ios_webkit_debug_proxy is installed at: `/usr/local/bin/ios_webkit_debug_proxy`

  Android checklist:

  JAVA version is `1.8`
  JAVA_HOME is set to `/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home`
  ANDROID_HOME is set to `/Users/yaoweiqi/Applications/android-sdk-macosx`
  Android SDK Platforms directory is not exist, please install the whole thing
  Command Line Tools: gradle is uninstalled

  Installed driver list:

  Ios: 2.0.35
  Location: /usr/local/lib/node_modules/macaca-ios

try app-inspector -u xxxx --verbose for more log detail.

Log for npm i app-inspector -g:

Npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
Npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
Npm WARN deprecated node-uuid@1.4.7: Use uuid module instead
/usr/local/bin/inspector -> /usr/local/lib/node_modules/app-inspector/bin/app-inspector.js
/usr/local/bin/app-inspector -> /usr/local/lib/node_modules/app-inspector/bin/app-inspector.js

> xctestwd@1.4.6 install /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd
> node ./scripts/install.js

Start to mv /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd-frameworks/Carthage /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd
Mv: no such file or directory: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd-frameworks/Carthage

/usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/scripts/install.js:104
  Throw _.chalk.red('Carthage is not existed, please reinstall!');
  ^
Carthage is not existed, please reinstall!
Npm WARN react-syntax-highlighter@7.0.4 requires a peer of react@>= 0.14.0 but none is installed. You must install peer dependencies yourself.
Npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xctestwd@1.4.6 (node_modules/app-inspector/node_modules/xctestwd):
Npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xctestwd@1.4.6 install: `node ./scripts/install.js`
Npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ app-inspector@2.0.24
Updated 1 package in 44.74s

Log for brew install carthage:

Warning: carthage 0.31.2 is already installed and up-to-date
To reinstall 0.31.2, run `brew reinstall carthage`
paradite commented 5 years ago

I cannot reproduce the issue. It is working fine for me. Try npm uninstall -g app-inspector, then npm i app-inspector -g. Also, you can try manually doing npm i -g xctestwd-frameworks and see if it contains Carthage inside usr/local/lib/node_modules/xctestwd-frameworks. It should be there.

jade685 commented 5 years ago

I tried npm uninstall -g app-inspector, then npm i app-inspector -g. I didn't get the error. And I got xctestwd, and it's working fine now! Thanks a lot @paradite !

I tried second method as well. I tried cd usr/local/lib/node_modules/xctestwd-frameworks after npm i -g xctestwd-frameworks. But it says No such file or directory. So how do I find where Carthage was installed?

p.s. I tried macaca doctor, I still didn't see information regarding Carthage.


  macaca-doctor version: 2.0.16

  Node.js checklist:

  node env: /usr/local/bin/node
  node version: v10.15.0

  iOS checklist:

  Xcode Command Line Tools is ready, version: 2354.
  xcodebuild version: 10.1
  iproxy[usbmuxd] is installed at: `/usr/local/bin/iproxy`
  ios_webkit_debug_proxy is installed at: `/usr/local/bin/ios_webkit_debug_proxy`

  Android checklist:

  JAVA version is `1.8`
  JAVA_HOME is set to `/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home`
  ANDROID_HOME is set to `/Users/yaoweiqi/Applications/android-sdk-macosx`
  Android SDK Platforms directory is not exist, please install the whole thing
  Command Line Tools: gradle is uninstalled

  Installed driver list:
jade685 commented 5 years ago

Also I used to have two XCTestWD.xcodeproj, one in /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD and another in /usr/local/lib/node_modules/masaca-ios/node_modules/xctestwd/XCTestWD. And I signed them both.

Though I only have one in app-inspector now, the other one in masaca-ios disappeared after I tried to run app-inspector before I solve this error.

So what's the difference between these two XCTestWD? Thank you!

paradite commented 5 years ago

When you install app-inspector, npm installs its dependencies including xctestwd inside app-inspector/node_modules. masaca-ios/node_modules/xctestwd will only appear when you do npm install masaca-ios and only disappear when you do npm uninstall masaca-ios. So I don't think it has anything to do with uninstalling app-inspector. You can read more on node module resolution here: https://medium.freecodecamp.org/requiring-modules-in-node-js-everything-you-need-to-know-e7fbd119be8