web3modal icon indicating copy to clipboard operation
web3modal copied to clipboard

[bug] Connection declined when using the wagmi Safe connector

Open paintoshi opened this issue 1 year ago • 1 comments

Link to minimal reproducible example

https://github.com/paintoshi/web3modal-next-test

Summary

The safe connector from wagmi/connectors always saying "Connection declined, Connection can be declined if a previous request is still active". Tested on mobile too, served from a validated wallet connect domain and with the Safe mobile app installed, but it says the same thing. I would expect it to use the Safe wallet just as it uses Metamask.

image image

I made a minimal next.js app where you can click connect, then Safe to see the issue. Just have to yarn install and yarn dev to run it.

I also modified your stackblitz demo, using the exact same web3modal/wagmi config and library versions, but getting a different modal, see below. https://stackblitz.com/edit/web3modal-next-template-qwflf1?file=config%2Findex.tsx

image

I can't see any differences in the code, so I'm not sure why it works differently in stackblitz. But downloading the stackblitz project and running it locally (or on a server) will result in the same problem anyway. Appreciate any help to track this down.

List of related npm package versions

Node v20.12.2 "next": "14.2.2", "react": "18.2.0", "@web3modal/wagmi": "^4.1.11" "viem": "^2.9.25" "wagmi": "^2.5.20"

paintoshi avatar Apr 26 '24 10:04 paintoshi

I could not reproduce this issue. please re-open if it remains a problem

Sam-Newman avatar May 30 '24 10:05 Sam-Newman

@paintoshi , is it resolved? I am facing same issue

ravirasadiya avatar Oct 18 '24 10:10 ravirasadiya

Having same error. React, ethers v6, MetaMask.

gotnoshoeson avatar Oct 19 '24 03:10 gotnoshoeson

@Sam-Newman can we please re-open this?

ravirasadiya avatar Oct 19 '24 08:10 ravirasadiya