Skip to content

Commit

Permalink
Update AndroidDriver.js (#497)
Browse files Browse the repository at this point in the history
* Update AndroidDriver.js

- name doesn't exist 
- Log current attached devices

* Update AndroidDriver.js

* use log.error

* Update AndroidDriver.js
  • Loading branch information
Crash-- authored and rotemmiz committed Jan 8, 2018
1 parent 50baa95 commit 12df788
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions detox/src/devices/AndroidDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ class AndroidDriver extends DeviceDriverBase {
adbName = adbDevice.adbName;
break;
case 0:
throw new Error(`Could not find '${name}' on the currently ADB attached devices,
throw new Error(`Could not find '${filter.name}' on the currently ADB attached devices: '${JSON.stringify(adbDevices)}',
try restarting adb 'adb kill-server && adb start-server'`);
break;
default:
throw new Error(`Got more than one device corresponding to the name: ${name}`);
throw new Error(`Got more than one device corresponding to the name: ${filter.name}. Current ADB attached devices: ${JSON.stringify(adbDevices)}`);
}

return adbName;
Expand Down

0 comments on commit 12df788

Please sign in to comment.