reown-com / appkit

The full stack toolkit to build onchain app UX
https://reown.com/appkit
Apache License 2.0
4.91k stars 1.4k forks source link

Connection declined. Connection can be declined if a previous request is still active #2517

Open Ay7ot opened 7 months ago

Ay7ot commented 7 months ago

Discussed in https://github.com/orgs/WalletConnect/discussions/4310

Originally posted by **Ay7ot** March 9, 2024 This is my first time working with Web3Modal and I'm using react. I'm running into a kind of bug. When Itry to connect from a mobile browser or a browser that doesn't have an extension installed, i get the error Connection declined. Connection can be declined if a previous request is still active. My Context provider code looks like this: `import { createWeb3Modal } from '@web3modal/wagmi/react' import { defaultWagmiConfig } from '@web3modal/wagmi/react/config' import { injected, metaMask, safe, walletConnect } from 'wagmi/connectors' import { WagmiProvider } from 'wagmi' import { arbitrum, mainnet } from 'wagmi/chains' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' // 0. Setup queryClient const queryClient = new QueryClient() // 1. Get projectId at https://cloud.walletconnect.com const projectId = 'MY_PROJECT_ID' // 2. Create wagmiConfig const metadata = { name: 'Web3Modal', description: 'Web3Modal Example', url: 'http://localhost:5173', // origin must match your domain & subdomain icons: ['https://avatars.githubusercontent.com/u/37784886'] } const chains = [mainnet, arbitrum] const config = defaultWagmiConfig({ chains, // required projectId, // required metadata, // required enableWalletConnect: true, // Optional - true by default enableInjected: true, // Optional - true by default enableEIP6963: true, // Optional - true by default enableCoinbase: true, // Optional - true by default }) // 3. Create modal createWeb3Modal({ wagmiConfig: config, projectId, enableAnalytics: true // Optional - defaults to your Cloud configuration }) export function ContextProvider({ children }) { return ( {children} ) }` I basically followed the doc on installation and I dont know why this is happening. My button is in my app folder and yes, i wrapped my App in ContextProvider.
0xSzeth commented 6 months ago

Any update on this? Currently experiencing the same error.

ifeoluwaayo commented 6 months ago

Having this same issue

imjakechapman commented 5 months ago

Literally dealing with same thing right now. I have no connection windows open or anything.

yaman1337 commented 5 months ago

I'm also facing the same problem.

socheatleang commented 5 months ago

We are on the same league. Waiting hero to come now.

vectris-dev commented 4 months ago

Over 1 month later, I'm experience this issue. Any updates?

linear[bot] commented 3 months ago

APKT-693 Connection declined. Connection can be declined if a previous request is still active

lorraineS commented 3 months ago

Still active.

manish252488 commented 3 months ago

still this issue is there ? 💔

bond-aspecta commented 2 months ago

Oh mine. I am facing this right now.

Well, OK. I think I should

  1. just show "Account" modal, since the error message. says "previous request is still active",
  2. or call wagmi disconnect() then show this connect modal.

Cool!

rhamnett commented 1 month ago

Had to subscribe to this as facing similar issues

JoshFransix commented 1 month ago

This error just hit me this morning, any updates please??

DmitriyStoyanov1 commented 2 days ago

also got this issue today

zhanzhanxi commented 2 days ago

I'm facing the same problem too. Looking forward to a good solution

AnesBkdm commented 1 day ago

Same here, "Connection Declined - Connection can be declined if a previous request is still active".

Impossible to connect from our Expo app on both Wagmi and Ethers.