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

App inspector hangs on start up and fails to load #229

Closed tking16 closed 5 years ago

tking16 commented 5 years ago

When I start app inspector via entering my UDID, the inspector gets as far as: >> XCTestWD version: 1.4.16

And will not go any further and gives no error message,

What I've tried already: Uninstalling and reinstalling app-inspector - doesn't work uninstalling and reinstalling xctestwd - doesn't resolve issue

Environment check:

$ npm i macaca-cli -g && macaca doctor
 + macaca-cli@2.1.12
 updated 1 package in 3.997s

   macaca-doctor version: 2.0.16

   Node.js checklist:

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

   iOS checklist:

   Xcode Command Line Tools is ready, version: 2349.
   xcodebuild version: 10.1
 { Error: Command failed: which iproxy

     at ChildProcess.exithandler (child_process.js:289:12)
     at ChildProcess.emit (events.js:182:13)
     at maybeClose (internal/child_process.js:961:16)
     at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5) killed: false, code: 1, signal: null, cmd: 'which iproxy' }
   Command Line Tools: iproxy[usbmuxd] is uninstalled
   Command Line Tools: ios_webkit_debug_proxy is uninstalled

   Android checklist:

   JAVA version is `1.8`
   JAVA_HOME is not set
   ANDROID_HOME is set to `/Users/theo.king/Library/Android/sdk`
   Platforms is set to `/Users/theo.king/Library/Android/sdk/platforms/android-28`
   ADB tool is set to `/Users/theo.king/Library/Android/sdk/platform-tools/adb`
   Command Line Tools: gradle is uninstalled

  Installed driver list:

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

- app inspector version / 版本号:

 2.0.24

- os version / 系统:

Mac OS High Sierra 10.13.6 

- device  information / 设备版本:
iPhone XR Simulator - 12.1

- terminal log / 终端输出信息:

 >> server.js:16:12 [master] pid:7710 server start with config:
  { port: 5678,
   verbose: true,
   udid: 'xxxx',
   ip: '10.73.142.191',
   host: 'g116249mac',
   loaded_time: '2019-04-05 10:17:34' }
 >> app-inspector.js:45:12 [master] pid:7710 server start at: http://10.73.142.191:5678
 { Error: Command failed: /Users/theo.king/Library/Android/sdk/platform-tools/adb -s xxxx forward tcp:9001 tcp:9001
 * daemon not running; starting now at tcp:5037
 * daemon started successfully
 error: device 'xxxx' not found

     at ChildProcess.exithandler (child_process.js:289:12)
     at ChildProcess.emit (events.js:182:13)
     at maybeClose (internal/child_process.js:961:16)
     at Socket.stream.socket.on (internal/child_process.js:380:11)
     at Socket.emit (events.js:182:13)
     at Pipe._handle.close (net.js:599:12)
   killed: false,
   code: 1,
   signal: null,
   cmd:
    '/Users/theo.king/Library/Android/sdk/platform-tools/adb -s xxxx forward tcp:9001 tcp:9001' }

Thanks for the help further info: When I try reinstall app-inspector what I get in response is:

