-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Sending an openApp
or quitApp
command to the device causes WebHID to disconnect
#4964
Comments
I don't imagine this is actually a bug with the Maybe it could be an issue with the |
Doing some more testing, it looks like the |
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 |
I've observed the same behavior with the |
Related doc for these commands: https://developers.ledger.com/docs/transport/open-close-info-on-apps/ |
This issue is stale because it has been open 30 days with no activity. Remove stale label, comment, or consider closing it. |
Please keep open and fix this, it's an active issue. |
@alexandremgo FYI |
This issue is stale because it has been open 30 days with no activity. Remove stale label, comment, or consider closing it. |
This is a bug and is not stale. Please take a look. |
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). So entering an app from the dashboard is essentially a disconnect+connect on the USB stack. |
Thanks for the response, @gre.
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? |
@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 🙏
yes. there are ongoing work toward making the experience more seamless. but for now it's the current status quo i'm afraid. Thanks |
This issue is stale because it has been open 30 days with no activity. Remove stale label, comment, or consider closing it. |
Impacted Library name
@ledgerhq/live-common
Impacted Library version
33.0.0
Describe the bug
I'm sending these commands over the WebHID transport:
ledger-live/libs/ledger-live-common/src/hw/openApp.ts
Line 3 in 64fd193
ledger-live/libs/ledger-live-common/src/hw/quitApp.ts
Line 3 in 64fd193
Testing with the latest Solana and Ethereum apps, with both commands and both apps, the app opens (with a prompt to the user) or quits (without a prompt) successfully, and returns an "Ok" (
0x9000
) status code.However, immediately afterward, a
disconnect
event on the HIDDevice is emitted, causing the transport to be torn down.Expected behavior
Successfully opening or quitting an app should not cause the transport to disconnect.
Additional context
No response
The text was updated successfully, but these errors were encountered: