Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit 5f5efc2

Browse files
Add additional logging for spawnFromEvent
Currently when adb fails, we skip the error and it is hard to understand that it has failed. In fact adb writes to stderr in some cases. In order to debug such cases (until we implement proper parsing), add additional logging for the spawnFromEvent method.
1 parent 9fe5ee9 commit 5f5efc2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

child-process.ts

+2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ export class ChildProcess implements IChildProcess {
8484

8585
if(spawnFromEventOptions && spawnFromEventOptions.throwError === false) {
8686
if(!future.isResolved()) {
87+
this.$logger.trace("Result when throw error is false:");
88+
this.$logger.trace(result);
8789
future.return(result);
8890
}
8991
} else {

mobile/android/android-debug-bridge.ts

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ export class AndroidDebugBridge implements Mobile.IAndroidDebugBridge {
1616
public executeCommand(args: string[]): IFuture<any> {
1717
return (() => {
1818
let command = this.composeCommand(args).wait();
19+
// TODO: Remove throwError when adb output parse is implemented.
20+
// For example `adb -s <invalid device id> install <smth>` throws error 'error: device \'030939f508e6c773\' not found\r\n' exitCode 4294967295
1921
return this.$childProcess.spawnFromEvent(command.command, command.args, "close", undefined, {throwError: false}).wait().stdout;
2022
}).future<any>()();
2123
}

0 commit comments

Comments
 (0)