Macaca app inspector 连接真机以后无法打开,网页端显示 Internal Server Error

gundamsing · 2017年05月10日 · 最后由 mielt 回复于 2018年04月16日 · 2510 次阅读

启动以后,网页端显示 Internal Server Error,求解答,谢谢!

server.js:16:12 [master] pid:8647 server start with config:
{ port: 5678,
verbose: true,
udid: '92152c9745d203e067835a0a82dec73ce27124f7',
ip: '10.42.32.117',
host: 'spryMBP.local',
loaded_time: '2017-05-11 16:18:39' }
app-inspector.js:43:12 [master] pid:8647 server start at: http://10.42.32.117:5678
xctest-client.js:63:14 [master] pid:8647 project path: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client start with port: 8001
xctest-client.js:243:14 [master] pid:8647 xcode version: 8.2.1
XCTestWD version: 1.0.7
xctest-client.js:191:14 [master] pid:8647 2017-05-11 16:18:40.981 xcodebuild[8653:201519] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/xyao/Library/Developer/Xcode/DerivedData/XCTestWD-evljajykmolwzobrozpobiggeeea/Logs/Test/4E65C771-BD39-4186-AD8A-09BA20862314/Session-XCTestWDUITests-2017-05-11_161840-oXuZtN.log

xctest-client.js:192:14 [master] pid:8647 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:191:14 [master] pid:8647 2017-05-11 16:18:40.982 xcodebuild[8653:201510] [MT] IDETestOperationsObserverDebug: (A37D032F-2F93-4F09-9593-77F68DFBA852) Beginning test session XCTestWDUITests-A37D032F-2F93-4F09-9593-77F68DFBA852 at 2017-05-11 16:18:40.980 with Xcode 8C1002 on target {
deviceSerialNumber: C39QKKFNGRWF
identifier: 92152c9745d203e067835a0a82dec73ce27124f7
deviceClass: iPhone
deviceName: sp_iPhone6S Plus_s2
deviceIdentifier: 92152c9745d203e067835a0a82dec73ce27124f7
productVersion: 10.2.1
buildVersion: 14D27
deviceSoftwareVersion: 10.2.1 (14D27)
deviceArchitecture: arm64
deviceTotalCapacity: 11747463168
deviceAvailableCapacity: 2078658560
deviceIsTransient: NO
ignored: NO
deviceIsBusy: NO
deviceIsActivated: YES
deviceActivationState: Activated
deviceType:
supportedDeviceFamilies: (
1
)
applications: (null)
provisioningProfiles: (null)
activityProgress: -2
activityTitle:

hasInternalSupport: NO
isSupportedOS: YES
developerDiskMountError: (null)
(null)
} (10.2.1 (14D27))

xctest-client.js:192:14 [master] pid:8647 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:191:14 [master] pid:8647 2017-05-11 16:18:41.212 xcodebuild[8653:201510] Error Domain=IDETestOperationsObserverErrorDomain Code=3 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/xyao/Library/Developer/Xcode/DerivedData/XCTestWD-evljajykmolwzobrozpobiggeeea/Logs/Test/4E65C771-BD39-4186-AD8A-09BA20862314/Session-XCTestWDUITests-2017-05-11_161840-oXuZtN.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/xyao/Library/Developer/Xcode/DerivedData/XCTestWD-evljajykmolwzobrozpobiggeeea/Logs/Test/4E65C771-BD39-4186-AD8A-09BA20862314/Session-XCTestWDUITests-2017-05-11_161840-oXuZtN.log}

xctest-client.js:192:14 [master] pid:8647 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:191:14 [master] pid:8647
Testing failed:
Signing for "XCTestWD" requires a development team. Select a development team in the project editor.

xctest-client.js:192:14 [master] pid:8647 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:191:14 [master] pid:8647 Code signing is required for product type 'Application' in SDK 'iOS 10.2'
** TEST FAILED **

The following build commands failed:
Check dependencies
(1 failure)

