MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.57k stars 4.73k forks source link

There was an error with your transaction. Please try again. Opensea - Polygon #13103

Open forexpiphunter opened 2 years ago

forexpiphunter commented 2 years ago

I'm getting an error message when I sign a transaction on Opensea to sell my NFT on the Polygon network

"There was an error with your transaction. Please try again."

Metamask version:10.8.0 Trezor firmware version: 2.4.3

danjm commented 2 years ago

@forexpiphunter where do you see this error? can you share a screen shot?

forexpiphunter commented 2 years ago

I get this error message when I click on Unlock button here and then it will show me this error here

forexpiphunter commented 2 years ago

Any update on this? I got a $22k NFT stuck on Polygon I can transfer or sell.

MT00x commented 2 years ago

Same here

forexpiphunter commented 2 years ago

@danjm any update on this? Any workaround for this issue? I've tried to import my Trezor seed into the ledger but I can't find my eth address when adding hardware wallet to Metamask

darkwing commented 2 years ago

@forexpiphunter Is this something that had worked in the past? If you open the Developer Tools > Console in your browser, do you see error details?

MT00x commented 2 years ago

Is this something that had worked in the past?

Don't know, first time for me

If you open the Developer Tools > Console in your browser, do you see error details?

inpage.js:1 MetaMask - RPC Error: MetaMask Message Signature: TypeError: Cannot read properties of null (reading 'toArray') {code: -32603, message: "MetaMask Message Signature: TypeError: Cannot read properties of null (reading 'toArray')", data: {…}}

image

forexpiphunter commented 2 years ago

Is this something that had worked in the past? First time doing this

If you open the Developer Tools > Console in your browser, do you see error details?

inpage.js:1 MetaMask - RPC Error: MetaMask Message Signature: Error: Not supported on this device {code: -32603, message: 'MetaMask Message Signature: Error: Not supported on this device', data: {…}}code: -32603data: {originalError: {…}}message: "MetaMask Message Signature: Error: Not supported on this device"[[Prototype]]: Object

Jamby93 commented 2 years ago

Is this something that had worked in the past?

Don't know, first time for me

If you open the Developer Tools > Console in your browser, do you see error details?

inpage.js:1 MetaMask - RPC Error: MetaMask Message Signature: TypeError: Cannot read properties of null (reading 'toArray') {code: -32603, message: "MetaMask Message Signature: TypeError: Cannot read properties of null (reading 'toArray')", data: {…}}

image

