Code Monkey home page Code Monkey logo

bitbox-bridge's People

Contributors

benma avatar johanneshoppe avatar nickez avatar thisconnect avatar tkone7 avatar x1ddos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitbox-bridge's Issues

Android support?

I've been using the Kiwi browser for Android since it allows the use of Chrome extensions. I've successfully used various wallets. Rabby installs fine - but doesn't even suggest my BitBox02 as a valid option. Can this be implemented?

Screenshot_20220604-192947
?

Generalize from "MyEtherWallet" to "Web"

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.

Larger messages

[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?

Issue launching bitbox-bridge on windows 10 - 64bit

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

Cannot connect BitBox02 on M2 Mac

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:

Screenshot 2023-04-14 at 1 05 44 PM

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).

Bridge apparently needed even for Chrome

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?

Installation & Launch issue on Mac with M1

  • MacBook with M1
  • Mac OS 11.2

Issues

  • Installation: Can install the BitBoxBridge via right-click > open.
    • Without right-click > "open" he get's an "developer cannot be identified" error.
  • After installation there is a "bitbox-bridge can't be opened" error that keeps poping up.
  • Launching BitBox-Bridge: When performing normal double click on the bitbox-bridge executable the terminal shows the following error:
/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.
  • Launching BitBox-Bridge: Performing a right-click > open on the bitbox-bridge executable opens terminal and shows the following error message:
/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.
  • Checking localhost in the browser, the bridge is running despite this error

cc @x1ddos

Consider creating a bridge + MEW bundle for offline use

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.

Support a web3 compatible wallet

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:

Consider supporting WalletConnect to connect to Metamask

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!

Whitelist MyEtherWallet for file:// origin

(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.

Support Goerli Testnet

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"
  }
}

Installer fails on macOS 13.3.1 M1

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?

https://imgur.com/a/OnYkM7y

Install error: 0x800700e8 - the pipe is being closed

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?

Support for MetaMask

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 😞 )

Installation & Launch issue on Mac with M1

  • MacBook with M1
  • Mac OS 11.2

Issues

  • Installation: Can install the BitBoxBridge via right-click > open.
    • Without right-click > "open" he get's an "developer cannot be identified" error.
  • After installation there is a "bitbox-bridge can't be opened" error that keeps poping up.
  • Launching BitBox-Bridge: When performing normal double click on the bitbox-bridge executable the terminal shows the following error:
/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.
  • Launching BitBox-Bridge: Performing a right-click > open on the bitbox-bridge executable opens terminal and shows the following error message:
/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.
  • Checking localhost in the browser, the bridge is running despite this error

cc @x1ddos

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.