LedgerHQ / ledger-live

Mono-repository for packages related to Ledger Live and its JavaScript ecosystem.
MIT License
434 stars 327 forks source link

[Bug]: @ledgerhq/hw-transport-web-ble throws error on Transport.create() #6746

Open navFooh opened 6 months ago

navFooh commented 6 months ago

Impacted Library name

@ledgerhq/hw-transport-web-ble

Impacted Library version

6.28.4

Describe the bug

An error occurs when setting up a Bluetooth connection with the Ledger using the @ledgerhq/hw-transport-web-ble

import TransportWebBle from '@ledgerhq/hw-transport-web-ble'

await TransportWebBle.create() // Throws error

Error: Uncaught (in promise) DOMException: Failed to execute 'stopNotifications' on 'BluetoothRemoteGATTCharacteristic': GATT Server is disconnected. Cannot perform GATT operations. (Re)connect first with device.gatt.connect. (monitorCharacteristic.js:23)

Expected behavior

A new Transport instance should be returned that can be used to interface with the ledger device

Additional context

Google Chrome: Version 122.0.6261.129 (Official Build) (64-bit) Ledger Nano X V2.0 Secure Element: 2.2.3 Microcontroller: 2.30 Bootloader: 1.16

korenskoy commented 4 months ago

I took your demo repository from here https://developers.ledger.com/docs/connectivity/ledgerJS/integration-walkthrough/web-application/web-bluetooth and ran it. Initially, I didn't run the Ethereum app on the Ledger device itself. After encountering the first error which asked me to run the Ethereum app, I did so. However, I then encountered the same issue, as described here.

https://github.com/LedgerHQ/ledger-live/assets/285244/b48fbe83-3eb2-4410-8f8e-1069224dd1f0

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label, comment, or consider closing it.

navFooh commented 3 months ago

I have not been able to verify if the issue is resolved yet

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label, comment, or consider closing it.

korenskoy commented 2 months ago

I have not been able to verify if the issue is resolved yet

I did a test just now and the problem is not solved, the error is still present.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. Remove stale label, comment, or consider closing it.

navFooh commented 1 month ago

Not fixed

github-actions[bot] commented 1 week ago

This issue is stale because it has been open 30 days with no activity. Remove stale label, comment, or consider closing it.

korenskoy commented 1 week ago

Not fixed