xctest-client.js:192:14 [master] pid:8647 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:279:14 [master] pid:8647 killing deviceLogProc pid: 8650
xctest-client.js:284:14 [master] pid:8647 killing runnerProc pid: 8653
xctest-client.js:290:14 [master] pid:8647 killing iproxyProc pid: 8652
xctest-client.js:202:14 [master] pid:8647 xctest client exit with code: 65, signal: null
xctest-client.js:157:16 [master] pid:8647 deviceconsole exit with code: null, signal: SIGKILL
xctest-client.js:271:14 [master] pid:8647 Fail to start xctest: undefined
undefined
iOS device started: 92152c9745d203e067835a0a82dec73ce27124f7
inspector start at: http://10.42.32.117:5678
xctest-client.js:230:14 [master] pid:8647 iproxy exit with code: null, signal: SIGKILL
<-- GET /
helper.js:97:16 [master] pid:8647 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:1008:11)
at exports._exceptionWithHostPort (util.js:1031:20)
at TCPConnectWrap.afterConnect as oncomplete

共收到 13 条回复 时间 点赞

而链接 ios 模拟器的话,虽然 client 启动了,但是既不会打开 inspector,也没有报错,不知道什么情况。。。

给 XCTestWD.xcodeproj 选了 development team 以后出现如下错误

server.js:16:12 [master] pid:8827 server start with config:
{ port: 5678,
verbose: true,
udid: '92152c9745d203e067835a0a82dec73ce27124f7',
ip: '10.42.32.117',
host: 'spryMBP.local',
loaded_time: '2017-05-11 16:56:38' }
app-inspector.js:43:12 [master] pid:8827 server start at: http://10.42.32.117:5678
xctest-client.js:63:14 [master] pid:8827 project path: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client start with port: 8001
xctest-client.js:243:14 [master] pid:8827 xcode version: 8.2.1
XCTestWD version: 1.0.7
xctest-client.js:191:14 [master] pid:8827 2017-05-11 16:56:39.493 xcodebuild[8833:220352] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/xxx/Library/Developer/Xcode/DerivedData/XCTestWD-evljajykmolwzobrozpobiggeeea/Logs/Test/F2638AE8-FF52-48CE-AB99-3B925D161F34/Session-XCTestWDUITests-2017-05-11_165639-83eLJk.log

xctest-client.js:192:14 [master] pid:8827 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:191:14 [master] pid:8827 2017-05-11 16:56:39.493 xcodebuild[8833:220344] [MT] IDETestOperationsObserverDebug: (1F2F7841-42C8-4EDB-ABC4-ACAFB4A8BF09) Beginning test session XCTestWDUITests-1F2F7841-42C8-4EDB-ABC4-ACAFB4A8BF09 at 2017-05-11 16:56:39.493 with Xcode 8C1002 on target {
deviceSerialNumber: C39QKKFNGRWF
identifier: 92152c9745d203e067835a0a82dec73ce27124f7
deviceClass: iPhone
deviceName: sp_iPhone6S Plus_s2
deviceIdentifier: 92152c9745d203e067835a0a82dec73ce27124f7
productVersion: 10.2.1
buildVersion: 14D27
deviceSoftwareVersion: 10.2.1 (14D27)
deviceArchitecture: arm64
deviceTotalCapacity: 11747463168
deviceAvailableCapacity: 2083426304
deviceIsTransient: NO
ignored: NO
deviceIsBusy: NO
deviceIsActivated: YES
deviceActivationState: Activated
deviceType:
supportedDeviceFamilies: (
1
)
applications: (null)
provisioningProfiles: (null)
activityProgress: -2
activityTitle:

hasInternalSupport: NO
isSupportedOS: YES
developerDiskMountError: (null)
(null)
} (10.2.1 (14D27))

xctest-client.js:192:14 [master] pid:8827 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:191:14 [master] pid:8827 2017-05-11 16:56:40.574 xcodebuild[8833:220344] Error Domain=IDETestOperationsObserverErrorDomain Code=3 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/xxx/Library/Developer/Xcode/DerivedData/XCTestWD-evljajykmolwzobrozpobiggeeea/Logs/Test/F2638AE8-FF52-48CE-AB99-3B925D161F34/Session-XCTestWDUITests-2017-05-11_165639-83eLJk.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/xxx/Library/Developer/Xcode/DerivedData/XCTestWD-evljajykmolwzobrozpobiggeeea/Logs/Test/F2638AE8-FF52-48CE-AB99-3B925D161F34/Session-XCTestWDUITests-2017-05-11_165639-83eLJk.log}

xctest-client.js:192:14 [master] pid:8827 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:191:14 [master] pid:8827
Testing failed:

