Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

执行ios.js脚本时报错 #945

Closed
paulakisscat opened this issue Sep 19, 2019 · 2 comments
Closed

执行ios.js脚本时报错 #945

paulakisscat opened this issue Sep 19, 2019 · 2 comments

Comments

@paulakisscat
Copy link

执行窗口报错如下:
sample-nodejs git:(master) ✗ npm run test:ios

[email protected] test:ios /Users/paulakisscat/sample-nodejs
cross-env platform=ios npm run test:native

[email protected] test:native /Users/paulakisscat/sample-nodejs
macaca run --verbose -d ./macaca-test/ios.js

index.js:15:12 [master] pid:5857 webdriver server start with config:
{
port: 3456,
verbose: false,
always: true,
window: true,
ip: '192.168.1.149',
host: 'Paula-de-MacBook-Pro.local',
loaded_time: '2019-09-19 10:10:51'
}
middlewares.js:17:10 [master] pid:5857 base middlewares attached
router.js:132:10 [master] pid:5857 router set
Macaca server started
[
"/Users/paulakisscat/sample-nodejs/node_modules/.bin/mocha",
"./macaca-test/ios.js",
"--colors",
"--verbose"
]

ios : 10:10:51 lockdown.c:654 lockdownd_client_new(): device udid: 36cdf0e04e32a452ec61f22694efc255edfba30e10:10:51 property_list_service.c:127 internal_plist_send(): sending 327 bytes10:10:51 service.c:140 service_send(): sending 4 bytes10:10:51 service.c:140 service_send(): sending 327 bytes10:10:51 property_list_service.c:132 internal_plist_send(): sent 327 bytes10:10:51 property_list_service.c:133 internal_plist_send(): printing 327 bytes plist: Label idevice_id Key DeviceName Request GetValue10:10:51 property_list_service.c:191 internal_plist_receive_timeout(): initial read=410:10:51 property_list_service.c:200 internal_plist_receive_timeout(): 334 bytes following10:10:51 property_list_service.c:213 internal_plist_receive_timeout(): received 334 bytes10:10:51 property_list_service.c:239 internal_plist_receive_timeout(): printing 334 bytes plist: Key DeviceName Request GetValue Value Paula 的 iPhone710:10:51 lockdown.c:453 lockdownd_get_value(): success10:10:51 lockdown.c:464 lockdownd_get_value(): has a valuePaula 的 iPhone7 [36cdf0e04e32a452ec61f22694efc255edfba30e]

1) "before all" hook

0 passing (34s)

1 failing

  1. ios : 10:10:51 lockdown.c:654 lockdownd_client_new(): device udid: 36cdf0e04e32a452ec61f22694efc255edfba30e10:10:51 property_list_service.c:127 internal_plist_send(): sending 327 bytes10:10:51 service.c:140 service_send(): sending 4 bytes10:10:51 service.c:140 service_send(): sending 327 bytes10:10:51 property_list_service.c:132 internal_plist_send(): sent 327 bytes10:10:51 property_list_service.c:133 internal_plist_send(): printing 327 bytes plist: Label idevice_id Key DeviceName Request GetValue10:10:51 property_list_service.c:191 internal_plist_receive_timeout(): initial read=410:10:51 property_list_service.c:200 internal_plist_receive_timeout(): 334 bytes following10:10:51 property_list_service.c:213 internal_plist_receive_timeout(): received 334 bytes10:10:51 property_list_service.c:239 internal_plist_receive_timeout(): printing 334 bytes plist: Key DeviceName Request GetValue Value Paula 的 iPhone710:10:51 lockdown.c:453 lockdownd_get_value(): success10:10:51 lockdown.c:464 lockdownd_get_value(): has a valuePaula 的 iPhone7 [36cdf0e04e32a452ec61f22694efc255edfba30e]
    "before all" hook:
    Error: ENAMETOOLONG: name too long, mkdir '/Users/paulakisscat/sample-nodejs/macaca-test/screenshots/ios : 10:10:51 lockdown.c:654 lockdownd_client_new(): device udid: 36cdf0e04e32a452ec61f22694efc255edfba30e10:10:51 property_list_service.c:127 internal_plist_send(): sending 327 bytes10:10:51 service.c:140 service_send(): sending 4 bytes10:10:51 service.c:140 service_send(): sending 327 bytes10:10:51 property_list_service.c:132 internal_plist_send(): sent 327 bytes10:10:51 property_list_service.c:133 internal_plist_send(): printing 327 bytes plist: (macaca-test/ios.js:105:17)
    at processImmediate (internal/timers.js:439:21)

Test completed!
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:native: macaca run --verbose -d ./macaca-test/ios.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test:native 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! /Users/paulakisscat/.npm/_logs/2019-09-19T02_11_26_127Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:ios: cross-env platform=ios npm run test:native
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test:ios 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! /Users/paulakisscat/.npm/_logs/2019-09-19T02_11_26_167Z-debug.log

——————————————————————————————————————————

macaca服务启动启动窗口报错如下:

responseHandler.js:11:12 [master] pid:1121 Recieve HTTP Request from Client[2019-09-19 10:10:52]: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"platformName":"iOS","udid":"36cdf0e04e32a452ec61f22694efc255edfba30e","app":"/Users/paulakisscat/8mile-app/8Mile.app"}}

session.js:58:10 [master] pid:1121 Creating session, sessionId: 526cc19d-b22a-4eb6-be01-16d85d8bb16d.
helper.js:207:14 [master] pid:1121 Using local app form /Users/paulakisscat/8mile-app/8Mile.app
CFBundleIdentifier is com.richandyoung.young
Get bundleId com.richandyoung.young from plist /Users/paulakisscat/8mile-app/8Mile.app/Info.plist
macaca-ios.js:283:12 [master] pid:1121 App 'com.richandyoung.young' is not installed.
macaca-ios.js:286:14 [master] pid:1121 Install app 'com.richandyoung.young' successfully.
BundleId XCTestWD.XCTestWD does not exist.
macaca-ios.js:162:10 [master] pid:1121 {
"bundleId": "com.richandyoung.young",
"platformName": "iOS"
}
xctest-client.js:56:14 [master] pid:1121 project path: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
macaca-ios.js:171:12 [master] pid:1121 Trying to start xctestwd server...
xctest-client.js:283:14 [master] pid:1121 xcode version: 10.3
XCTestWD version: 1.4.18
xctest-client.js:230:20 [master] pid:1121 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:230:20 [master] pid:1121 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:227:20 [master] pid:1121 hitted for default mode
xctest-client.js:230:20 [master] pid:1121 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctestwd start with port: 8001
proxy.js:55:14 [master] pid:1121 Proxy: /wd/hub/session:POST to http://127.0.0.1:8001/wd/hub/session:POST with body: {"desiredCapabilities":{"bundleId":"com.richandyoung.young","platformName":"iOS"}}
proxy.js:63:22 [master] pid:1121 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8001
xctest-client.js:230:20 [master] pid:1121 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:230:20 [master] pid:1121 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:230:20 [master] pid:1121 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:230:20 [master] pid:1121 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
proxy.js:63:22 [master] pid:1121 xctest client proxy error with: Error: read ECONNRESET
proxy.js:63:22 [master] pid:1121 xctest client proxy error with: Error: read ECONNRESET
proxy.js:63:22 [master] pid:1121 xctest client proxy error with: Error: read ECONNRESET
proxy.js:85:20 [master] pid:1121 Got response with status 200: {"value":{"sessionId":"5AE6D1E9-CA12-45D1-A037-399FABE687A4","capabilities":{"browserName":"8英里","sdkVersion":"12.4.1","device":"iphone","CFBundleIdentifier":"com.richandyoung.young"}},"sessionId":...
responseHandler.js:49:14 [master] pid:1121 Send HTTP Respone to Client[2019-09-19 10:11:26]: {"sessionId":"526cc19d-b22a-4eb6-be01-16d85d8bb16d","status":0,"value":"{"platformName":"iOS","udid":"36cdf0e04e32a452ec61f22694efc255edfba30e","app":"/Users/paulakisscat/8mile-app/8Mile.app"}"}
responseHandler.js:11:12 [master] pid:1121 Recieve HTTP Request from Client[2019-09-19 10:11:26]: method: DELETE url: /wd/hub/session/526cc19d-b22a-4eb6-be01-16d85d8bb16d, jsonBody: {}
macaca-ios.js:381:10 [master] pid:1121 Stoping iOS driver...
xctest-client.js:322:14 [master] pid:1121 killing runnerProc pid: 5872
xctest-client.js:328:14 [master] pid:1121 killing iproxyProc pid: 6055
macaca-ios.js:405:10 [master] pid:1121 iOS driver cleaned up.
session.js:91:12 [master] pid:1121 Delete session, sessionId: 526cc19d-b22a-4eb6-be01-16d85d8bb16d
responseHandler.js:49:14 [master] pid:1121 Send HTTP Respone to Client[2019-09-19 10:11:26]: {"sessionId":"526cc19d-b22a-4eb6-be01-16d85d8bb16d","status":0}
xctest-client.js:272:14 [master] pid:1121 iproxy exit with code: null, signal: SIGKILL
xctest-client.js:242:16 [master] pid:1121 xctest client exit with code: null, signal: SIGKILL

————————————————————————————————————————————

  • Macaca Version:
    2.2.0
  • Macaca Doctor Logs:
    macaca-doctor version: 2.0.18

Node.js checklist:

node env: /usr/local/bin/node
node version: v12.10.0

iOS checklist:

macOS version: 10.14.6
Xcode Command Line Tools is ready, version: 2354.
xcodebuild version: 10.3
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_221.jdk/Contents/Home
ANDROID_HOME is set to /Users/paulakisscat/Library/Android/sdk
Platforms is set to /Users/paulakisscat/Library/Android/sdk/platforms/android-29
ADB tool is set to /Users/paulakisscat/Library/Android/sdk/platform-tools/adb
gradle is installed, version: 5.6

Installed driver list:

android: 2.1.0
location: /usr/local/lib/node_modules/macaca-android

chrome: 1.1.0 [out-of-date]

electron: 5.0.1
location: /usr/local/lib/node_modules/macaca-electron

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

  • Operate System:
    macOS Mojave

10.14.6

  • Programming Language:
    nodejs
@paradite
Copy link
Collaborator

应该是 xctestwd 编译失败了,看一下这里:
#948

@macaca-bot
Copy link

This is the translated issue comment: @paradite


It should be xctestwd compilation fails, look here:
#948

@xudafeng xudafeng closed this as completed Jul 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants