macacajs / app-inspector

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

app-inspector报错,请求帮助~ #178

Closed GeorgeZh closed 6 years ago

GeorgeZh commented 6 years ago
>> server.js:16:12 [master] pid:37558 server start with config:
 { port: 5679,
  verbose: true,
  udid: 'd5a0a3ee97d4b556098c03718e9d687095ac0522',
  ip: '10.0.1.170',
  host: 'GeorgeZ.local',
  loaded_time: '2018-03-07 17:23:34' }
>> app-inspector.js:45:12 [master] pid:37558 server start at: http://10.0.1.170:5679
>> xctest-client.js:56:14 [master] pid:37558 project path: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
>> xctest-client.js:268:14 [master] pid:37558 Fail to start xctest: exec /usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "/Library/Developer/Info.plist" error with: Error: Command failed: /usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "/Library/Developer/Info.plist"
Print: Entry, "CFBundleShortVersionString", Does Not Exist

exec /usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "/Library/Developer/Info.plist" error with: Error: Command failed: /usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "/Library/Developer/Info.plist"
Print: Entry, "CFBundleShortVersionString", Does Not Exist

>> iOS device started: d5a0a3ee97d4b556098c03718e9d687095ac0522
>> inspector start at: http://10.0.1.170:5679
  <-- GET /
>> helper.js:94:16 [master] pid:37558 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8001

  Error: connect ECONNREFUSED 127.0.0.1:8001
      at Object.exports._errnoException (util.js:1050:11)
      at exports._exceptionWithHostPort (util.js:1073:20)
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1093:14)
xudafeng commented 6 years ago

@GeorgeZh

默认运行在5678端口,你可以杀一下进程,避免端口占用

另外你使用的是iOS真机,需要按照文档添加证书。可以先使用模拟器。

GeorgeZh commented 6 years ago

@xudafeng 感谢您的回复~ 我在运行时确认了一下,5678端口没有被占用 然后我iOS真机是已添加证书了的 尝试使用模拟器遇到了一样的问题 请问还有其它办法吗?

GeorgeZh commented 6 years ago

上面的问题已解决。 1.我的xcode是在其它来源获取的,安装的时候没有放到“应用程序”目录,导致找不到xcodebuild命令。把xcode移到“应用程序”目录解决 2.XCTestWD找不到依赖库,使用Carthage update安装解决

xudafeng commented 6 years ago

@GeorgeZh

使用 macaca doctor 命令可以检查的