stf
stf copied to clipboard
Logs say successfully connected via STF api, but then adb devices show device offline.
What is the issue or idea you have? Despite the logs showing that I've successfully remote connected to STF via the STF API, running adb devices doesn't show that i'm connected and says "device offline". What's strange is that When i check the STF UI, it shows the device as "Busy", so it's clearly connected somehow--it's just not showing that i'm connected with adb devices, so I'm not able to run any adb commands. See the following log from my script.
- remote_connect_url=x.xx.xxx.xx:7485
- adb connect x.xx.xxx.xx:7485 connected to x.xx.xxx.xx:7485
- echo 'Device 0000GGGG777 remote connected successfully' Device 0000GGGG777 remote connected successfully
- adb devices List of devices attached x.xx.xxx.xx:7485 offline
- adb connect x.xx.xxx.xx:7485 already connected to x.xx.xxx.xx:7485
- install_packages
- adb install -r -d '../../build/path/to/apk.apk error: device offline
- waiting for device -
Does it only happen on a specific device? Please run adb devices -l
and paste the corresponding row.
Happens for all devices I try to connect to.
Please provide the steps to reproduce the issue.
- Create a shell script that uses the add_device, remote_connect, and detecAdb methods.
- Run the script/methods
- After the log output says you're connected, run adb devices again to confirm you're connected.
- Observe
What is the expected behavior? I should be connected via adb connect and I should be able to run adb commands or automation on the devices.
Do you see errors or warnings in the stf local
output? If so, please paste them or the full log here.
After running the connect functions and adb devices, this is what the stf logs look like on the host.
2019-11-11T19:18:55.314Z IMP/device:plugins:group 28813 [0000GGGG777] Now owned by "[email protected]“ 2019-11-11T19:18:55.315Z INF/device:plugins:group 28813 [0000GGGG777] Subscribing to group channel "XXXXXXXXXXXXXXX==" 2019-11-11T19:18:55.391Z IMP/device:plugins:connect 28813 [0000GGGG777] Remote Connect Started for device "0000GGGG777" at "xx.xx.xxx.xx:7485" 2019-11-11T19:18:55.461Z INF/device:plugins:connect 28813 [0000GGGG777] New remote ADB connection from ::ffff:xxx.xx.xxx.xx
Please run stf doctor
and paste the output here.
2019-11-11T19:20:47.372Z INF/cli:doctor 29483 [] OS Arch: x64
2019-11-11T19:20:47.374Z INF/cli:doctor 29483 [] OS Platform: linux
2019-11-11T19:20:47.374Z INF/cli:doctor 29483 [] OS Platform: 4.15.0-66-generic
2019-11-11T19:20:47.374Z INF/cli:doctor 29483 [] Using Node 8.16.0
2019-11-11T19:20:47.384Z INF/cli:doctor 29483 [] Using ZeroMQ 4.1.4
2019-11-11T19:20:47.400Z INF/cli:doctor 29483 [] Using RethinkDB 2.3.6~0xenial
2019-11-11T19:20:47.400Z INF/cli:doctor 29483 [] Using GraphicsMagick 1.3.23
2019-11-11T19:20:47.400Z INF/cli:doctor 29483 [] Using ADB 1.0.32
2019-11-11T19:20:47.401Z ERR/cli:doctor 29483 [*] ProtoBuf is not installed (`protoc' is missing)
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.66. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
For those dealing with the same issue my SO BAD workaround consists in:
- Try to connect before storing the ADB key. Receive the unauthorized error.
- Make an API call to store the ADB Key generated by step 1
- Try to connect again now successfully.
That's what solved my problem.