Skip to content
New issue

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

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

Already on GitHub? # to your account

官方sample模拟器app安装完后就不动 #816

Closed
igijedi opened this issue May 8, 2018 · 4 comments
Closed

官方sample模拟器app安装完后就不动 #816

igijedi opened this issue May 8, 2018 · 4 comments
Assignees

Comments

@igijedi
Copy link

igijedi commented May 8, 2018

  macaca-doctor version: 2.0.13


  Node.js checklist:

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

  iOS checklist:

  Xcode Command Line Tools is ready, version: 2347.
  xcodebuild version: 9.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.29.0

  Android checklist:

  JAVA version is `1.8`
  JAVA_HOME is set to `/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home`
  ANDROID_HOME is set to `/usr/local/share/android-sdk`
  Platforms is set to `/usr/local/share/android-sdk/platforms/android-27`
  ADB tool is set to `/usr/local/share/android-sdk/platform-tools/adb`
  gradle is installed, version: 4.7

  Installed driver list:

  android: 2.0.47
  electron: 1.1.19
  ios: 2.0.30
  • Operate System:
    Darwin MC-CNJJ-WDP046L 16.7.0 Darwin Kernel Version 16.7.0: Thu Jan 11 22:59:40 PST 2018; root:xnu-3789.73.8~1/RELEASE_X86_64 x86_64
  • Programming Language:
    Node-js
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'test:ios' ]
2 info using npm@5.6.0
3 info using node@v8.11.1
4 verbose run-script [ 'pretest:ios', 'test:ios', 'posttest:ios' ]
5 info lifecycle sample-nodejs@1.0.0~pretest:ios: sample-nodejs@1.0.0
6 info lifecycle sample-nodejs@1.0.0~test:ios: sample-nodejs@1.0.0
7 verbose lifecycle sample-nodejs@1.0.0~test:ios: unsafe-perm in lifecycle true
8 verbose lifecycle sample-nodejs@1.0.0~test:ios: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/jeye/Documents/GitQA/sample-nodejs/node_modules/.bin:/Users/jeye/.rvm/gems/ruby-2.4.1/bin:/Users/jeye/.rvm/gems/ruby-2.4.1@global/bin:/Users/jeye/.rvm/rubies/ruby-2.4.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/jeye/Documents/Tomcat/bin:/Users/jeye/Documents/Jmeter/bin:/Users/jeye/.rvm/bin
9 verbose lifecycle sample-nodejs@1.0.0~test:ios: CWD: /Users/jeye/Documents/GitQA/sample-nodejs
10 silly lifecycle sample-nodejs@1.0.0~test:ios: Args: [ '-c', 'cross-env platform=ios npm run test:native' ]
11 silly lifecycle sample-nodejs@1.0.0~test:ios: Returned: code: 2  signal: null
12 info lifecycle sample-nodejs@1.0.0~test:ios: Failed to exec test:ios script
13 verbose stack Error: sample-nodejs@1.0.0 test:ios: `cross-env platform=ios npm run test:native`
13 verbose stack Exit status 2
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid sample-nodejs@1.0.0
15 verbose cwd /Users/jeye/Documents/GitQA/sample-nodejs
16 verbose Darwin 16.7.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "test:ios"
18 verbose node v8.11.1
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 2
22 error sample-nodejs@1.0.0 test:ios: `cross-env platform=ios npm run test:native`
22 error Exit status 2
23 error Failed at the sample-nodejs@1.0.0 test:ios script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]

就不停的下载,解压缩,安装,
CFBundleIdentifier is xudafeng.ios-app-bootstrap
Get bundleId xudafeng.ios-app-bootstrap from plist /var/folders/2x/vnmm0wwx4dxcdjfb8pk5rjt8bqfpkh/T/ios-app-bootstrap.app/Info.plist

macaca-ios.js:160:10 [master] pid:28340 {
"bundleId": "xudafeng.ios-app-bootstrap",
"platformName": "iOS",
"app": "/var/folders/2x/vnmm0wwx4dxcdjfb8pk5rjt8bqfpkh/T/ios-app-bootstrap.app/"
}
xctest-client.js:55:14 [master] pid:28340 project path: /Users/jeye/Documents/GitQA/sample-nodejs/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
macaca-ios.js:169:12 [master] pid:28340 Trying to start xctestwd server...
xctest-client.js:247:14 [master] pid:28340 xcode version: 9.2
XCTestWD version: 1.3.28
Read simulator log at: /var/folders/2x/vnmm0wwx4dxcdjfb8pk5rjt8bqfpkh/T/com.apple.dt.XCTest/IDETestRunSession-8F71F79B-CA05-499F-B796-C725D5CAABFC/XCTestWDUITests-B8BF068E-12F2-4522-B615-45CD30736007/StandardOutputAndStandardError.txt
xctest-client.js:195:18 [master] pid:28340 please check project: /Users/jeye/Documents/GitQA/sample-nodejs/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
Read simulator log at: /var/folders/2x/vnmm0wwx4dxcdjfb8pk5rjt8bqfpkh/T/com.apple.dt.XCTest/IDETestRunSession-8F71F79B-CA05-499F-B796-C725D5CAABFC/XCTestWDUITests-B8BF068E-12F2-4522-B615-45CD30736007/StandardOutputAndStandardError.txt
xctest-client.js:195:18 [master] pid:28340 please check project: /Users/jeye/Documents/GitQA/sample-nodejs/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:195:18 [master] pid:28340 please check project: /Users/jeye/Documents/GitQA/sample-nodejs/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:195:18 [master] pid:28340 please check project: /Users/jeye/Documents/GitQA/sample-nodejs/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:281:14 [master] pid:28340 killing deviceLogProc pid: 30820
xctest-client.js:286:14 [master] pid:28340 killing runnerProc pid: 30754
xctest-client.js:206:16 [master] pid:28340 xctest client exit with code: 65, signal: null
xctest-client.js:119:18 [master] pid:28340 simulator log process exit with code: null, signal: SIGKILL
Read simulator log at: /var/folders/2x/vnmm0wwx4dxcdjfb8pk5rjt8bqfpkh/T/com.apple.dt.XCTest/IDETestRunSession-8F71F79B-CA05-499F-B796-C725D5CAABFC/XCTestWDUITests-B8BF068E-12F2-4522-B615-45CD30736007/StandardOutputAndStandardError.txt