xctest-client.js:192:14 [master] pid:8827 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:191:14 [master] pid:8827 Module compiled with Swift 3.1 cannot be imported in Swift 3.0.2: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/../Carthage/Build/iOS/Swifter.framework/Modules/Swifter.swiftmodule/arm64.swiftmodule
** TEST FAILED **

The following build commands failed:
CompileSwift normal arm64 /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWDUITests/server/models/XCTestWDStatus.swift
CompileSwift normal arm64 /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWDUITests/Server/Controllers/XCTestWDStatusController.swift
CompileSwift normal arm64 /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWDUITests/Server/Controllers/XCTestWDKeysController.swift
CompileSwift normal arm64 /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWDUITests/Server/Controllers/XCTestWDWindowController.swift
CompileSwift normal arm64 /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWDUITests/server/models/XCTestWDAlert.swift
CompileSwift normal arm64 /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWDUITests/Server/Controllers/XCTestWDScreenshotController.swift
CompileSwift normal arm64 /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWDUITests/server/models/extensions/XCTestWDApplicationTree.swift
CompileSwift normal arm64 /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWDUITests/Server/XCTestWDServer.swift
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(9 failures)

xctest-client.js:192:14 [master] pid:8827 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:279:14 [master] pid:8827 killing deviceLogProc pid: 8830
xctest-client.js:284:14 [master] pid:8827 killing runnerProc pid: 8833
xctest-client.js:290:14 [master] pid:8827 killing iproxyProc pid: 8832
xctest-client.js:202:14 [master] pid:8827 xctest client exit with code: 65, signal: null
xctest-client.js:157:16 [master] pid:8827 deviceconsole exit with code: null, signal: SIGKILL
xctest-client.js:271:14 [master] pid:8827 Fail to start xctest: undefined
undefined
iOS device started: 92152c9745d203e067835a0a82dec73ce27124f7
inspector start at: http://10.42.32.117:5678
xctest-client.js:230:14 [master] pid:8827 iproxy exit with code: null, signal: SIGKILL
<-- GET /
helper.js:97:16 [master] pid:8827 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:1008:11)
at exports._exceptionWithHostPort (util.js:1031:20)
at TCPConnectWrap.afterConnect as oncomplete

匿名 #3 · 2017年05月17日

同问

同问

匿名 #5 · 2017年05月18日

这个错误之前我也遇到过,我是在 mac 下面搭的环境,升级 xcode 到最新版 8.3.2 就好了

是最新版本吗? 现在已经更新了

好像是这么回事,看 log 里面说 swift3.1 编译过的不能导到 3.0.2 里。而只有 xcode8.3 以后才有 swift3.1。谢谢啦

升级 xcode 也还是报错呢

我也有这个问题,@gundamsing解决了吗
我的 xcode 已经是最新版了
xcodebuild version: 8.3.2

解决了吗,我的也有同样问题
macaca-doctor version: 2.0.0

Node.js checklist:

node env: /usr/local/bin/node
node version: v8.0.0

iOS checklist:

Xcode is installed at: /Applications/Xcode.app/Contents/Developer
Xcode Command Line Tools is ready, version: 2347.
xcodebuild version: 8.3.2
iproxy[usbmuxd] is installed at: /usr/local/bin/iproxy
ios_webkit_debug_proxy is installed at: /usr/local/bin/ios_webkit_debug_proxy
carthage is installed, version: 0.23.0

Android checklist:

JAVA version is 1.7.0_80
JAVA_HOME is set to /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home
ANDROID_HOME is set to /Users/kfz/Documents/dev/android-sdk-macosx/
Platforms is set to /Users/kfz/Documents/dev/android-sdk-macosx/platforms/android-19
ADB tool is set to /Users/kfz/Documents/dev/android-sdk-macosx/platform-tools/adb
gradle is installed, version: 3.5

Installed driver list:

chrome: 1.0.5
electron: 1.1.6
ios: 2.0.11

<-- GET /

helper.js:97:16 [master] pid:75400 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:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at TCPConnectWrap.afterConnect as oncomplete

<-- GET /favicon.ico
--> GET /favicon.ico 404

卡在这,进行不下去了,怎么就没人回复呢

许琴琴 回复

确认是不是打开下面的路径的.xcodeproj ,然后改 development team 重新 build successful 就可以了
/usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xcode 打开的工程路径是不是对的 。
不要打开/usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xcode 更新到最新版

李永亮 回复

遇到同样问题,有解决方法吗?xcode 和 macaca 都是最新版本了。而且打开的项目目录也正确

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册