question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disconnecting and re-connecting

See original GitHub issue

Issue 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:closed
  • Created a year ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
yume-chancommented, May 21, 2022

Upstream issue filed:

  • MattiasBuelens/web-streams-polyfill#118
1reaction
yume-chancommented, May 17, 2022

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 calling abort.

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found