I had exactly the same issue of @MT00x. That happens when trying to unlock USDC. OpenSea creates a signing request like this one: {"primaryType": "MetaTransaction", "types": {"EIP712Domain": [{"name": "name", "type": "string"}, {"name": "version", "type": "string"}, {"name": "verifyingContract", "type": "address"}, {"name": "salt", "type": "bytes32"}], "MetaTransaction": [{"name": "nonce", "type": "uint256"}, {"name": "from", "type": "address"}, {"name": "functionSignature", "type": "bytes"}]}, "domain": {"name": "USD Coin (PoS)", "version": "1", "verifyingContract": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174", "salt": "0x0000000000000000000000000000000000000000000000000000000000000089"}, "message": {"nonce": null, "from": "<REDACTED>", "functionSignature": "0x095ea7b3000000000000000000000000411b0bcf1b6ea88cb7229558c89994a2449c302cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"}}

The problem arise from the nonce parameter, which is of type uint256 but still with a value of null. The issue is actually in the ethereumjs-abi library, precisely here where the value is assumed to be not-nullable.

I was able to bypass this issue by opening a Developer tools inside the MetaMask extension, setting a breakpoint on line 19130 (might differ since is a pretty-print of the minified file), and patching the value of the field to be 0 instead of null. See below as an example. image

That made the signature goes flawlessly, USDC is now unlocked for me, and I was able to continue with the second signature and purchase.

PAV8L commented 2 years ago

sentry-install.js:1

   TypeError: Cannot read properties of null (reading 'toArray')

at f (common-1.js:30) at h (common-1.js:30) at Object.o.rawEncode (common-1.js:30) at Object.encodeData (background-1.js:1) at Object.hashStruct (background-1.js:1) at Object.sign (background-1.js:1) at Object.b [as signTypedData_v4] (background-1.js:1) at c.signTypedDatav4 (background-1.js:1) at c.signTypedData (background-1.js:1) at background-0.js:1 at async ke.signTypedMessage (background-0.js:1) (anonymous) @ sentry-install.js:1 (anonymous) @ common-2.js:37 await in (anonymous) (async) (anonymous) @ common-3.js:10 dispatch @ ui-0.js:1 signTypedMessage @ ui-2.js:1 signAction @ ui-4.js:1 m @ ui-0.js:1 @ ui-0.js:1 (anonymous) @ ui-0.js:1 k @ ui-0.js:1 C @ ui-0.js:1 P @ ui-0.js:1 j @ ui-0.js:1 Sn @ ui-0.js:1 le @ ui-0.js:1 jn @ ui-0.js:1 An @ ui-0.js:1 Rn @ ui-0.js:1 n.unstable_runWithPriority @ ui-0.js:1 Ko @ ui-0.js:1 ue @ ui-0.js:1 On @ ui-0.js:1 a @ sentry-install.js:1 common-2.js:37

   Uncaught (in promise) TypeError: Cannot read properties of null (reading 'toArray')

at f (common-1.js:30) at h (common-1.js:30) at Object.o.rawEncode (common-1.js:30) at Object.encodeData (background-1.js:1) at Object.hashStruct (background-1.js:1) at Object.sign (background-1.js:1) at Object.b [as signTypedData_v4] (background-1.js:1) at c.signTypedData_v4 (background-1.js:1) at c.signTypedData (background-1.js:1) at background-0.js:1 at async ke.signTypedMessage (background-0.js:1)

same issue with the above errors,,, any idea how i could fix this? many thanks in advance

PAV8L commented 2 years ago

Is this something that had worked in the past?

Don't know, first time for me

If you open the Developer Tools > Console in your browser, do you see error details?

inpage.js:1 MetaMask - RPC Error: MetaMask Message Signature: TypeError: Cannot read properties of null (reading 'toArray') {code: -32603, message: "MetaMask Message Signature: TypeError: Cannot read properties of null (reading 'toArray')", data: {…}} image

I had exactly the same issue of @MT00x. That happens when trying to unlock USDC. OpenSea creates a signing request like this one: {"primaryType": "MetaTransaction", "types": {"EIP712Domain": [{"name": "name", "type": "string"}, {"name": "version", "type": "string"}, {"name": "verifyingContract", "type": "address"}, {"name": "salt", "type": "bytes32"}], "MetaTransaction": [{"name": "nonce", "type": "uint256"}, {"name": "from", "type": "address"}, {"name": "functionSignature", "type": "bytes"}]}, "domain": {"name": "USD Coin (PoS)", "version": "1", "verifyingContract": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174", "salt": "0x0000000000000000000000000000000000000000000000000000000000000089"}, "message": {"nonce": null, "from": "<REDACTED>", "functionSignature": "0x095ea7b3000000000000000000000000411b0bcf1b6ea88cb7229558c89994a2449c302cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"}}

The problem arise from the nonce parameter, which is of type uint256 but still with a value of null. The issue is actually in the ethereumjs-abi library, precisely here where the value is assumed to be not-nullable.

I was able to bypass this issue by opening a Developer tools inside the MetaMask extension, setting a breakpoint on line 19130 (might differ since is a pretty-print of the minified file), and patching the value of the field to be 0 instead of null. See below as an example. image

That made the signature goes flawlessly, USDC is now unlocked for me, and I was able to continue with the second signature and purchase.

i dont know if you are able to help with the similar errors i am getting?

leglinne commented 2 years ago

Is this something that had worked in the past? First time doing this

If you open the Developer Tools > Console in your browser, do you see error details?

inpage.js:1 MetaMask - RPC Error: MetaMask Message Signature: Error: Not supported on this device {code: -32603, message: 'MetaMask Message Signature: Error: Not supported on this device', data: {…}}code: -32603data: {originalError: {…}}message: "MetaMask Message Signature: Error: Not supported on this device"[[Prototype]]: Object

I do have the same issue , not supported on this device, using the same specs. Latest trezor hardware and latest metamask, tried to downgrade, didn't help

PAV8L commented 2 years ago

this is the first time i am trying to use usdc i think thats why its doing to unlock the currency at first

leglinne commented 2 years ago

Eth on poly in my situation

Jamby93 commented 2 years ago

i dont know if you are able to help with the similar errors i am getting?

Yep, you problem seems to be the same as mine (which is different from the OP issue with Trezor). You should be able to debug Metamask extension with the basic Chrome guide, find the "common-1.js" file, put the breakpoint, perform the signing transaction, and execute the console command as I've done in the screenshot above. That of course need some basic knowledge of Developers Tools and debugging in general, which I'm afraid is a bit out of scope for this issue.

PAV8L commented 2 years ago

really aprpreciate your help, unfortunately this is way beyond my level of knowledge of developing, i will try to find someone who has more understanding and use your responses as a guidance. thanks so much

PAV8L commented 2 years ago

i dont know if you are able to help with the similar errors i am getting?

Yep, you problem seems to be the same as mine (which is different from the OP issue with Trezor). You should be able to debug Metamask extension with the basic Chrome guide, find the "common-1.js" file, put the breakpoint, perform the signing transaction, and execute the console command as I've done in the screenshot above. That of course need some basic knowledge of Developers Tools and debugging in general, which I'm afraid is a bit out of scope for this issue.

where would you suggest i would put the breakpoint in the file?

shin commented 2 years ago

Is this something that had worked in the past?

Don't know, first time for me

If you open the Developer Tools > Console in your browser, do you see error details?

inpage.js:1 MetaMask - RPC Error: MetaMask Message Signature: TypeError: Cannot read properties of null (reading 'toArray') {code: -32603, message: "MetaMask Message Signature: TypeError: Cannot read properties of null (reading 'toArray')", data: {…}}

image

I got the same error code, but the message is "Metamask Message Signature Error: Not supported on this device".

Screen Shot 2021-12-30 at 5 04 39
nodigyproject commented 2 years ago

@Jamby93 you saved my day!!! Respect!!!!!

DrFalki commented 2 years ago

I had the same issue. I´m using a ledger nano x with metamask. The fix for me was to change the rpc (advanced metamask settings) and to reset the account. Afterwards i could sign in my first attempt

leglinne commented 2 years ago

I had the same issue. I´m using a ledger nano x with metamask. The fix for me was to change the rpc (advanced metamask settings) and to reset the account. Afterwards i could sign in my first attempt

What did you change In the RPC settings to be exact?

DrFalki commented 2 years ago

I change the rpc following this guide https://docs.dfyn.network/guides/changing-polygons-rpc-endpoint-on-metamask and changed from https://polygon-rpc.com/ to https://matic-mainnet.chainstacklabs.com

leglinne commented 2 years ago

Tried the following, didn't help

DrFalki commented 2 years ago

Tried the following, didn't help

Did you reset your account too?

Bildschirmfoto 2022-01-05 um 20 36 56
leglinne commented 2 years ago

Yep, I did it too

safridwirizky commented 2 years ago

I had the same issue. I´m using a ledger nano x with metamask. The fix for me was to change the rpc (advanced metamask settings) and to reset the account. Afterwards i could sign in my first attempt

It work to me at Mozilla Firefox browser. You maybe should wait several minute in a stuck Open Currency process until this properly done (successfully)

mohamedmansour commented 2 years ago

I am getting this issue on voting for a proposal here: https://snapshot.org/#/ens.eth

'MetaMask Message Signature: Error: Not supported on this device'

Any idea how I can help debug it?

I have MetaMask 10.8.1, and Trezor 2.4.3

chankwpj commented 2 years ago

I change the rpc following this guide https://docs.dfyn.network/guides/changing-polygons-rpc-endpoint-on-metamask and changed from https://polygon-rpc.com/ to https://matic-mainnet.chainstacklabs.com

Doesn't work for me :(

nodigyproject commented 2 years ago

Just uploaded a video with solution for this bug - There was an error with your transaction. Please try again. Voice Russian, but easy to understand all steps.

https://youtu.be/DRtcWh9GufA

forexpiphunter commented 2 years ago

Hi, @dmitrii-laier I just tried your steps, and when I placed NFT for sale, I still got the same error message when using Trezor. I did put a breakpoint, but when I try to click Unlock again and when Metamask windows come up, and I click to sign, it would just give me the same error message.

nodigyproject commented 2 years ago

@forexpiphunter are you making changes after one skipped breakpoint? Network Polygon? I didn't test with trezor.

forexpiphunter commented 2 years ago

@dmitrii-laier In "watch" I add a "t" and retry the transaction again, but this is where the code break doesn't work, I will get the same error message. Yes, It's Polygon with trezor

nodigyproject commented 2 years ago
  1. Click unlock
  2. Skip first breakpoint
  3. On second breakpoint neet to open console tab and write t=0 (before changes t should contain NULL, some times variable not refreshing, need click to the variable and press ESC to refresh in watch section)
  4. Continue other breakpoints without any changes until the transaction will passed.

If it does not work, then I need to buy trezor and repeat your bug :)

nodigyproject commented 2 years ago

Hi, @dmitrii-laier I just tried your steps, and when I placed NFT for sale, I still got the same error message when using Trezor. I did put a breakpoint, but when I try to click Unlock again and when Metamask windows come up, and I click to sign, it would just give me the same error message.

Try to approve token with buy operation and after maybe sell operation will work.

leglinne commented 2 years ago

I will try to reproduce your solution and tell you if it works too

On Sat, 15 Jan 2022, 8:47 am Dmitrii Laier, @.***> wrote:

Hi, @dmitrii-laier https://github.com/dmitrii-laier I just tried your steps, and when I placed NFT for sale, I still got the same error message when using Trezor. I did put a breakpoint, but when I try to click Unlock again and when Metamask windows come up, and I click to sign, it would just give me the same error message.

Try to approve token with buy operation and after maybe sell operation will work.

— Reply to this email directly, view it on GitHub https://github.com/MetaMask/metamask-extension/issues/13103#issuecomment-1013626217, or unsubscribe https://github.com/notifications/unsubscribe-auth/APIV2BM4YQ7G6BFCBQVHRXLUWEKANANCNFSM5KEG4GUQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

leglinne commented 2 years ago

Hi, solution provided didn't help

сб, 15 янв. 2022 г. в 13:22, DubManZ Dub @.***>:

I will try to reproduce your solution and tell you if it works too

On Sat, 15 Jan 2022, 8:47 am Dmitrii Laier, @.***> wrote:

Hi, @dmitrii-laier https://github.com/dmitrii-laier I just tried your steps, and when I placed NFT for sale, I still got the same error message when using Trezor. I did put a breakpoint, but when I try to click Unlock again and when Metamask windows come up, and I click to sign, it would just give me the same error message.

Try to approve token with buy operation and after maybe sell operation will work.

— Reply to this email directly, view it on GitHub https://github.com/MetaMask/metamask-extension/issues/13103#issuecomment-1013626217, or unsubscribe https://github.com/notifications/unsubscribe-auth/APIV2BM4YQ7G6BFCBQVHRXLUWEKANANCNFSM5KEG4GUQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

Harikrishna1610 commented 2 years ago

image

Hi I'm getting cors error while i am trying to sign the message

cristoforo commented 2 years ago

Just uploaded a video with solution for this bug - There was an error with your transaction. Please try again. Voice Russian, but easy to understand all steps.

https://youtu.be/DRtcWh9GufA

This worked for me Metamask with Ledger Nano S

Happy-Ferret commented 2 years ago

Just uploaded a video with solution for this bug - There was an error with your transaction. Please try again. Voice Russian, but easy to understand all steps.

https://youtu.be/DRtcWh9GufA

I tried this. Didn't work for me, unfortunately.

MetaMask on Chrome.

EDIT: Same issue with MetaMask on Edge.

Admittedly, I'm new to all this. Do I need to have the exact amount (or more) of ETH in my wallet that I'm trying to sell the NFT for?

Goze24 commented 2 years ago

Guys u have to be connected to the network of the currency(e.x.eth polygon...) the nft ur looking to buy is to metamask

apdwivedi1208 commented 2 years ago

I was also getting the same issue. Mine go solve after changing to o Etherium Mainnet instead of Matic Mainnet in my metamask wallet.

forexpiphunter commented 2 years ago

Guys, Why are we talking about Ethereum and Ledger? This issue is happening only on Polygon network with Trezor using metamask

xorkz commented 2 years ago

agree with @forexpiphunter the comments here moved away from the original problem. The problem is that when using a Trezor with metamask on opensea and trying to transfer out a Polygon NFT when you click on SIgn in Metamask you will get an error "You declined the action in your wallet" and it does not bring up the trezor GUI but instead provides the error and does nothing. This is major problem as now Polygon NFT cannot be transfer out of the Trezor via metamask on Opensea. I'm using the latest Trezor firmware 2.4.3 and the latest version of metamask 10.8.1. It works fine with ETH NFT but does not work for Polygon NFT.

nNabakhteveli commented 2 years ago

I don't know why but when I disabled all chrome extensions it worked

dcsan commented 2 years ago

this issue is about polygon network, not hardware wallets. this is a common error mainly when trying to use opensea pages and pages of frustrated users https://www.reddit.com/r/opensea/comments/oqgeit/unable_to_unlock_currency/

does anyone know if this is an

issue?

it seems to come and go

leglinne commented 2 years ago

I've contacted Trezor support, opensea support, and MM support team. Throughout the process. Seems like this is the problem within metamask itself. And Devs are not hasty at all to solve this issue. I've been put on hold by their support team for almost 2 months now. No news

On Fri, 18 Feb 2022, 7:40 pm DC, @.***> wrote:

this issue is about polygon network, not hardware wallets. this is a common error mainly when trying to use opensea pages and pages of frustrated users https://www.reddit.com/r/opensea/comments/oqgeit/unable_to_unlock_currency/

does anyone know if this is an

  • opensea bug,
  • metamask or
  • polygon network congestion

issue?

it seems to come and go

— Reply to this email directly, view it on GitHub https://github.com/MetaMask/metamask-extension/issues/13103#issuecomment-1044898616, or unsubscribe https://github.com/notifications/unsubscribe-auth/APIV2BP5KDODEWSZ733HN4TU32ACJANCNFSM5KEG4GUQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

Jostino commented 2 years ago

I'm having the same excat issue, I changed the RPC endpoint to "https://matic-mainnet.chainstacklabs.com" and followed the youtube video but I dont have that same code. Any update?

EDIT: disabled Ghostery, reopened the page with the network console open and it's gone well. Now i have the issue on the signing message....

DMW-11 commented 2 years ago

Here's a simple fix that worked for me. Firstly, my art was part of a collection which had 3 payment tokens USDC and DAI all on the polygon net. I the error when trying to sign in to my metamask wallet. So I went into my collection and removed the tokens USDC and DAI and was only left with Eth Polygon and went and tried again and it worked. Haven't had the issue since then, as someone mentioned, may have something to do with the USDC token

King1Rossi commented 2 years ago

This is what mine keeps saying can anyone help me with this image

ZelalemG commented 2 years ago

Here is the fix that worked for me... First check if your internet connection is good. Log out of your meta mask or any other wallet that was connected to open sea. Again log out out of open sea and login back. Then try initiating your action from open sea, which will attempt to connect to meta mask or your wallet. Then you can unlock from there. Hope this helps.