Disconnecting and re-connecting
See original GitHub issueIssue Checklist
- I’m using the library programmatically
Library version
0.0.15
Runtime
Linux, Chrome Version 100.0.4896.127 (Official Build) (64-bit)
Device
DJI FPV goggles V2
Describe the bug
I have an issue with properly disconnecting from ADB (without physically unplugging the device) and later re-connecting. This also seems to be an issue in the Demo where I can’t disconnect in the first place - pressing the “Disconnect” button does nothing.
const credentialStore = new AdbWebCredentialStore();
const device = await AdbWebUsbBackend.requestDevice();
let streams = await device.connect();
let adb = await Adb.authenticate(streams, credentialStore, undefined);
await adb.close();
let streams = await device.connect();
let adb = await Adb.authenticate(streams, credentialStore, undefined);
the second authenticate
call never resolves.
Not sure if I am missing something or if this is a general problem (since the demo does not allow me to disconnect either).
Steps to reproduce
const credentialStore = new AdbWebCredentialStore();
const device = await AdbWebUsbBackend.requestDevice();
let streams = await device.connect();
let adb = await Adb.authenticate(streams, credentialStore, undefined);
await adb.close();
let streams = await device.connect();
let adb = await Adb.authenticate(streams, credentialStore, undefined);
EDIT: As a work-around I am saving the device
returned by requestDevice
or getDevices
and simply close that - which does what I need it to do - I am just not sure if this is the intended way?
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
How to Fix a USB Device That Keeps Disconnecting ...
1. Quick Fixes for the "USB Keeps Disconnecting and Reconnecting" Error · Reboot your PC immediately when you encounter this issue. · Plug...
Read more >[SOLVED] USB Keeps Disconnecting and Reconnecting ...
How to Fix USB Ports Keep Disconnecting and Reconnecting Windows 10 · Reinstall the Universal Serial Bus controllers driver · Turn off the...
Read more >[4 Ways] USB Keeps Disconnecting and Reconnecting ...
You are going to learn four effective solutions to fix the error - USB keeps disconnecting and reconnecting in Windows 11/10/8/7.
Read more >USB Disconnecting and Reconnecting in Windows 11/10/8
Part 2: Use These Steps to Fix USB Keeps Disconnecting and Reconnecting in Windows 10/11 · 1. Reinstall the Universal Serial Bus Controllers...
Read more >USB keeps disconnecting and reconnecting in Windows 11/10
USB keeps disconnecting and reconnecting on PC · Reinstall Universal Serial Bus controllers driver · Turn off Power Saving Option for the USB...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Upstream issue filed:
I remember I tested this part not long ago on Windows and it was working.
On macOS, a quick check shows the
pipeTo
didn’t stop after callingabort
.It seems that the device, or the OS, is in a strange state, because I can’t re-connect even after a browser restart, and sometimes the whole browser just crashes. I need to investigate more on this weekend.