Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify iframe failed to load #3500

Closed
gritaliana opened this issue Aug 18, 2023 · 44 comments
Closed

Verify iframe failed to load #3500

gritaliana opened this issue Aug 18, 2023 · 44 comments
Labels
type: bug Something isn't working

Comments

@gritaliana
Copy link

Describe the bug
Connection with any wallet is not working on https: protocol.
On localhost still everything works fine.

Modal opens with no console Errors, but after I scan a QR code with Metamask / Trust wallets, this error occurred and nothing else happens. Modal remains open, in wallet no response. Just an error in our web dApp:

image

And also tried to connect to dev environment on your https://react-wallet.walletconnect.com/walletconnect:

image

SDK Version (if relevant)
"next": "^12.2.2",
"@walletconnect/modal": "^2.6.1",
"@walletconnect/sign-client": "^2.10.0",

To Reproduce
As described in following issue. I have updated to the latest version of the sign-client. But there is another bug in connection.
#3492

Expected behavior
Connection between our web dApp and any wallet, at least Metamask, is working on https: protocol.

Desktop:
OS: [macOS, iOS]
Browser [Chrome]
Version [Version 115.0.5790.170 (Official Build) (arm64)]

Smartphone:
Device: [iPhoneX]
OS: [iOS 16.5.1]

@gritaliana gritaliana added the type: bug Something isn't working label Aug 18, 2023
@gritaliana
Copy link
Author

In Explorer tab in cloud.walletconnect.com I have filled in a Homepage and a Web App fields with the same url to our dev website.
Turn on the switch for the sign client v2 support.
The project itself is still in Draft version. And as I understood wallet connect must be working at this point.

Is there anything, that I am missing in configuration on cloud website?

image

@glitch-txs
Copy link

Hi, does this happen on production and dev env or only prod?

@gritaliana
Copy link
Author

We haven't released this feature on prod yet. Because we have no opportunity to test it on dev.
So, I am not secure what will happen on production.

@gritaliana
Copy link
Author

Do we have correct configurations in cloud walletcollect?
I have added screenshots in this issue also. #3492

@glitch-txs
Copy link

glitch-txs commented Aug 18, 2023

can you try setting swcMinify to false in the next.config.js file?

Your cloud config is ok :)

@gritaliana
Copy link
Author

Okay, with swcMinify: false we are moving forward a little bit. But transactions are not working.

The connection is processed, even if there is still this verify error in the console. The personal_sign also is working now, but again with verify error in the console.

But, when I am opening a modal to make the transaction, eth_sendTransaction, Metamask is able to make a connection, I am approving it, and when we, as a dApp, request the transaction - nothing is happening. No errors in metamask, no new errors in console.

I might have add, that we start every time a new session. And after transaction's success/error - we disconnect the session.

After a while, we just receive this error in the console:
image

@glitch-txs
Copy link

could you confirm your MetaMask version is 7.4 or above?

@gritaliana
Copy link
Author

Yes, I am on v7.4.0 (1159).
In App Store no new updates.

@glitch-txs
Copy link

thanks!

  • Could you test on labs? To check if this is a local issue
  • Could you share a minimal reproducible example of the issue? Can be a public repo or something like StackBlitz

@gritaliana
Copy link
Author

Yep, sure. I will share an example in a while.

And I didn't catch what to check on labs, that you have provided?
There are modals, btw "With Ethers Wagmi" opens 404.
So I have checked "With Wagmi" modal. I can connect to it from my iphone with Metamask. But there is not button to check a transaction.

P.S. on our dev Trust wallet works for transaction. The question is about transactions in Metamask.

@zolotokrylin
Copy link

We have the same error as here #3500 (comment)

@zolotokrylin
Copy link

I think it is worth mentioning that the rejection happens on the Trust Wallet side.
image

@glitch-txs
Copy link

glitch-txs commented Aug 22, 2023

@zolotokrylin are you using testnet chains? this seems like a different issue.
Related to the verify one it shouldn't cause any issues right now, we're currently fixing it, it's realted to our verify API and we're adding localhost to the whitelist to avoid this error on dev.

@zolotokrylin
Copy link

Yes.

@glitch-txs
Copy link

@zolotokrylin Trust doesn't support Testnet, you can add those chains in optionalChains/namespaces

@gritaliana
Copy link
Author

I have an update. Transactions were not working with one of the test networks.
We checked with Mainnet and Goerli - works fine on dev with Metamask!

@liubin595338764
Copy link

@glitch-txs I also encountered this problem. May I ask when it can be fixed?

@gritaliana
Copy link
Author

We have released Wallet Connect. It works on production.
Although, I have a question - will the problem with swcMinify: true in next.config.js fixed in near future?

@AndreasGassmann
Copy link

We're also seeing this issue. It's an angular project, so we can't set swcMinify. Any ideas how this can be fixed?

@glitch-txs
Copy link

glitch-txs commented Sep 5, 2023

swcMinify: true issue is unrelated to the verify error, latest version of Next uses swc under the hood which is supported by WalletConnect.

The verify error should not affect the functionality of your app, if there's an issue might be related to something else, feel free to open an GitHub discussion on the topic.

@AndreasGassmann
Copy link

We use the WalletConnect SDK as part of our Beacon SDK. After updating to ^2.9.0 (previously 2.7.0), we had some projects complain about this error.

The verify error should affect the functionality of your app

Did you mean to say that it should not affect the functionality of our app?

@glitch-txs
Copy link

yes @AndreasGassmann sorry for the typo

@DanielSinclair
Copy link

@glitch-txs Seeing the same behavior after upgrading WalletConnect dependencies. The console errors will appear about 5 seconds after the WalletConnectConnector in wagmi@1.4.1 is initialized, before calling connect or requesting the URI. I believe our deployment is properly whitelisted with WalletConnect Cloud.

Screenshot 2023-09-07 at 2 01 26 AM

@sunmer
Copy link

sunmer commented Sep 7, 2023

+1 this started happening after I upgraded to wagmi 1.4.1 and using connectkit 1.5.0

@AndreasGassmann
Copy link

I can confirm that this error disappears after downgrading to 2.7.0. And I can also confirm that WC2 (on 2.9.0) still works, despite this error.

However, I would like to have some clarification around what is happening. We have released our beacon-sdk with a reference to version 2.9.0, which means dApps will get that error and might not upgrade because of it. Depending on what the underlying issue is, we can either downgrade to 2.7.0 again and release a new version of our beacon-sdk until you release a new version that fixes it, or if its a serverside fix that you are working on, we can keep the current version and tell our users that it will be fixed.

Thanks a lot for the help.

@glitch-txs
Copy link

Hi everyone we're currently working on a fix for this, in the meantime this error can be ignored and shouldn't affect WalletConnect functionalities. If you're experiencing a problem in terms of functionality please feel free to open a new discussion/issue so we can look into it, thanks 🙏

@Srivastava57Harsh
Copy link

I am also facing the same issue, moreover i cant see the popup opening for a wallet connection.

@matthewmuscat
Copy link

Any update @glitch-txs ?

@glitch-txs
Copy link

glitch-txs commented Sep 12, 2023

Update:

To add a little bit of context: We've integrated Verify API recently which prevents Wallets from connecting to unverified domains. So this error will show whenever a domain wasn't verified on cloud or when runnning on localhost (since localhost wasn't verified either - and it shouldn't).

To minimize the confusion we've changed this message from error to info when logged - see PR #3626
And we are working on a way to suppress it or minimize it for local environment.

@mr-zwets
Copy link

problem is that the link in Verify iframe failed to load: https://verify.walletconnect.org is dead.
for me downgrading from version "@walletconnect/sign-client": "^2.10.0" to "@walletconnect/sign-client": "^2.9.2", worked

@ganchoradkov
Copy link
Member

ganchoradkov commented Sep 14, 2023

This issue is now resolved as of 2.10.1, the log was updated from error (confusing) to info

@simondlr
Copy link

FYI. Experiencing the same issue now when using web3modal/react (since it's on 2.7.1 core). Because web3modal is relatively far behind, unsure what the best course of action is here?

@glitch-txs
Copy link

@simondlr it needs to be updated in wagmi repo

@NatPDeveloper
Copy link

@simondlr it needs to be updated in wagmi repo

Yes I believe so. https://github.com/wagmi-dev/wagmi/blob/main/pnpm-lock.yaml#L312. I have a version that seems to be using 2.9.0 that is working but even after cherry picking versions after diff checking the package locks, it's still not working for me.

@simondlr
Copy link

simondlr commented Sep 15, 2023

I dropped web3modal/react and web3modal/ethereum down to 2.7.0 that uses 2.7.0 across the board and it now works, but that in turn opens up a whole new set of problems like missing #3230 which is causing the socket to be stalled randomly. Feel like the best approach here is to avoid web3modal/react altogether until 3.0.0 is done and implemented in web3modal and try implementing directly from core. 🤷‍♂️

@glitch-txs thoughts?

EDIT:

I have to dig in a lot more. In using Frame, when injecting Frame as-is, the verify iframe problem comes back, but injecting as metamask (with Frame) removes it, but then socket stalls. I'm doing a refactor to finally migrate from v1 and this will take a substantially larger re-write to fix. I'll relay more when I hopefully get around to fixing this.

@NatPDeveloper
Copy link

I was able to get everything working on

    "wagmi": "1.3.9",
    "@wagmi/core": "1.3.8",
    "@wagmi/connectors": "2.6.6",
    "@walletconnect/utils": "2.9.0",
    "@walletconnect/core": "2.9.0",
    "@walletconnect/ethereum-provider": "2.9.0",
    "@web3modal/ethereum": "^2.7.1",
    "@web3modal/react": "^2.7.1",
    "viem": "^1.5.3",
    "ethers": "^6.7.0",

Also needed this fix.

hirosystems/stacks.js#1096 (comment)

Also

      overrides: {
        from: address,
        value: ethers.parseEther(inputValue),
      },
      
      ->
      
      value: ethers.parseEther(inputValue),

@glitch-txs
Copy link

PR merged

@bitcoinski
Copy link

Pretty frustrating. The only way I can get WC to work on localhost is to create a new project and use a fresh projectId. Then a few hours later I start to get the "Refused to frame 'https://verify.walletconnect.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors" error

@glitch-txs
Copy link

@bitcoinski which version are you using?

@bitcoinski
Copy link

@glitch-txs

"@wagmi/core": "^1.4.1",
"@web3modal/ethereum": "^2.7.1",
"@web3modal/html": "^2.7.1",
"viem": "^1.10.12",

@glitch-txs
Copy link

@bitcoinski can you update all packages including wagmi? I think it should be 1.4.2 or higher if I'm not mistaken

@bitcoinski
Copy link

bitcoinski commented Sep 19, 2023

Still getting the iframe error with:

"@wagmi/core": "^1.4.2",
"@web3modal/ethereum": "^2.7.1",
"@web3modal/html": "^2.7.1",
"viem": "^1.10.14"

This *is blocking because it throws an error, not an info.

Appreciate the help @glitch-txs

Trying to follow: https://docs.walletconnect.com/2.0/web3modal/html/wagmi/installation

@bitcoinski
Copy link

@glitch-txs but as mentioned before, if I create a new ProjectId from cloud.walletconnect then it works on the first try

@glitch-txs
Copy link

Can you update all the dependencies? Also maybe reinstalling node_modules/clearing cache/storage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests