Comments (14)
I don't imagine this is actually a bug with the @ledgerhq/live-common
library, that's just where these commands come from.
Maybe it could be an issue with the @ledgerhq/hw-transport-webhid
or @ledgerhq/hw-transport
libraries, but the disconnect
event is being emitted on the browser's HIDDevice
, so it seems most likely that some response from the device itself is causing the disconnection.
from ledger-live.
Doing some more testing, it looks like the disconnect
event is also emitted on the transport just when quitting the running app manually.
from ledger-live.
Currently I'm working around this problem by waiting a short time after opening or quitting an app (4000 milliseconds seems to work) and creating a new WebHIDTransport
instance to send the next command. If the new transport is created too quickly, the device won't appear in the list to reconnect immediately.
from ledger-live.
I've observed the same behavior with the WebBLETransport
. In this case, the workaround of waiting a few seconds after opening or closing an app doesn't work. Because the bluetooth.requestDevice
API requires user interaction, I can't just create a new transport instance to reconnect.
from ledger-live.
Related doc for these commands: https://developers.ledger.com/docs/transport/open-close-info-on-apps/
from ledger-live.
This issue is stale because it has been open 30 days with no activity. Remove stale label, comment, or consider closing it.
from ledger-live.
Please keep open and fix this, it's an active issue.
from ledger-live.
@alexandremgo FYI
from ledger-live.
This issue is stale because it has been open 30 days with no activity. Remove stale label, comment, or consider closing it.
from ledger-live.
This is a bug and is not stale. Please take a look.
from ledger-live.
This is the correct behaviour of our hardware wallets i'm afraid and I'm not aware there is a plan to change anytime soon this behaviour. In Ledger Live we had to workaround the UX around this as well: we're actively waiting a reconnect after doing a openApp / closeApp – this was manageable with node-hid, but on the web i'm not experienced enough to know if it can be done without having to re-ask user's permission (so in a context of a click :s).
basically this comes from the fact an app running on ledger hardware wallet is responsible to create the connectivity stack (USB / BLE / HID / ..) which means each App Open is going to be similar to "plugging a new device" and each App Close is going to be similar to "unplugging that device", same goes with the device's dashboard (the main app screen where you see the apps).
When you obtain a transport, the lifecycle is not the actual usb wire connection but is the lifecycle of the device's app.
So entering an app from the dashboard is essentially a disconnect+connect on the USB stack.
from ledger-live.
Thanks for the response, @gre.
So entering an app from the dashboard is essentially a disconnect+connect on the USB stack.
I haven't found this issue to occur when the user initiates opening an app on the Ledger device (it does occur when exiting one though). It occurs when sending either command to the device over the connected web transport.
For example, I can connect to the device over either the Bluetooth or WebHID transport with the Dashboard open. If I try to send commands for the Solana app, they will fail but not disconnect the transport. If I then open the Solana app on the device, the transport will not disconnect, and subsequent commands to the Solana app will succeed.
Only if I quit the app on the device, or send the commands to quit the current app or open an app, will it cause transport disconnection. This makes these commands not very useful, as the UX of losing the transport connection is pretty bad. Is this expected behavior? What sort of UX do you recommend, for example always asking the user to launch the app themselves before connecting?
from ledger-live.
@jordaaash it's curious that you don't experience a disconnect when entering the app, i'm not familiar with the latest development on the matter so I've asked internally the relevant team who should answer here if they have complementary information 🙏
What sort of UX do you recommend, for example always asking the user to launch the app themselves before connecting?
yes. there are ongoing work toward making the experience more seamless. but for now it's the current status quo i'm afraid.
Thanks
from ledger-live.
This issue is stale because it has been open 30 days with no activity. Remove stale label, comment, or consider closing it.
from ledger-live.
Related Issues (20)
- [Bug]: navigator.product is deprecated HOT 2
- Saitama is showing added value of x10,000 [Bug]: HOT 1
- [Bug]: ledgerhq/hw-app-eth // e2e-eth-tutorial // Failed to resolve... HOT 2
- [Bug]: Installing Meter app fails HOT 2
- Incorrect Tezos APY [Bug]: HOT 1
- [Bug]: signEIP712Message result error HOT 17
- [Bug]: Unable to resolve module @ledgerhq/domain-service/signers/index HOT 9
- [Feature]: Add deterministic URL path for binary signature HOT 1
- [Feature]: Add multiple accounts and switch between EVM chains similar to 3rd party wallets HOT 1
- [Feature]: Solana Alt-coin Support HOT 1
- [Bug]: dependencies were not found in Nuxt2 HOT 1
- [Bug]: signature verification failed on BnB Beacon Chain HOT 1
- [Feature]: Include Icelandic Kronur as a preferred currency in Ledger Live HOT 1
- [Bug]: Bitcoin hw-signMessage returns base64-encoded signature when downstream consumers expect hex HOT 1
- [Bug]: @ledgerhq/hw-transport-web-ble throws error on Transport.create() HOT 1
- [Bug]: incorrect offset in reading APDU answer of `GetVersion` HOT 2
- [Bug]: Argument of type 'RequestInfo' is not assignable to parameter of type 'string'. HOT 5
- [Bug]: @ledgerhq/hw-transport-web-ble throws error on Transport.create() HOT 1
- [Bug]: tsconfig.json should be excluded from packages (e.g. from npm) HOT 2
- [Bug]: Ledger Live Recover on start-up - no exit functionality HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ledger-live.