-
Notifications
You must be signed in to change notification settings - Fork 18
Cannot connect BitBox02 on M2 Mac #43
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
Comments
I have the same issue but the intel Mac Mini doesn't work either so I doubt that this is an issue related to mac version. |
It's very frustrating, I really like the BitBox02 but if I can't make this work in the next few days, I need to buy a Trezor or a Ledger just in order to use dapps safely 😤 |
Is the BitBoxApp and all other wallet apps closed? Only one app can talk to the BitBox02 at once. Are you using VPN?
Strange, I think it should show it once, not twice. Could you try connecting to myetherwallet.com using Firefox and Chrome? On FireFox the bridge is used, on Chrome webHID is used without the bridge. |
@pozylon what does http://127.0.0.1:8178/api/v1/devices show for you when trying to connect? |
It shows 2 devices as soon as i select the orientation on the bitbox02 |
There is only 1 difference in the devices shown: ...%2FIOUSBHostInterface%401%2FAppleUserUSBHostHIDDevice","product":"BitBox02"}]} @benma maybe that helps? |
Some more info: listening on http://127.0.0.1:8178
[2023-05-07T18:56:14Z INFO warp::server] listening on http://127.0.0.1:8178
[2023-05-07T18:56:14Z INFO bitbox_bridge::usb] Notified!
[2023-05-07T18:56:14Z INFO bitbox_bridge::usb] Found BitBox02 at IOService:/AppleARMPE/arm-io@10F00000/AppleT811xIO/usb-drd0@82280000/AppleT8112USBXHCI@00000000/usb-drd0-port-hs@00100000/BitBox02@00100000/IOUSBHostInterface@0/AppleUserUSBHostHIDDevice!
[2023-05-07T18:56:14Z INFO bitbox_bridge::usb] Found BitBox02 at IOService:/AppleARMPE/arm-io@10F00000/AppleT811xIO/usb-drd0@82280000/AppleT8112USBXHCI@00000000/usb-drd0-port-hs@00100000/BitBox02@00100000/IOUSBHostInterface@1/AppleUserUSBHostHIDDevice!
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::io] read 420 bytes
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::io] parsed 11 headers
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::conn] incoming body is empty
[2023-05-07T18:56:22Z DEBUG bitbox_bridge::web] Some(127.0.0.1:52524)
[2023-05-07T18:56:22Z INFO bitbox_bridge::web] Client connected: 127.0.0.1:52524
[2023-05-07T18:56:22Z DEBUG bitbox_bridge::web] localhost:8178
[2023-05-07T18:56:22Z DEBUG bitbox_bridge::web] Origin: Some(https://www.myetherwallet.com/)
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::io] flushed 718 bytes
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::io] read 420 bytes
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::io] parsed 11 headers
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::conn] incoming body is empty
[2023-05-07T18:56:22Z DEBUG bitbox_bridge::web] Some(127.0.0.1:52524)
[2023-05-07T18:56:22Z INFO bitbox_bridge::web] Client connected: 127.0.0.1:52524
[2023-05-07T18:56:22Z DEBUG bitbox_bridge::web] localhost:8178
[2023-05-07T18:56:22Z DEBUG bitbox_bridge::web] Origin: Some(https://www.myetherwallet.com/)
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::io] flushed 718 bytes
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::io] read 420 bytes
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::io] parsed 11 headers
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::conn] incoming body is empty
[2023-05-07T18:56:22Z DEBUG bitbox_bridge::web] Some(127.0.0.1:52524)
[2023-05-07T18:56:22Z INFO bitbox_bridge::web] Client connected: 127.0.0.1:52524
[2023-05-07T18:56:22Z DEBUG bitbox_bridge::web] localhost:8178
[2023-05-07T18:56:22Z DEBUG bitbox_bridge::web] Origin: Some(https://www.myetherwallet.com/)
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::io] flushed 718 bytes
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::io] read 420 bytes
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::io] parsed 11 headers
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::conn] incoming body is empty
[2023-05-07T18:56:22Z DEBUG bitbox_bridge::web] Some(127.0.0.1:52524)
[2023-05-07T18:56:22Z INFO bitbox_bridge::web] Client connected: 127.0.0.1:52524
[2023-05-07T18:56:22Z DEBUG bitbox_bridge::web] localhost:8178
[2023-05-07T18:56:22Z DEBUG bitbox_bridge::web] Origin: Some(https://www.myetherwallet.com/)
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::io] flushed 718 bytes
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::io] read 420 bytes
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::io] parsed 11 headers
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::conn] incoming body is empty
[2023-05-07T18:56:22Z DEBUG bitbox_bridge::web] Some(127.0.0.1:52524)
[2023-05-07T18:56:22Z INFO bitbox_bridge::web] Client connected: 127.0.0.1:52524
[2023-05-07T18:56:22Z DEBUG bitbox_bridge::web] localhost:8178
[2023-05-07T18:56:22Z DEBUG bitbox_bridge::web] Origin: Some(https://www.myetherwallet.com/)
[2023-05-07T18:56:22Z DEBUG hyper::proto::h1::io] flushed 718 bytes
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::io] read 420 bytes
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::io] parsed 11 headers
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::conn] incoming body is empty
[2023-05-07T18:56:23Z DEBUG bitbox_bridge::web] Some(127.0.0.1:52524)
[2023-05-07T18:56:23Z INFO bitbox_bridge::web] Client connected: 127.0.0.1:52524
[2023-05-07T18:56:23Z DEBUG bitbox_bridge::web] localhost:8178
[2023-05-07T18:56:23Z DEBUG bitbox_bridge::web] Origin: Some(https://www.myetherwallet.com/)
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::io] flushed 718 bytes
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::io] read 420 bytes
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::io] parsed 11 headers
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::conn] incoming body is empty
[2023-05-07T18:56:23Z DEBUG bitbox_bridge::web] Some(127.0.0.1:52524)
[2023-05-07T18:56:23Z INFO bitbox_bridge::web] Client connected: 127.0.0.1:52524
[2023-05-07T18:56:23Z DEBUG bitbox_bridge::web] localhost:8178
[2023-05-07T18:56:23Z DEBUG bitbox_bridge::web] Origin: Some(https://www.myetherwallet.com/)
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::io] flushed 718 bytes
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::io] read 420 bytes
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::io] parsed 11 headers
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::conn] incoming body is empty
[2023-05-07T18:56:23Z DEBUG bitbox_bridge::web] Some(127.0.0.1:52524)
[2023-05-07T18:56:23Z INFO bitbox_bridge::web] Client connected: 127.0.0.1:52524
[2023-05-07T18:56:23Z DEBUG bitbox_bridge::web] localhost:8178
[2023-05-07T18:56:23Z DEBUG bitbox_bridge::web] Origin: Some(https://www.myetherwallet.com/)
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::io] flushed 718 bytes
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::io] read 420 bytes
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::io] parsed 11 headers
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::conn] incoming body is empty
[2023-05-07T18:56:23Z DEBUG bitbox_bridge::web] Some(127.0.0.1:52524)
[2023-05-07T18:56:23Z INFO bitbox_bridge::web] Client connected: 127.0.0.1:52524
[2023-05-07T18:56:23Z DEBUG bitbox_bridge::web] localhost:8178
[2023-05-07T18:56:23Z DEBUG bitbox_bridge::web] Origin: Some(https://www.myetherwallet.com/)
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::io] flushed 718 bytes
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::io] read 420 bytes
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::io] parsed 11 headers
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::conn] incoming body is empty
[2023-05-07T18:56:23Z DEBUG bitbox_bridge::web] Some(127.0.0.1:52524)
[2023-05-07T18:56:23Z INFO bitbox_bridge::web] Client connected: 127.0.0.1:52524
[2023-05-07T18:56:23Z DEBUG bitbox_bridge::web] localhost:8178
[2023-05-07T18:56:23Z DEBUG bitbox_bridge::web] Origin: Some(https://www.myetherwallet.com/)
[2023-05-07T18:56:23Z DEBUG hyper::proto::h1::io] flushed 718 bytes Firefox just calls the devices api 10 times again and again without every trying to connect to the websocket, then gives up: |
Looks like it's a problem of the client js lib not accepting more than 1 device in the list. |
Thanks for debugging @pozylon. Now we need to figure out why the bridge lists two devices instead of one. I can't reproduce the issue. Any chance you know some Rust? https://github.com/digitalbitbox/bitbox-bridge/. If not, I'll try to figure out what could be going wrong by studying the code. Potentially it registers the U2F interface as well, though I thought that was being filtered. |
@pozylon could you test with this build of the bridge? I built it from this commit: benma@d7116f3 |
Yeah it looks like it has something to do with that but i'm not very skilled at rust or hardware. Nevertheless it seems to relate to the hidapi: The devices are only different by path and the bridge doesn't parse the path / filter interface id's |
@pozylon you can run the above with |
same issue still with that binary |
ioreg -p IOUSB:
|
@pozylon could you do:
then post the output of |
Here you go @benma
|
@benma I've logged the usage_page with hidapi-rs which differs by device, but the interface_number always returns 0, so neither 1 or -1 [2023-05-08T06:19:32Z INFO bitbox_bridge::usb] 61904 |
This! Fixed already: libusb/hidapi#534 |
Thanks that is helpful. It seems that your HID driver is listing the two interfaces of the BitBox02 as two separate devices, but with different usage_page numbers. Here is a bridge version that filters for the usage page, so you can try to run this instead of the official release with Rabby to quick-fix your problem. Thanks for the link above - I'll check if/how I can pull in this fix and if ask you to try it if you don't mind. |
I can confirm that it works with both Rabby for Chrome and MyEtherWallet for Firefox. |
This fixes BitBoxSwiss#43 - a regression where libusb/hidapi would report the interface number of both (HWW and U2F) as 0 instead of 0 and 1 on macOS 13.3. The fix is to pull the upstream fix: libusb/hidapi#534. hidapi-rs was forked to benma/hidapi-rs to pull in the latest libusb/hidapi that contains the fix.
This fixes BitBoxSwiss#43 - a regression where libusb/hidapi would report the interface number of both (HWW and U2F) as 0 instead of 0 and 1 on macOS 13.3. The fix is to pull the upstream fix: libusb/hidapi#534. hidapi-rs was forked to benma/hidapi-rs to pull in the latest libusb/hidapi that contains the fix. This also led me down a rabbit-hole of updating the Docker base image and all sorts of dependencies.
@pozylon I updated the libusb/hidapi dependency in the bridge. Could you test also this version? If it works I'll make a new release. Thank you. |
@benma amazing, it works, but weirdly the path is now much shorter:
|
This fixes BitBoxSwiss#43 - a regression where libusb/hidapi would report the interface number of both (HWW and U2F) as 0 instead of 0 and 1 on macOS 13.3. The fix is to pull the upstream fix: libusb/hidapi#534. hidapi-rs was forked to benma/hidapi-rs to pull in the latest libusb/hidapi that contains the fix. This also led me down a rabbit-hole of updating the Docker base image and all sorts of dependencies. Code changes are clippy fixes.
This fixes BitBoxSwiss#43 - a regression where libusb/hidapi would report the interface number of both (HWW and U2F) as 0 instead of 0 and 1 on macOS 13.3. The fix is to pull the upstream fix: libusb/hidapi#534. hidapi-rs was forked to benma/hidapi-rs to pull in the latest libusb/hidapi that contains the fix. This also led me down a rabbit-hole of updating the Docker base image and all sorts of dependencies. Code changes are clippy fixes. libusb dep was changed to libudev, as hidapi-rs switched to the hidraw hidapi backend by default (was libusb backend before) in ruabmbua/hidapi-rs@bbb7f3e.
BitBoxBridge 1.5.1 is now released for macOS. |
I installed bitbox-bridge and tried to use it with Rabby in Brave and Chrome. I made sure no other wallet like the BitBox app is running. All I get when trying to connect the BitBox02 to Rabby is the following error:
When I look at http://127.0.0.1:8178/ I see the bridge running and http://127.0.0.1:8178/api/v1/devices shows the device (twice, in fact).
I wish I could provide more info, but I see no further error message (also nothing in
Console
), so I am not even sure if this is a bridge problem.The same process works fine on my Intel MacBook (both MacBooks are running macOS 13.3).
The text was updated successfully, but these errors were encountered: