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

Android detox test fails - ChildProcessError. #978

Closed
Rechun1 opened this issue Oct 11, 2018 · 2 comments
Closed

Android detox test fails - ChildProcessError. #978

Rechun1 opened this issue Oct 11, 2018 · 2 comments

Comments

@Rechun1
Copy link

Rechun1 commented Oct 11, 2018

Description

Android detox test -c android.emu.debug faling on ubuntu

Main error
ChildProcessError: Command failed: /home/limaslab/Android/Sdk/platform-tools/adb -s emulator-5554 install -rg /home/limaslab/Área de Trabalho/agora vai/agora/android/app/build/outputs/apk/debug/app-debug.apk
/home/limaslab/Android/Sdk/platform-tools/adb -s emulator-5554 install -rg /home/limaslab/Área de Trabalho/agora vai/agora/android/app/build/outputs/apk/debug/app-debug.apk (exited with error code 255)

Steps to Reproduce

Run following command:

Android detox test -c android.emu.debug

Detox, Node, Device, Xcode and macOS Versions

Provide the macOS and Xcode versions you are using, and the device / simulator you tried it on.

  • Detox:^9.0.4
  • React Native:0.57.2
  • Node:10.12.0
    Device: Nexus_5X_API_23

Device and verbose Detox logs

detox[16032] INFO: [DetoxServer.js] server listening on localhost:46115...
detox[16032] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:46115
detox[16032] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=bcfab263-ba7e-3ab4-6464-a5b4dd3b5b83
detox[16032] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=bcfab263-ba7e-3ab4-6464-a5b4dd3b5b83
detox[16032] DEBUG: [exec.js/EXEC_CMD, #0] /home/limaslab/Android/Sdk/emulator/emulator -list-avds --verbose
detox[16032] DEBUG: [exec.js/EXEC_CMD, #1] /home/limaslab/Android/Sdk/platform-tools/adb devices
detox[16032] DEBUG: [exec.js/EXEC_CMD, #2] /home/limaslab/Android/Sdk/platform-tools/adb -s emulator-5554 shell "getprop dev.bootcomplete"
detox[16032] DEBUG: [exec.js/EXEC_CMD, #3] /home/limaslab/Android/Sdk/platform-tools/adb -s emulator-5554 shell "getprop ro.build.version.sdk"
detox[16032] DEBUG: [exec.js/EXEC_CMD, #4] /home/limaslab/Android/Sdk/platform-tools/adb -s emulator-5554 shell "dumpsys power | grep "^[ ]m[UW].=""
detox[16032] DEBUG: [exec.js/EXEC_CMD, #5] /home/limaslab/Android/Sdk/build-tools/28.0.3/aapt dump badging "/home/limaslab/Área de Trabalho/agora vai/agora/android/app/build/outputs/apk/debug/app-debug.apk" | grep -e "package: name="
detox[16032] DEBUG: [exec.js/EXEC_CMD, #6] /home/limaslab/Android/Sdk/platform-tools/adb -s emulator-5554 shell "pm list packages com.agora"
detox[16032] DEBUG: [exec.js/EXEC_CMD, #7] /home/limaslab/Android/Sdk/platform-tools/adb -s emulator-5554 shell "pm list packages com.agora.test"
detox[16032] DEBUG: [exec.js/EXEC_CMD, #8] /home/limaslab/Android/Sdk/platform-tools/adb -s emulator-5554 install -rg /home/limaslab/Área de Trabalho/agora vai/agora/android/app/build/outputs/apk/debug/app-debug.apk
detox[16032] ERROR: [exec.js/EXEC_FAIL, #8] "/home/limaslab/Android/Sdk/platform-tools/adb -s emulator-5554 install -rg /home/limaslab/Área de Trabalho/agora vai/agora/android/app/build/outputs/apk/debug/app-debug.apk" failed with code = 255, stdout and stderr:

detox[16032] ERROR: [exec.js/EXEC_FAIL, #8] adb: error: cannot stat 'vai/agora/android/app/build/outputs/apk/debug/app-debug.apk': No such file or directory

detox[16032] ERROR: [exec.js/EXEC_FAIL, #8]
detox[16032] ERROR: [index.js/DETOX_INIT_ERROR]
{ ChildProcessError: Command failed: /home/limaslab/Android/Sdk/platform-tools/adb -s emulator-5554 install -rg /home/limaslab/Área de Trabalho/agora vai/agora/android/app/build/outputs/apk/debug/app-debug.apk
/home/limaslab/Android/Sdk/platform-tools/adb -s emulator-5554 install -rg /home/limaslab/Área de Trabalho/agora vai/agora/android/app/build/outputs/apk/debug/app-debug.apk (exited with error code 255)
at callback (/home/limaslab/Área de Trabalho/agora vai/agora/node_modules/child-process-promise/lib/index.js:33:27)
at ChildProcess.exithandler (child_process.js:296:5)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:962:16)
at Process.ChildProcess.handle.onexit (internal/child_process.js:251:5)
name: 'ChildProcessError',
code: 255,
childProcess:
{ ChildProcess: { [Function: ChildProcess] super
: [Function] },
fork: [Function: fork],
_forkChild: [Function: _forkChild],
exec: [Function: exec],
execFile: [Function: execFile],
spawn: [Function: spawn],
spawnSync: [Function: spawnSync],
execFileSync: [Function: execFileSync],
execSync: [Function: execSync] },
stdout:
'adb: error: cannot stat 'vai/agora/android/app/build/outputs/apk/debug/app-debug.apk': No such file or directory\n',
stderr: '' }

  1. "before all" hook

0 passing (632ms)
1 failing

  1. "before all" hook:
    ChildProcessError: Command failed: /home/limaslab/Android/Sdk/platform-tools/adb -s emulator-5554 install -rg /home/limaslab/Área de Trabalho/agora vai/agora/android/app/build/outputs/apk/debug/app-debug.apk
    /home/limaslab/Android/Sdk/platform-tools/adb -s emulator-5554 install -rg /home/limaslab/Área de Trabalho/agora vai/agora/android/app/build/outputs/apk/debug/app-debug.apk (exited with error code 255)
    at callback (node_modules/child-process-promise/lib/index.js:33:27)
    at ChildProcess.exithandler (child_process.js:296:5)
    at maybeClose (internal/child_process.js:962:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)

detox[16032] DEBUG: [DetoxServer.js/DISCONNECT] role=tester, sessionId=bcfab263-ba7e-3ab4-6464-a5b4dd3b5b83
child_process.js:651
throw err;
^

Error: Command failed: node_modules/.bin/mocha e2e --opts e2e/mocha.opts --configuration android.emu.debug --loglevel verbose --grep :ios: --invert --artifacts-location "artifacts/android.emu.debug.2018-10-11 18-38-00Z"
at checkExecSyncError (child_process.js:611:11)
at Object.execSync (child_process.js:648:13)
at runMocha (/home/limaslab/Área de Trabalho/agora vai/agora/node_modules/detox/local-cli/detox-test.js:129:6)
at run (/home/limaslab/Área de Trabalho/agora vai/agora/node_modules/detox/local-cli/detox-test.js:82:7)
at Object. (/home/limaslab/Área de Trabalho/agora vai/agora/node_modules/detox/local-cli/detox-test.js:217:1)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)

@rotemmiz
Copy link
Member

Did you build both apk and testApk ?

@no-response
Copy link

no-response bot commented Nov 5, 2018

This issue has been automatically closed because there has been no response to our request for more information from the original author.

@no-response no-response bot closed this as completed Nov 5, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Nov 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants