MyEtherWallet / etherwallet

https://vintage.myetherwallet.com
MIT License
2.33k stars 1.72k forks source link

Error opening Digital Bitbox wallet using local MyEtherWallet #1511

Open Le-JV opened 6 years ago

Le-JV commented 6 years ago

I'm trying to open an ethereum wallet (stored on a digital bitbox) on a local version of MyEtherWallet (latest version 3.11.2.2).

When inputting a password the following error is returned: "Error in event handler for (unknown): TypeError: str.match is not a function" though unfortunately no stack or any other useful information. It makes no difference whether the password is correct or not. The wallet connects fine using the live version, so there must be something different.

I have also tried serving it using a local http server.

Any pointers are appreciated, and thanks for all the hard work, truly an awesome wallet! :)

wparad commented 6 years ago

@OmniscientJV can you post that exact toolchain you are using along with the versions. I.e. digital bitbox, browser and version, operating system, etc...

Also related to #492

Le-JV commented 6 years ago

Yes, sorry, I should have mentioned this. I'm using the latest version of the digital bitbox firmware. Using Chrome 63.0.3239.132 on Windows 10.

dschinnerl commented 6 years ago

Hi, unfortunately the same issue. But Chrome 64.0.3282.167 (mac OS) but also happens with Firefox (58.0.2). It seems to fail in/during U2F communication I think... but still looking into it. (digital bitbox with latest firmware).

DigitalBitboxEth.prototype.getAddress, it seems localCallback gets executed and at least in my case digital bitbox returns error code == 2 and then it fails. :( Not sure if I can crack that nut... (and no, password is correct).

globalFuncs.getParityMsg: Here it dies. B/c it receives an object ({errorCode: 2}) and not a string. But I think the problem is somewhere before. B/c why does digital bitbox yield an error in the first place.

globalFuncs.getParityMsg = function (str) {
    for (var reg in this.parityErrors) {
        if (this.parityErrors.hasOwnProperty(reg)) {
            // Workaround to handle issue #1511
            if (typeof(str) === "object") {
              return JSON.stringify(str);
            }

            var args = str.match("^" + reg + "$");
            if (args) {

Well, "A web interface using the U2F protocol also exists, but it can only be accessed by whitelisted URLs hardcoded in the firmware." (Source: https://digitalbitbox.com/api). But studying the source code it should yield 6 and not 2 in that case. (See u2f_device.c: U2F_HIJACK_CODE) However, it may be the problem b/c (now) it works via https://www.myetherwallet.com/!

This means you can't use a local installation of https://www.myetherwallet.com/. :( (Well, you can, it's a bit of hassle though...)