bitboxswiss / bitbox-bridge Goto Github PK
View Code? Open in Web Editor NEWA bridge that connects web wallets like MyEtherWallet to BitBox02
License: Apache License 2.0
A bridge that connects web wallets like MyEtherWallet to BitBox02
License: Apache License 2.0
Bity SA (specifically, myself) is going to add support for BitBox02 on our broker platform! It would be nice for people to know the bridge can be used with any website, not just MyEtherWallet. I got my BitBox02 today so the work will probably start sometime next week.
[2023-08-31T16:25:02Z ERROR bitbox_bridge::usb] message ignored: Message won't fit in buffer
Currently on larger messages the device just blanks out.
Any chance we could just display the message is too big and still allow signing the message?
Hi,
i'm doing a new install (v1.1.0) and can't launch the service.
during install (running as administrator) i get an error :
'Service BitBoxBridge could not be installed. Verify that you have sufficient privileges to install system services'
Error in the install log:
[2B1C:36F0][2021-03-05T19:01:12]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{fb6a5661-d704-4890-9932-55a7fce814ea}, options: 0x7, disable resume: No
[2B1C:36F0][2021-03-05T19:01:12]i000: Caching bundle from: 'C:\Users\stef_\AppData\Local\Temp\{06DB82DC-8C16-4EA9-8BA3-6F41B76B72D9}\.be\BitBoxBridge-1.1.0-Win64-installer.exe' to: 'C:\ProgramData\Package Cache\{fb6a5661-d704-4890-9932-55a7fce814ea}\BitBoxBridge-1.1.0-Win64-installer.exe'
[2B1C:36F0][2021-03-05T19:01:12]i320: Registering bundle dependency provider: {fb6a5661-d704-4890-9932-55a7fce814ea}, version: 1.1.0.0
[2B1C:36F0][2021-03-05T19:01:12]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{fb6a5661-d704-4890-9932-55a7fce814ea}, resume: Active, restart initiated: No, disable resume: No
[2B1C:08E4][2021-03-05T19:01:12]i305: Verified acquired payload: BridgePackage at path: C:\ProgramData\Package Cache\.unverified\BridgePackage, moving to: C:\ProgramData\Package Cache\{F7ED5F60-F030-4214-85B1-FFF5132A3E47}v1.1.0\BitBoxBridge-1.1.0-win64-installer.msi.
[2B1C:36F0][2021-03-05T19:01:12]i323: Registering package dependency provider: {F7ED5F60-F030-4214-85B1-FFF5132A3E47}, version: 1.1.0, package: BridgePackage
[2B1C:36F0][2021-03-05T19:01:12]i301: Applying execute package: BridgePackage, action: Install, path: C:\ProgramData\Package Cache\{F7ED5F60-F030-4214-85B1-FFF5132A3E47}v1.1.0\BitBoxBridge-1.1.0-win64-installer.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7"'
[2B1C:36F0][2021-03-05T19:02:14]e000: Error 0x80070643: Failed to install MSI package.
[2B1C:36F0][2021-03-05T19:02:14]e000: Error 0x80070643: Failed to execute MSI package.
[2B58:3CEC][2021-03-05T19:02:14]e000: Error 0x80070643: Failed to configure per-machine MSI package.
[2B58:3CEC][2021-03-05T19:02:14]i319: Applied execute package: BridgePackage, result: 0x80070643, restart: None
[2B58:3CEC][2021-03-05T19:02:14]e000: Error 0x80070643: Failed to execute MSI package.
when trying to manually run the process i get below output:
C:\Program Files\BitBoxBridge>bitbox-bridge.exe
Set RUST_LOG=<filter> to enable logging. Example RUST_LOG=debug
Error: FromWideCharError { wide_char: 56576 }
I've set the RUST_LOG environment variable but i don't see any logs being generated.
Please advise what could be wrong ?
thanks
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).
We were testing AdaLite with BitBox on a computer that hadn't been connected to Bitbox02 before and we were getting a "Not allowed" error (unfortunately I don't have the stack trace) until we installed bitbox bridge, though it shouldn't be needed for Chrome browser which uses WebHID. After installing the bridge it started woking. Even before the bridge was installed the Bitbox desktop app worked fine with the device on that computer.
The computer has OS Ubuntu 20.04 and Chrome 95.0.4638.69
Any idea what could have been fixed by installing the bridge app even if there are apparently no network calls to it in Chrome? Does the installer perhaps perform any additional setup?
/opt/shiftcrypto/bitbox-bridge/bin/bitbox-bridge ; exit;
~ % /opt/shiftcrypto/bitbox-bridge/bin/bitbox-bridge ; exit;
zsh: killed /opt/shiftcrypto/bitbox-bridge/bin/bitbox-bridge
Saving session...
...saving history...truncating history files...
...completed.
Deleting expired sessions...none found.
/opt/shiftcrypto/bitbox-bridge/bin/bitbox-bridge ; exit;
~ % /opt/shiftcrypto/bitbox-bridge/bin/bitbox-bridge ; exit;
Set RUST_LOG=<filter> to enable logging. Example RUST_LOG=debug
listening on http://127.0.0.1:8178
[2021-04-06T18:08:58Z INFO bitbox_bridge::usb] Notified!
thread 'main' panicked at 'error binding to 127.0.0.1:8178: error creating server listener: Address already in use (os error 48)', /tmp/cargo/registry/src/github.com-1ecc6299db9ec823/warp-0.2.1/src/server.rs:211:27
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
cc @x1ddos
This came up while discussing #7.
Currently, users need to run a separate static file server like python3 -m http.server --bind 127.0.0.1
and open http://localhost:port
to access MEW offline. Opening an HTML file directly with a browser is suboptimal. For example, see security considerations and corner cases.
It feels like a bundle of MEW + the bridge including a built-in static file server would be very helpful for those who want to use BitBox02 with MEW offline.
Such a bundle would nicely package everything together: the bridge, MEW release and a static server. It would be an alternative package, released alongside the regular bridge.
On Mac OS Big Sur i canΒ΄t use adalite.to with Safari. The site can't find the device. http://127.0.0.1:8178/ shows, that bitbox bridge is running. Electrum and Sparrow can use the bridge without any problems. Chrome works perfectly, but i think, it doesn't use the bridge directly.
So, is there a common issue with Safari and BitBox Bridge?
This is a follow up of #29.
In the end, I don't really care whether it's MetaMask or another wallet. I want to interact with dApps securely via my BitBox. Let's look for other alternatives here.
My requirements:
we have recently developped eth-walletconnect-keyring, an implementation of MetaMask's Keyring interface that uses the WalletConnect protocol to connect a (hardware) wallet to Metamask. A beta release of Metamask with this solution is available here for testing:
https://github.com/Toporin/metamask-extension/releases/tag/v10.13.0-WC
This is an early proof-of-concept, but it would allow any wallet (hardware/software) that supports the WalletConnect protocol to connect to Metamask. It is a standard and neutral solution, quite simple and without USB/hardware requirements, so we hope that the Metamask team would be more willing to integrate it (like they did with the QR-code approach supported by multiple vendors).
Here is a short demo showing how to connect a wallet to Metamask through the eth-wallet-keyring plugin. When using the WalletConnect option, a new tab opens with a react app that will handle the actual WalletConect connection. In this demo, we use a local server (for development only), in production, the react app is currently hosted on github-page.
Would you be interested to check this approach, and maybe collaborate with us to push this solution forward? The more people involved, the greater the chance to have a pull request accepted!
Everything is open source, questions, comments and pull requests are welcome!
(I'm not sure if this is an issue for MyEtherWallet or this bridge)
When loading MyEtherWallet not via their website but instead from their static build locally (local HTML file) then I get the error Trying to connect from a non-whitelilsted origin
. If possible, it would be very useful to interface a static, local and offline copy of MyEtherWallet to reduce attack vectors further.
It appears to be hard to manually uninstall a macOS .pkg:
https://wincent.com/wiki/Uninstalling_packages_%28.pkg_files%29_on_Mac_OS_X
Anyone attempting to uninstall bitbox-bridge on macOS will be having a hard time.
Unless I missed it and there's an easy way to uninstall?
When trying to send Goerli ETH using bitbox02 and myetherwallet, an error is shown:
{
"exception": {
"values": [
{
"type": "Error",
"value": "interface conversion: interface is nil, not string",
"stacktrace": {
"frames": [
{
"colno": 321961,
"filename": "https://www.myetherwallet.com/js/app.3c87c2ab.js",
"function": "e/</<",
"in_app": true,
"lineno": 1
},
{
"colno": 26493,
"filename": "https://www.myetherwallet.com/js/vendors.3d56b1c6.js",
"function": "Cr/e.prototype.$emit",
"in_app": true,
"lineno": 117
},
{
"colno": 11664,
"filename": "https://www.myetherwallet.com/js/vendors.3d56b1c6.js",
"function": "rt",
"in_app": true,
"lineno": 117
},
{
"colno": 5648629,
"filename": "https://www.myetherwallet.com/js/app.3c87c2ab.js",
"function": "created/<",
"in_app": true,
"lineno": 1
},
{
"colno": 259482,
"filename": "https://www.myetherwallet.com/js/app.3c87c2ab.js",
"function": "value",
"in_app": true,
"lineno": 1
},
{
"colno": 5703181,
"filename": "https://www.myetherwallet.com/js/app.3c87c2ab.js",
"function": "value",
"in_app": true,
"lineno": 1
},
{
"colno": 164527,
"filename": "https://www.myetherwallet.com/js/app.3c87c2ab.js",
"function": "value/r</<",
"in_app": true,
"lineno": 1
},
{
"colno": 62007,
"filename": "https://www.myetherwallet.com/js/vendors.3d56b1c6.js",
"function": "i/<",
"in_app": true,
"lineno": 754
},
{
"colno": 62127,
"filename": "https://www.myetherwallet.com/js/vendors.3d56b1c6.js",
"function": "i/</<",
"in_app": true,
"lineno": 754
},
{
"colno": 62068,
"filename": "https://www.myetherwallet.com/js/vendors.3d56b1c6.js",
"function": "s",
"in_app": true,
"lineno": 754
},
{
"colno": 61856,
"filename": "https://www.myetherwallet.com/js/vendors.3d56b1c6.js",
"function": "n",
"in_app": true,
"lineno": 754
},
{
"colno": 13801,
"filename": "https://www.myetherwallet.com/js/vendors.3d56b1c6.js",
"function": "k/</e[t]",
"in_app": true,
"lineno": 811
},
{
"colno": 14701,
"filename": "https://www.myetherwallet.com/js/vendors.3d56b1c6.js",
"function": "x/<",
"in_app": true,
"lineno": 811
},
{
"colno": 13374,
"filename": "https://www.myetherwallet.com/js/vendors.3d56b1c6.js",
"function": "u",
"in_app": true,
"lineno": 811
},
{
"colno": 164171,
"filename": "https://www.myetherwallet.com/js/app.3c87c2ab.js",
"function": "s/<",
"in_app": true,
"lineno": 1
},
{
"colno": 12298,
"filename": "https://www.myetherwallet.com/js/vendors.3d56b1c6.js",
"function": "ethSignTransaction",
"in_app": true,
"lineno": 95
},
{
"colno": 75512,
"filename": "https://www.myetherwallet.com/js/vendors.3d56b1c6.js",
"function": "Xt/e.$externalizeWrapper",
"in_app": true,
"lineno": 219
},
{
"colno": 3863899,
"filename": "https://www.myetherwallet.com/js/vendors.3d56b1c6.js",
"function": "e",
"in_app": true,
"lineno": 219
},
{
"colno": 3860315,
"filename": "https://www.myetherwallet.com/js/vendors.3d56b1c6.js",
"function": "tt",
"in_app": true,
"lineno": 219
},
{
"colno": 69794,
"filename": "https://www.myetherwallet.com/js/vendors.3d56b1c6.js",
"function": "vt",
"in_app": true,
"lineno": 219
},
{
"colno": 70970,
"filename": "https://www.myetherwallet.com/js/vendors.3d56b1c6.js",
"function": "xt",
"in_app": true,
"lineno": 219
},
{
"colno": 70627,
"filename": "https://www.myetherwallet.com/js/vendors.3d56b1c6.js",
"function": "Mt",
"in_app": true,
"lineno": 219
}
]
},
"mechanism": {
"handled": true,
"type": "generic"
}
}
]
},
"level": "error",
"event_id": "475d2c2efa5f410c9ccb7f1d0934895b",
"platform": "javascript",
"sdk": {
"name": "sentry.javascript.browser",
"packages": [
{
"name": "npm:@sentry/browser",
"version": "5.24.2"
}
],
"version": "5.24.2",
"integrations": [
"InboundFilters",
"FunctionToString",
"TryCatch",
"Breadcrumbs",
"GlobalHandlers",
"LinkedErrors",
"UserAgent",
"Vue"
]
},
"timestamp": 1601906783.064,
"environment": "web",
"release": "5.7.9",
"request": {
"url": "https://www.myetherwallet.com/interface/send-transaction",
"headers": {
"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0"
}
},
"tags": {
"network": "GOERLI",
"service": "myetherwallet.com-ws",
"walletType": "bitbox02"
}
}
The current installer fails on my M1 MacBook Air running macOS 13.3.1.
I've tried downloading older versions to no avail. Nothing happens when opening http://127.0.0.1:8178/ thus I do not believe the BitBoxBridge has been successfully installed.
I've tried also Ctrl+Open'ing the .pkg file to ensure it bypasses the security checks. I have signed developers as enabled in my System Settings. No luck.
Any thoughts? Is the installer genuinely bugged for macOS?
The v1.3.0 installer is run on Windows 10 Pro:
Setup Failed
One or more issues caused the setuo to fail. Please fix the issues and then retry setup.
For more informations see the log file.
0x800700e8 - Die Pipe wird gerade geschlossen.
And here's how logs look like:
i001: Burn v3.11.2.4516, Windows v10.0 (Build 19042: Service Pack 0), path: C:\Windows\Temp\{0892CFB1-0BC2-4CA0-B2A4-CB895C47E4DC}\.cr\BitBoxBridge-1.3.0-Win64-installer.exe
i009: Command Line: '-burn.clean.room=C:\Users\xxx\Downloads\BitBoxBridge-1.3.0-Win64-installer.exe -burn.filehandle.attached=548 -burn.filehandle.self=576'
i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\xxx\Downloads\BitBoxBridge-1.3.0-Win64-installer.exe'
i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\Users\xxx\Downloads\'
i000: Setting string variable 'WixBundleLog' to value 'C:\Users\xxx\AppData\Local\Temp\BitBoxBridge_20210606161416.log'
i000: Setting string variable 'WixBundleName' to value 'BitBoxBridge'
i000: Setting string variable 'WixBundleManufacturer' to value 'Shift Cryptosecurity'
i000: Setting numeric variable 'WixStdBALanguageId' to value 1033
i000: Setting version variable 'WixBundleFileVersion' to value '1.3.0.0'
i100: Detect begin, 1 packages
i101: Detected package: BridgePackage, state: Absent, cached: None
i199: Detect complete, result: 0x0
i200: Plan begin, 1 packages, action: Install
i000: Setting string variable 'WixBundleRollbackLog_BridgePackage' to value 'C:\Users\xxx\AppData\Local\Temp\BitBoxBridge_20210606161416_000_BridgePackage_rollback.log'
i000: Setting string variable 'WixBundleLog_BridgePackage' to value 'C:\Users\xxx\AppData\Local\Temp\BitBoxBridge_20210606161416_000_BridgePackage.log'
i201: Planned package: BridgePackage, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register
i299: Plan complete, result: 0x0
i300: Apply begin
i010: Launching elevated engine process.
i011: Launched elevated engine process.
e000: Error 0x800700e8: Failed to wait for child to connect to pipe.
e000: Error 0x800700e8: Failed to connect to elevated child process.
e000: Error 0x800700e8: Failed to actually elevate.
e000: Error 0x800700e8: Failed to elevate.
i399: Apply complete, result: 0x800700e8, restart: None, ba requested restart: No
@NickeZ any ideas?
This is really a showstopper for me. Currently I have to stay with Ledger for my web3.js activities because this device has an integration with MetaMask. The existing support for MEW (My Ether Wallet) is not helpful either, because the bridge can only be used to operate the proprietary portal. MEW CX has no support for the bridge, too.
see also MetaMask/metamask-extension#8119 (one year old π )
/opt/shiftcrypto/bitbox-bridge/bin/bitbox-bridge ; exit;
~ % /opt/shiftcrypto/bitbox-bridge/bin/bitbox-bridge ; exit;
zsh: killed /opt/shiftcrypto/bitbox-bridge/bin/bitbox-bridge
Saving session...
...saving history...truncating history files...
...completed.
Deleting expired sessions...none found.
/opt/shiftcrypto/bitbox-bridge/bin/bitbox-bridge ; exit;
~ % /opt/shiftcrypto/bitbox-bridge/bin/bitbox-bridge ; exit;
Set RUST_LOG=<filter> to enable logging. Example RUST_LOG=debug
listening on http://127.0.0.1:8178
[2021-04-06T18:08:58Z INFO bitbox_bridge::usb] Notified!
thread 'main' panicked at 'error binding to 127.0.0.1:8178: error creating server listener: Address already in use (os error 48)', /tmp/cargo/registry/src/github.com-1ecc6299db9ec823/warp-0.2.1/src/server.rs:211:27
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
cc @x1ddos
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.