1) "before all" hook

responseHandler.js:11:12 [master] pid:28340 Recieve HTTP Request from Client[2018-05-08 19:45:46]: method: DELETE url: /wd/hub/session, jsonBody: {}
responseHandler.js:23:14 [master] pid:28340 Send HTTP Respone to Client[2018-05-08 19:45:46]: 405 Method Not Allowed
2) "after all" hook

0 passing (10m)

2 failing

  1. macaca-test/mobile-app-sample.test.js
    "before all" hook:
    Error: Timeout of 600000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
  1. macaca-test/mobile-app-sample.test.js
    "after all" hook:
    Error: [quit()] Unexpected data in simpleCallback.
    at exports.newError (node_modules/macaca-wd/wd/lib/utils.js:139:13)
    at PromiseWebdriver. (node_modules/macaca-wd/wd/lib/callbacks.js:42:12)
    at cb (node_modules/macaca-wd/wd/lib/webdriver.js:159:22)
    at node_modules/macaca-wd/wd/lib/webdriver.js:173:5
    at Request._callback (node_modules/macaca-wd/wd/lib/http-utils.js:87:7)
    at Request.self.callback (node_modules/macaca-wd/node_modules/request/request.js:368:22)
    at Request. (node_modules/macaca-wd/node_modules/request/request.js:1219:14)
    at IncomingMessage. (node_modules/macaca-wd/node_modules/request/request.js:1167:12)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

Test completed!

@kingkong2013
Copy link

kingkong2013 commented May 15, 2018

同样的问题,我的mac OS 10.13.3:

macaca-doctor version: 2.0.14

Node.js checklist:

node env: /Users/xxx/.nvm/versions/node/v9.3.0/bin/node
node version: v9.3.0

iOS checklist:

Xcode Command Line Tools is ready, version: 2349.
xcodebuild version: 9.2
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_144.jdk/Contents/Home
ANDROID_HOME is set to /Users/xxx/Documents/android-sdk-macosx
Platforms is set to /Users/xxx/Documents/android-sdk-macosx/platforms/android-27
ADB tool is set to /Users/xxx/Documents/android-sdk-macosx/platform-tools/adb
gradle is installed, version: 4.2

Installed driver list:

android: 2.0.47
electron: 1.1.19
ios: 2.0.30
puppeteer: 1.0.2

@macaca-bot
Copy link

This is the translated issue comment: @kingkong2013


The same problem, my environment:

  Macaca-doctor version: 2.0.14

  Node.js checklist:

  Node env: /Users/xxx/.nvm/versions/node/v9.3.0/bin/node
  Node version: v9.3.0

  iOS checklist:

  Xcode Command Line Tools is ready, version: 2349.
  Xcodebuild version: 9.2
  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_144.jdk/Contents/Home
  ANDROID_HOME is set to /Users/xxx/Documents/android-sdk-macosx
  Platforms is set to /Users/xxx/Documents/android-sdk-macosx/platforms/android-27
  ADB tool is set to /Users/xxx/Documents/android-sdk-macosx/platform-tools/adb
  Gradle is installed, version: 4.2

  Installed driver list:

  Android: 2.0.47
  Electron: 1.1.19
  Ios: 2.0.30
  Puppeteer: 1.0.2

@jsfu
Copy link

jsfu commented May 17, 2018

@igijedi @kingkong2013
我遇到了同样问题,目前已经解决。
解决办法:将node_modules/xctestwd/XCTestWD重新编译

日志中有 xctest client exit with code: 65, signal: null,怀疑是XCTestWD问题,进入目录检查后发现是Carthage安装的库有问题, carthage update后,再重新编译XCTestWD,之后运行npm run test:ios就正常了

@macaca-bot
Copy link

This is the translated issue comment: @jsfu


@igijedi @kingkong2013
I encountered the same problem and it has been resolved.
Workaround: Recompile node_modules/xctestwd/XCTestWD

The log has xctest client exit with code: 65, signal: null, suspected XCTestWD problem, after entering the directory check, it is found that there is a problem with the library installed by Carthage. After carthage update, recompile XCTestWD and run npm run test:ios. Normal

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants