LedgerHQ/ledgerjs

@ledgerhq/hw-transport-node-hid-singleton incompatible with Electron 14+ because of usb-detection lib dependency

leoparis89 opened this issue · 0 comments

It seems that we can't use hw-transport-node-hid-singleton with Electron 14+ as the use of usb-detection crashes the app with this error:

Uncaught Error: Loading non-context-aware native module in renderer: '/my-path/node_modules/usb-detection/build/Release/detection.node'. See https://github.com/electron/electron/issues/18397.

(bug reproductible in this repo)

As we can see in the issue in the above log, the app.allowRendererProcessReuse workaround is no longer possible with Electron 14+, making usb-detection unusable in it's current state with electron 14+. Also looking on the usb-detection repo I saw there is a PR that has been around for a while regarding that issue.

Do you support Electron 14+ ?
If so do you know a workaround for this problem or do you have plans for a future fix.

Many thanks.