MetaMask / metamask-extension

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

[Bug]: Approving an ERC-721 #14459

Closed failfmi closed 2 years ago

failfmi commented 2 years ago

Describe the bug

When trying to approve an ERC-721 collection with a tokenId, which is a very large number (e.g. Decentraland LAND Registry token ids), MetaMask gets stuck forever on loading:

image

Steps to reproduce

  1. Try approving a Decentraland token id (e.g. 2381976568446569244243622252022377480050, contract: https://etherscan.io/address/0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d)

Error messages or log output

No response

Version

10.12.4

Build type

No response

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

StilyanMitrev commented 2 years ago

Can reproduce as well

failfmi commented 2 years ago

I experience the same issue with other contracts (e.g. https://etherscan.io/token/0x79986aF15539de2db9A5086382daEdA917A9CF0C#writeContract, token Id 28) as well

zack53 commented 2 years ago

I am having the same issue with Firefox and Chrome. NFT contract https://mumbai.polygonscan.com/address/0xae87e56a9dF1Baf99F77B7A75F6EFDFD03bc41e5#writeContract . The token Id is 2.

MetaMask version: 10.12.4

fanz-emirarditi commented 2 years ago

I can also reproduce as well with version 10.12.4 while sending an approval request to an ERC721 contract with address: 0x8f9a72a1eeD064b205cDbAF09802C93873480507. What's weird is that, approve works for address 0x6a0D3EA61f9b78351a5b635Ce4738311f191BfB5. The only logical difference between them is that one sends an https link for tokenURI wile the other sends an ipfs link

JonnyFiat commented 2 years ago

Can reproduce, as well.

zack53 commented 2 years ago

I can also reproduce as well with version 10.12.4 while sending an approval request to an ERC721 contract with address: 0x8f9a72a1eeD064b205cDbAF09802C93873480507. What's weird is that, approve works for address 0x6a0D3EA61f9b78351a5b635Ce4738311f191BfB5. The only logical difference between them is that one sends an https link for tokenURI wile the other sends an ipfs link

The NFT I am having an issue with as well is a token URI with ipfs:// instead of the regular https:// https://mumbai.polygonscan.com/address/0xae87e56a9dF1Baf99F77B7A75F6EFDFD03bc41e5#writeContract

I actually created that NFT on the test net, so I am going to try and set the link to https:// to see if the approval will go through.

returnportal commented 2 years ago

Hoping for a fix soon 🙏 resulting in a total loss of new users for us

I can also reproduce as well with version 10.12.4 while sending an approval request to an ERC721 contract with address: 0x8f9a72a1eeD064b205cDbAF09802C93873480507. What's weird is that, approve works for address 0x6a0D3EA61f9b78351a5b635Ce4738311f191BfB5. The only logical difference between them is that one sends an https link for tokenURI wile the other sends an ipfs link

The NFT I am having an issue with as well is a token URI with ipfs:// instead of the regular https:// https://mumbai.polygonscan.com/address/0xae87e56a9dF1Baf99F77B7A75F6EFDFD03bc41e5#writeContract

I actually created that NFT on the test net, so I am going to try and set the link to https:// to see if the approval will go through.

Did you find out if it was ipfs:// ? Ours is, but no way to change it now (ipfs:// was common 1+ years ago, like pancake)

fanz-emirarditi commented 2 years ago

I have tried with

Hoping for a fix soon 🙏 resulting in a total loss of new users for us

I can also reproduce as well with version 10.12.4 while sending an approval request to an ERC721 contract with address: 0x8f9a72a1eeD064b205cDbAF09802C93873480507. What's weird is that, approve works for address 0x6a0D3EA61f9b78351a5b635Ce4738311f191BfB5. The only logical difference between them is that one sends an https link for tokenURI wile the other sends an ipfs link

The NFT I am having an issue with as well is a token URI with ipfs:// instead of the regular https:// https://mumbai.polygonscan.com/address/0xae87e56a9dF1Baf99F77B7A75F6EFDFD03bc41e5#writeContract I actually created that NFT on the test net, so I am going to try and set the link to https:// to see if the approval will go through.

Did you find out if it was ipfs:// ? Ours is, but no way to change it now (ipfs:// was common 1+ years ago, like pancake)

I have reconstructed the exact same scenario for both NFT's using ipfs and https, but both of them still stuck on approve. I have dived further to the differences of the 2 contracts that I have been trying to approve(one working and the other not, which I mentioned before on my comment) and find out that there was a slight difference between their supportsInterface mechanism. This is also mentioned on #14518 .

AlexHerman1 commented 2 years ago

@kevinghim having some inquiries about this and can reproduce, any status on a fix?

adonesky1 commented 2 years ago

On this now!

kevinghim commented 2 years ago

This will be fixed via https://github.com/MetaMask/controllers/pull/834

paul-zibarov commented 2 years ago

Still stuck with this, already tried update extension. Any tips? v. 10.15.0

adonesky1 commented 2 years ago

@paul-zibarov sorry for the delay, we are still in the process of rolling this out. A fix will be rolled out in 10.16.0

paul-zibarov commented 2 years ago

@paul-zibarov sorry for the delay, we are still in the process of rolling this out. A fix will be rolled out in 10.16.0

thanks, waiting for fix!

peculiarity commented 2 years ago

I don't think this is a ERC-721 related issue. I'm calling approve on ERC-20 from 2 separate UIs and the result is always the same - Metamask being stuck on loading forever. Please fix this ASAP. Also using 10.15.0 in Chrome.

returnportal commented 2 years ago

Agree, please let's get a release out ASAP, then all of us can check if our projects are still dead broken or some other fix was needed too 🙏 🙏 🙏

adonesky1 commented 2 years ago

I believe this issue should have been resolved as of version v10.16.2. Please check your version, update if necessary and let us know if you are still experiencing this issue or something similar, and include the contract address and token details.