est
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 boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version.
npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version.
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.16 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:112
  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.16 (node_modules/app-inspector/node_modules/xctestwd):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xctestwd@1.4.16 install: `node ./scripts/install.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ app-inspector@2.0.24
updated 1 package in 12.4s
macaca-bot commented 5 years ago

This is the translated issue:


App inspector hangs on start up and fails to load

When I start app inspector via entering my UDID, the inspector gets as far as: >> XCTestWD version: 1.4.16

And will not go any further and gives no error message,

What I've tried already: Uninstalling and reinstalling app-inspector - doesn't work Uninstalling and reinstalling xctestwd - doesn't resolve issue

Environment check:

$ npm i macaca-cli -g && macaca doctor
  • macaca-cli@2.1.12 updated 1 package in 3.997s

macaca-doctor version: 2.0.16

Node.js checklist:

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

iOS checklist:

Xcode Command Line Tools is ready, version: 2349. xcodebuild version: 10.1 { Error: Command failed: which iproxy

at ChildProcess.exithandler (child_process.js:289:12) at ChildProcess.emit (events.js:182:13) at maybeClose (internal/child_process.js:961:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5) killed: false, code: 1, signal: null, cmd: 'which iproxy' } Command Line Tools: iproxy[usbmuxd] is uninstalled Command Line Tools: ios_webkit_debug_proxy is uninstalled

Android checklist:

JAVA version is 1.8 JAVA_HOME is not set ANDROID_HOME is set to /Users/theo.king/Library/Android/sdk Platforms is set to /Users/theo.king/Library/Android/sdk/platforms/android-28 ADB tool is set to /Users/theo.king/Library/Android/sdk/platform-tools/adb Command Line Tools: gradle is uninstalled

  Installed driver list:

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

 2.0.24

Mac OS High Sierra 10.13.6

server.js:16:12 [master] pid:7710 server start with config: { port: 5678, verbose: true, udid: 'xxxx', ip: '10.73.142.191', host: 'g116249mac', loaded_time: '2019-04-05 10:17:34' } app-inspector.js:45:12 [master] pid:7710 server start at: http://10.73.142.191:5678 { Error: Command failed: /Users/theo.king/Library/Android/sdk/platform-tools/adb -s xxxx forward tcp:9001 tcp:9001

  • daemon not running; starting now at tcp:5037
  • daemon started successfully error: device 'xxxx' not found

at ChildProcess.exithandler (child_process.js:289:12) at ChildProcess.emit (events.js:182:13) at maybeClose (internal/child_process.js:961:16) at Socket.stream.socket.on (internal/child_process.js:380:11) at Socket.emit (events.js:182:13) at Pipe._handle.close (net.js:599:12) killed: false, code: 1, signal: null, cmd: '/Users/theo.king/Library/Android/sdk/platform-tools/adb -s xxxx forward tcp:9001 tcp:9001' }

Thanks for the help Further info: When I try reinstall app-inspector what I get in response is:

Est
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 boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version.
Npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version.
Npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version.
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.16 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:112
  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.16 (node_modules/app-inspector/node_modules/xctestwd):
Npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xctestwd@1.4.16 install: `node ./scripts/install.js`
Npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ app-inspector@2.0.24
Updated 1 package in 12.4s
paradite commented 5 years ago

just pushed a fix, please try uninstall and install the latest version.

xudafeng commented 5 years ago

https://github.com/macacajs/XCTestWD/commit/ab3989137f73b0c0a5d1821b2c2908841a537f43

tking16 commented 5 years ago

Thanks guys but it's still not working. Is the latest fix compatible with version 2.0.24 of app-inspector?

paradite commented 5 years ago

we have multiple people confirming that latest version is working. Please check to make sure your version of xctestwd is the latest (1.4.18) when re-installing app-inspector:

Screenshot 2019-04-08 at 2 27 48 PM

if not, most likely it is due to your network issue.

tking16 commented 5 years ago

I definitely have 1.4.18 installed now. When I run app-inspector -u xxxxxx --verbose I get:

>> server.js:16:12 [master] pid:10276 server start with config:
 { port: 5678,
  verbose: true,
  udid: '9BD098A2-BD61-48E2-9FFB-DA68B826C691',
  ip: 'xx.xx.xxx.xxx',
  host: 'g116249mac',
  loaded_time: '2019-04-08 11:22:27' }
>> app-inspector.js:45:12 [master] pid:10276 server start at: http://10.73.141.239:5678
>> xctest-client.js:56:14 [master] pid:10276 project path: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
>> xctest-client.js:283:14 [master] pid:10276 xcode version: 10.1
>> XCTestWD version: 1.4.18
>> xctest-client.js:230:20 [master] pid:10276 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
>> xctest-client.js:230:20 [master] pid:10276 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
>> xctest-client.js:230:20 [master] pid:10276 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
>> xctest-client.js:322:14 [master] pid:10276 killing runnerProc pid: 10281
>> xctest-client.js:242:16 [master] pid:10276 xctest client exit with code: 65, signal: null

If that helps in any way

paradite commented 5 years ago

oh your Xcode version is 10.1, please update to 10.2.

tking16 commented 5 years ago

Thanks @paradite , after updating my Xcode the app-inspector works now 👍🏾