adbkit
adbkit copied to clipboard
waitForDevice not working
It seems like the waitForDevice method is not working anymore. It throws an error like so: Unhandled rejection FailError: Failure: 'unknown host service'
Anyone had a similar issue ?
yep, same here !
Ya Im also facing the same problem
same for me :/. Please could somebody fix this?
For those who are curious, the problem is pretty well summed up here:
https://stackoverflow.com/questions/38224756/error-unknown-host-service-for-adb-wait-for-devices
TL;DR the adb server used to accept the command 'wait-for-any', but now the command has to be 'wait-for-device-any'. I'm planning on submitting a pull request when I'm done with my little project.
Thanks for info! Hopefully we get fix asap released..
@bradyriddle do you have fix already in some fork/branch so I could try it out?
I do not, but if you do an npm install and go into the node module folder and find adb-kit you can find a file called waitfordevicecommand.js. if you go in that file you'll see the 'wait-for-any' string. Just swap it out and it should work.
@bradyriddle I'm not seeing the waitfordevicecommand.js file within my node modules folder. Do you know where it could be located now? Getting the same error: Unhandled rejection FailError: Failure: 'unknown host service' when I try using the .waitForDevice method.
@Andychochocho node_modules/adbkit/lib/adb/command/host-serial/waitfordevice.js
on line 17:
Change this:
this._send("host-serial:" + serial + ":wait-for-device");
to this:
this._send("host-serial:" + serial + ":wait-for-any-device");
Source: https://stackoverflow.com/questions/38224756/error-unknown-host-service-for-adb-wait-for-devices?noredirect=1&lq=1
This issue seems really simple to fix. It's a 1 liner, someone should submit a PR.
@sundayz Thank you so much!! Appreciate the help! PR has been sent 👍
Well done! I hope it gets merged soon.