Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

Metamask + Trezor pop up window automatically closes without signing #784

Open
Tracked by #4962
ChooChooCC opened this issue Mar 21, 2021 · 143 comments
Open
Tracked by #4962
Assignees

Comments

@ChooChooCC
Copy link

When the pop up window shows up for me to sign transactions (the part where there is a green circle waiting to load), the window automatically closes before I can sign anything, and in my metamask activity it says "Failed, send X coin".

@prusnak
Copy link
Member

prusnak commented Mar 21, 2021

Which OS are you using?
Which browser are you using?

@ChooChooCC
Copy link
Author

Mac and brave. The workaround I found is to downgrade to firmware 2.3.0, and reset the metamask and clear my browser cache, now it works with the older version.

@prusnak
Copy link
Member

prusnak commented Mar 21, 2021

Brave is not supported. Please, try if this works in Chrome.

@SophieElle
Copy link

I also use the brave browser and had problems confirming a certain transaction for weeks for the same reason.

Then it worked. I used the Trezor suite (beta version) for this.

And now it does not work AGAIN.
What could be the reason for this?

The problem: the metaMask wallet I use is connected to the BraveBrowser. I can NOT open this particular wallet anywhere else because of Trezor, as I do not have the private key! :(

so I urgently need your help for this problem

@bradwbradw
Copy link

bradwbradw commented May 27, 2021

@prusnak it's also broken in Chrome. I'm also a Brave user, but I just tried connecting the Trezor to Metamask in Chrome so that I can test, but the popup closes immediately before signing, and then the metamask page is stuck on the "Looking for your Trezor" screen

Screen Shot 2021-05-27 at 3 08 57 PM

Im using:
OS: MacOS 10.15.7
Hardware Wallet: Trezor 1.10.0
Browser: Chrome Version 91.0.4472.77 (Official Build) (x86_64)
MetaMask Version 9.5.5

issue at Metamask:
MetaMask/metamask-extension#10896

@szymonlesisz
Copy link
Contributor

@bradwbradw do you have any popup blocker installed like Adblock, privacy Badger etc?

@bradwbradw
Copy link

bradwbradw commented May 28, 2021

hey @szymonlesisz , I just disabled adblock, and turned off "pops up and redirects allowed" in chrome, restarted Chrome and tried again, but the problem still persists. This time, i did see the error "Device call in progress" in the metamask UI

@prusnak
Copy link
Member

prusnak commented May 28, 2021

@bradwbradw Please, try the same thing in the Incognito mode of Chrome.

@szymonlesisz
Copy link
Contributor

could you pls describe what you are doing step by step, bc. im not able to reproduce the issue.
From what i understand you are able to "connect hardware wallet" but you are not able to "sign transaction", is that right?
are you trying to send regular ETH or ERC20 token?

@bradwbradw
Copy link

bradwbradw commented May 28, 2021 via email

@szymonlesisz
Copy link
Contributor

i guess this will require additional debugging so i need to ask you to do the following:

  1. go to chrome://extensions/
  2. disable MetaMask extension
  3. enable "developer mode" (top right corner)
  4. enable MetaMask, now you should see additional option "inspect views", click on "background.html"
    Screenshot from 2021-05-28 15-36-17
  5. in opened console write: window.__TREZOR_CONNECT_SRC='https://connect.trezor.io/8/'; This will enable additional logs from trezor-connect.
    Screenshot from 2021-05-28 15-39-28
  6. try to "connect hardaware wallet", you should see a lot of logs like:
    Screenshot from 2021-05-28 15-42-42
  7. right-clik on the logs and "save as", then DM me the result ([email protected]) dont worry it should not contain any private data at this point

@bradwbradw
Copy link

bradwbradw commented May 28, 2021 via email

@faxotherapy
Copy link

faxotherapy commented Jun 4, 2021

Does anyone know a workaround to this issue? Because, in the mean time, Trezor no longer works with MetaMask. Pop-up window always unexpectedly closes before allowing me to do anything on Trezor. That's the huge impediment as it prevents me from interacting with any DeFi app. Again, on Polygon, issue still persits. I'm not keen at all at moving my funds on MM. Thank you.

@ChooChooCC
Copy link
Author

ChooChooCC commented Jun 4, 2021

@faxotherapy the workaround I found is that I downgraded the firmware 2.3.0 (for model T) and it works. I have been using this firmware version for a few month and it works fine.

@bradwbradw
Copy link

bradwbradw commented Jun 4, 2021 via email

@onetwoitsthewu
Copy link

onetwoitsthewu commented Jun 7, 2021

I am also having major issues with my Model T (firmware 2.3.6) with Metamask. If/when the popup does appear after making transaction request, it tells me that my Trezor device is inactive and that it is being used by another application. When I click on activate, either the pop-up will close and give me the "device was disconnected" error or it will forever spin the "loading" message and then time out saying "unable to claim interface." other times, the transaction just gets stuck in MM, but not appear as pending on etherscan so i have to manually "reset account" in MM to get rid of the stuck txns. is this a firmware issue, as this just started happening recently? any ideas on how to remedy? all of my crypto is effectively stuck at the moment which is no bueno.

@darkwing
Copy link

darkwing commented Jun 8, 2021

I was seeing my Trezor popup window closing upon an attempt to send today, with the following error: "Forbidden key path"

A quick Google search shows it appears it could be a firmware issue, but I haven't followed the provided steps to ensure they work.

Edit Removed link that I've not verified works to fix the issue.

@prusnak
Copy link
Member

prusnak commented Jun 8, 2021

A quick Google search shows it appears it could be a firmware issue, but I haven't followed the provided steps to ensure they work.

It's not a firmware issue. It's an issue of a caller (Metamask) using the wrong path for selected coin (i.e. not using m/44'/60' for Ethereum or m/44'/1' for any of the Ethereum testnet networks).

@szymonlesisz
Copy link
Contributor

I'm really trying to reproduce this but with no luck.
i'm just able to connect every time. there must must be something specific in your configuration and i don't know what it is...

my setup:

macOS Catalina 10.15.15
Metamask 9.5.9
Chrome 91.0.4472.77 - with and without adblock + privacy badger enabled
Brave 1.25.70 (chromium 91.0.4472.77)

Trezor 1.10.0 and 2.3.6
Trezor Bridge 2.0.27

i even tried it with older setups: older browsers, older MM extensions, older firmwares, custom firmwares, webusb - before chrome 91...

@trezor/qa pls help me out here

@ChooChooCC
Copy link
Author

@szymonlesisz Did you try reproduce that in alternative network other than ethereum mainnet like BSC, xDai, or Matic? I remember that's when it was failing for me.

@prusnak
Copy link
Member

prusnak commented Jun 9, 2021

@szymonlesisz Did you try reproduce that in alternative network other than ethereum mainnet like BSC, xDai, or Matic? I remember that's when it was failing for me.

Then you are just confirming my words from above:

It's not a firmware issue. It's an issue of a caller (Metamask) using the wrong path for selected coin (i.e. not using m/44'/60' for Ethereum or m/44'/1' for any of the Ethereum testnet networks).

Each coin has assigned path - https://github.com/satoshilabs/slips/blob/master/slip-0044.md - and no other path should be set.

I am almost confident it is this issue, because downgrade to 2.3.0 (where we did not check the paths) seems to fix the issue.

Metamask should catch error from Connect and show it in their UI, so it seems there are two issues with Metamask:

  • they are not using the correct paths for coins they use
  • they are not showing the error Connect returns ("Forbidden key path")

@faxotherapy
Copy link

faxotherapy commented Jun 9, 2021

MetaMask has gone too far on this issue. I will never ever again use MetaMask with Trezor. It simply is dangerous. It's totally unreliable. I'm currently in a leveraged position on Instadapp and I cannot unwind it, because I'm not offered to confirm on my Trezor after clicking on the Confirm button on MM pop-up window.

@szymonlesisz
Copy link
Contributor

Instead of downgrading the firmware you can try to temporary disable safety checks mentioned by @prusnak to see if that helps. Trezor will warn you about using invalid slip44 path.
This may help us to narrow down the issue which networks are using invalid paths in metamask.

  1. go to https://suite.trezor.io/web/settings/device/
  2. click on "edit" safety checks
    Screenshot from 2021-06-10 06-04-47
  3. set to "prompt" and confirm on Trezor
    Screenshot from 2021-06-10 06-05-27

@faxotherapy
Copy link

MetaMask has gone too far on this issue. I will never ever again use MetaMask with Trezor. It simply is dangerous. It's totally unreliable. I'm currently in a leveraged position on Instadapp and I cannot unwind it, because I'm not offered to confirm on my Trezor after clicking on the Confirm button on MM pop-up window.

I'm going to reply to myself. The issue seems to happen erratically. When it happens, one should try any combination of the following: close dApp tab/window (or quit/restart Firefox), Lock MM (then re-open it), switch network back and forth (e.g. Ethereum ⇌ Polygon), unplug/replug Trezor (if necessary, connect Trezor directly to USB port), clear cookies/cache for the dApp tab/window, sometimes opening MM in a tab first, and interacting with the MM tab instead of the MM pop-up window help.

The thing I understand is why any two or three of the combination above help solve the issue, at least temporarily.

@faxotherapy
Copy link

faxotherapy commented Jun 10, 2021

Instead of downgrading the firmware you can try to temporary disable safety checks mentioned by @prusnak to see if that helps. Trezor will warn you about using invalid slip44 path.
This may help us to narrow down the issue which networks are using invalid paths in metamask.

1. go to https://suite.trezor.io/web/settings/device/

2. click on "edit" safety checks
   ![Screenshot from 2021-06-10 06-04-47](https://user-images.githubusercontent.com/3435913/121463242-fd3d9d00-c9b1-11eb-8e88-b189f4c924e2.png)

3. set to "prompt" and confirm on Trezor
   ![Screenshot from 2021-06-10 06-05-27](https://user-images.githubusercontent.com/3435913/121463280-12b2c700-c9b2-11eb-9df1-ecbddb863323.png)

Don't really know whether the suggestion is addressed to me or not. If so, I'm a bit scared to break everything in my Trezor with these steps. Is it some kind of a debugging process for Trezor?

@bosomt
Copy link

bosomt commented Jun 10, 2021

I was able to reproduce and solve issue via Suite 21.6.1

As soon you change device setting via #784 (comment) you can send transactions.
Metamask was reporting Forbidden key path browser console.

Info:

  • Suite version: desktop 21.6.1 (0ce310eb30cff6396b91939d3293b34e8e50d7c1)
  • Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_4_0) AppleWebKit/537.36 (KHTML, like Gecko) TrezorSuite/21.6.1 Chrome/89.0.4389.69 Electron/12.0.0 Safari/537.36
  • Device: model T 2.4.0 regular

@STew790
Copy link

STew790 commented Jun 10, 2021

I can confirm what @bosomt wrote. With disabled safety checks, I was able to send a transaction. With enabled safety checks, i got the same error message.

Info:

  • Suite version: web 21.6.1 (0ce310eb30cff6396b91939d3293b34e8e50d7c1)
  • Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36
  • OS: Linux x86_64
  • Screen: 1920x1080
  • Device: model T 2.4.0 regular

@szymonlesisz
Copy link
Contributor

szymonlesisz commented Jun 10, 2021

@faxotherapy it was addressed to anyone having this issue

don't worry you will not break anything.
instead of receiving error (Strict full security) you will be prompted, asked for confirmation on device that the app (metamask) is trying to use incorrect/unknown derivation path (not assigned to requested coin by bip44 standard)

Screenshot from 2021-06-10 15-25-16
Screenshot from 2021-06-10 15-27-05

like @prusnak said:
downgrading to 2.3.0 helps only because this "safety check" was not implemented back then and even incorrect paths was allowed

@szymonlesisz
Copy link
Contributor

of course it would be better to have "safety checks" enabled (you can enable them back after you send your coins)

but since your assets are locked in metamask, this is the way how to work with them
again following @prusnak

Metamask should catch error from Connect and show it in their UI, so it seems there are two issues with Metamask:

    they are not using the correct paths for coins they use
    they are not showing the error Connect returns ("Forbidden key path")

@sime
Copy link
Member

sime commented Feb 27, 2023

Previously I mentioned Enkrypt. It uses the latest version of Trezor Connect v9.

We are only tracking issues with Trezor Connect v9. The version that MetaMask uses (v8) is deprecated.

@Phileicht
Copy link

@sime good to know.
Tried Enkrypt but couldn't find a way to connect it on opensea, even though it says so on their website and within the browser extension.

@terrymason
Copy link

I believe that @sirloinfurr is correct, and this is a CPU related issue. I had this issue on an older laptop - tried different browsers, even reinstalled the OS. It wasn't until I tried a more powerful desktop that I had no more problems.

@ss18ping
Copy link

Then it turns out that the matter is in very poor code optimization or some kind of leaks. Because in terms of resource consumption - there is no problem to sign a transaction even on an old mobile phone. When the Trezor popup opens, something happens, because of which the computer starts to warm up and the page crashes.

I wrote to the Metamask team, waiting for an answer.

@sime
Copy link
Member

sime commented Feb 27, 2023

@sime good to know. Tried Enkrypt but couldn't find a way to connect it on opensea, even though it says so on their website and within the browser extension.

I find MetaMask and Enkrypt can conflict with each other. I suggest disabling the MetaMask extension temporarily and see if Enkrypt then starts to wake up.

@sime
Copy link
Member

sime commented Feb 27, 2023

It wasn't until I tried a more powerful desktop that I had no more problems.

And

Then it turns out that the matter is in very poor code optimization or some kind of leaks.

This is the definition of a race condition. Which is innately hard to track down.

@Phileicht
Copy link

I removed MM extension from brave browser before I tried using Enkrypt. Unfortunately there is no Enkrypt listed in the 'Connect your wallet' list on opensea and it does not connect automatically. Even tried to use the connect with MM but it just brought me to the MetaMask homepage.

So, since Enkrypt, does not work with opensea and MetaMask-OS-Trezor seem to be a problem, to me it seems that I (we) don't have many options left. Buying a new laptop just to use MM with Trezor is not an option from a financial perspective.

I'll write Enkrypt and ask them if they have an idea and maybe opensea as well.
But as I understood so far, it is not an issue with Trezor but with MetaMask, so I'll write them as well...
Maybe someone is able to fix that.
If not, it would be sad but I guess I'd need to switch to a ledger or something

@sime
Copy link
Member

sime commented Feb 27, 2023

@Phileicht Brave is weird, Just tried to use it for the first time. I guess it conflicting with its built-in wallet.

Buying a new laptop just to use MM with Trezor is not an option from a financial perspective.

Enkrypt works as expected (for me at least) on Firefox and Chrome. No new laptop required.

Edit: Brave started working after re-starting it.

@Phileicht
Copy link

@sime it seems like in my case it has been an issue with Pocket Universe and the pop up to connect Enkrypt to OS.
Will check if it's working on chrome with the Pocket Universe extension.
And then I'll check if it's working good with Trezor connect. For now I only used the extension wallet.
Would definitely be an option, since I don't connect my Trezor with anything else and with OS only to move NFTs into a hot wallet.
Thanks for the recommendation.
I'll keep you updated.

@Phileicht
Copy link

Phileicht commented Feb 27, 2023

I had a little chat with Enkrypt, they will have a look at the conflict with Pocket Universe.
But after I connected an empty trezor wallet, it stopped being able to connect to OpenSea.
Even with disabled Pocket Universe and no other extension in brave as well as in chrome.
So sometimes Enkrypt is able to connect to OpenSea, sometimes not...so it is like trading one thing that does not really work for another.
To bad though, it does look good.
But just the fact that I'm not able to use any security extensions like Wallet Guard and Pocket Universe with that wallet at the moment, is kind of a no go for me.
So I'll pass for now on Enkrypt, but I'll keep an eye on it and guess I just have to hope that MM will fix that issue before I loose my patience and buy a ledger.

@qerphrail
Copy link

As I need to use Chrome as a browser I kindly ask for your help to work with Chrome and Metamask.
I noticed that there is an updated version of Trezor Connect which is Trezor Connect (v9). Could I deduce from the connect.trezor.io/8/popup.html popup window that the version I'm using is v8? And if so, is it possible to upgrade to v9?
I will greatly appreciate your help.

MetaMask recently merged Trezor Connect v9, should be released in version v10.25.0. But we don't have any control over that.

@sime Metamask version v10.25.0 is running. Is Trezor Connect v9 implemented?

@sime
Copy link
Member

sime commented Feb 28, 2023

Unfortunately, my prediction was wrong. Recently the internal dependency that uses Trezor Connect v9 was released, now it needs to be upgraded into the main repository of the extension: https://github.com/MetaMask/eth-trezor-keyring/releases/tag/v1.0.0

@qerphrail
Copy link

Unfortunately, my prediction was wrong. Recently the internal dependency that uses Trezor Connect v9 was released, now it needs to be upgraded into the main repository of the extension: https://github.com/MetaMask/eth-trezor-keyring/releases/tag/v1.0.0

Ok. We are looking forward to this implementation to resolve this issue.
Who can upgrade Trezor Connect v9 in the main extension repository for us?

@mroz22 mroz22 reopened this Mar 9, 2023
@Hannsek
Copy link

Hannsek commented Mar 10, 2023

@jvnovo Only MetaMask team.

@Phileicht
Copy link

New Update of MetaMask extension (10.26.1) still uses eth-trezor-keyring: ^0.10.0 and not v1.0.0 which would use Trezor Connect v9.
I guess we will still have to wait for that fix to happen in MetaMask.

For now, my solution, thanks to @sime is to use Enkrypt in Firefox, which seems to work very well so far.
But I only use it to transfer my NFTs on OpenSea to another wallet if I need to sell or to connect with anything, to claim utilities for example.
Until Enkrypt works alongside with security extensions like Wallet Guard or Pocket Universe, I will only use ist for that purpose.

I've already asked the Pocket Universe devs if they could fix the problem with Enkrypt, but they can't because Enkrypt seems to take control of the entire window.ethereum object, which causes errors on the Pocket Universe side.
I have asked Enkrypt about this, but there is no sign of this being fixed yet.

@karliatto
Copy link
Member

@Phileicht Could you please describe step by step how do get to that issue?
There are too many comments in this issue and some of them might be not related with the others. So some clarification will help in reproducing it.

I am trying to reproduce the issue with MetaMask and I am not able to.

It's possible that once MetaMask updates to @metamask/eth-trezor-keyring: v1.0.0 those issues will be fixed but anyway reproducing it before and after might help to make sure we do not see that issue anymore.

@Phileicht
Copy link

@karliatto
Sure.
I did test again yesterday after I did an update for Trezor firmware to v1.12.1 and suite to v23.3.2.
After the update it seemed to work, until I did a reboot of my system this morning.
But this happened before.

  • Sometimes it worked again (one time or for a few hours/days) and then stopped working again without changing anything.
  • Sometimes it worked one time but after log out and log in again the problem came back.
  • Sometimes it worked after disabling or removing some extensions (Wallet Guard, Pocket Universe, etc) and restarting the browser, but after reboot, the problem came back again.
  • Sometimes it happened after connecting OpenSea to another account in MetaMask and then log out from OS, switch to the hardware wallet account and log in to OS again.

Here is what I did this morning:

  1. Connect Trezor to Computer
  2. Open Trezor Suite on Win10 and connect Trezor
  3. Open Chrome on Win10 with MetaMask Extension
  4. Open https://opensea.io/account and connect to MetaMask
  5. Log in to MetaMask -> "hot"-wallet account connected
  6. Log out of OpenSea
  7. Switch in MetaMask to the connected hardware wallet (Trezor) account.
  8. Log in to OpenSea/connect MetaMask -> connected to hardware wallet account.
  9. Open Settings in OpenSea
  10. MetaMask ask to sign -> sign
  11. Trezor Connect pop up opens, tries to use Trezor Connect v8 and closes before I can sign anything

Tested with versions:
MetaMask v10.25.0 & v10.26.1
Trezor firmware v1.11.2 & v1.12.1
Trezor suite v23.2.1 & v23.3.2

Also tested with disabled and removed other browser extensions.

@bosomt
Copy link

bosomt commented Mar 23, 2023

QA OK

tested on macARM + Chrome + MetaMask and Windows 10 + Chrome + MetaMask /latest versions/

Device firmware: latest 2.5.3 firmware with Safety checks disabled.

I was able to login via signing on device with two separate accounts with some ETH present on account.
When i tried to sign with empty account popup just disappeared.

@aspiers
Copy link

aspiers commented Mar 25, 2023

I did not used to have this problem in general but since sometime in the last week or so, I'm now experiencing it 100% of the time on 3 different machines. In contrast MetaMask on Firefox works flawlessly with the trezord bridge running.

@sandbags-1
Copy link

I also have never had this problem for almost two years only started happening several weeks ago in chrome and Firefox, switched to edge which fixed the issue for a week but now is doing the same. Needs to be fixed or will be a mass exodus to ledger

@nisnevich
Copy link

I'm facing this nearly all the time with Trezor Model One on Chrome and Firefox. Sometimes resetting metamask, cleaning browser cache and reconnecting trezor helps, I'd say 30% of the time, and 70% popup just disappears and I can't sign anything. Very frustrating. I'm on Manjaro Linux, but I see people in this thread have faced the same on Win and macos.

I'd happily provide any troubleshooting info you may need.

@Hannsek
Copy link

Hannsek commented Apr 28, 2023

We are currently working on fix. No need any more info for now.

@qerphrail
Copy link

Hi team. Can you give us feedback on how the fix for this issue is going?
Impressively, I am unable to transact. Neither restarting the browser, deleting cookies, cleaning browser cache, etc. This glitch happens in any browser. With enough difficulty, previously, one or another transaction took place. As of today, no more.
The tension and anxiety when we need to transact with Trezor is becoming routine. Instead of bringing us security, Trezor is bringing us discouragement.
As it seems to us, Trezor says that the problem is with Metamask. But, the point is that the responsibility lies with Trezor and not with Metamask. The image being damaged is Trezor. It makes sense? For example, if there is a fault with the ZF transmission on a Ford truck, should I go to Ford or ZF for help? Obviously it's Ford, since I bought the product from them.
Please, gentlemen of the Trezor team, do what you can to help us. Call a meeting with the Metamask team. If necessary, pay to make it happen. Make an investment for this to happen and make a repair on behalf of your customers. This problem has been going on for over 2 years and it still hasn't been fixed! Is it conceivable that long?
Please help us as it is impractical to use Trezor.

@lostintime101
Copy link

lostintime101 commented May 12, 2023

Jvnovo's comment is accurate. I also can't get my Trezor to approve any MM smart contract interactions. The pop-ups disappearing was always frustrating issue for years, but now it's completely broken. Computer restarts or changing browsers no longer help. The account is bricked.

And to answer your question Jvnovo, yes, this problem has been going on for years and hasn't been fixed.

@sime
Copy link
Member

sime commented May 12, 2023

After a huge amount of time MetaMask has finally merged the necessary changes!

MetaMask/metamask-extension#18302

We are now eagerly awaiting the next MetaMask release.

@Hannsek
Copy link

Hannsek commented May 16, 2023

This repo is obsolete. Therefore we will archive it. We track all the issues connected to Connect in Trezor Suite repo.

Regarding this issue, we track all issues regarding Connect popup here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests