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

Wallet not connecting all of a sudden #2275

Closed
wahabshah21 opened this issue Dec 23, 2024 · 16 comments
Closed

Wallet not connecting all of a sudden #2275

wahabshah21 opened this issue Dec 23, 2024 · 16 comments

Comments

@wahabshah21
Copy link

Hi. I am facing one strange issue.

All of a sudden happened, when I click on wallet connect, the rainbowkit modal opens and then once metamask is selected, metamask opens. But after I click the connect button in metamask, it shows connecting and the closes but wallet isn't connected and I see the retry button in rainbowkit Modal.

Even after clicking on retry same thing happens as explained above. However, if I go manually in metamask extension, choose different account to connect then it starts working and then I can switch between accounts too.

Same issue after disconnecting the wallet again.

I am curios because it started happening this morning and it was working previously perfectly. What could be the possible issue?
I have updated the version of both wagmi and rainbowkit wallet (to latest ones). But Still facing this wallet connection issue.

Any help or direction is appreciated.

Keeps on showing this even after confirmed from metamask (screenshot attached below)

image

Originally posted by @wahabshah21 in #1759 (comment)

Copy link

linear bot commented Dec 23, 2024

@github-actions github-actions bot deleted a comment Dec 23, 2024
@github-actions github-actions bot deleted a comment from berryMo27 Dec 23, 2024
@github-actions github-actions bot deleted a comment Dec 23, 2024
@github-actions github-actions bot deleted a comment Dec 23, 2024
@github-actions github-actions bot deleted a comment Dec 23, 2024
@wahabshah21
Copy link
Author

Hi

@ethanparker0103
Copy link

same issue here

@fclety
Copy link

fclety commented Dec 23, 2024

Same here

@ZimM-LostPolygon
Copy link

Same thing here.

@rainbow-me rainbow-me deleted a comment Dec 23, 2024
@shayesteMalekpour
Copy link

any update????

@theaaronhanks
Copy link

Same thing here

@jooohneth
Copy link

same

@DanielSinclair
Copy link
Collaborator

Investigating! Can't seem to replicate on our test dApp here via the MetaMask extension, WalletConnect, or the mobile app. Whomever can reply, please provide exact reproduction instructions with the following information:

  1. link to your dApp
  2. device, OS
  3. browser
  4. app or extension
  5. for app: mobile browser vs in-app browser
  6. MetaMask version number
  7. VPN or no VPN, or other network characteristics

@DanielSinclair
Copy link
Collaborator

If you happen to be using Wagmi 2.14.4, can you bump up to 2.14.5 and let me know if the issue has resolved? I see that the Wagmi team released a patch a few hours ago related to storage management issues in the prior release. https://github.com/wevm/wagmi/releases/tag/wagmi%402.14.5

@tip2663
Copy link

tip2663 commented Dec 24, 2024

add

const config = getDefaultConfig({
  appName:'your app',
  // ....
  // this fixed it for me, wagmi seems to have bugged out. 
  // i was hinted by tihs when trying walletConnect - it said `storage.getItem() is not a function`
  storage:createStorage({
    storage:localStorage
  })
})

@wahabshah21
Copy link
Author

I will try to update the wagmi to 2.14.5 like @DanielSinclair said and also look into @tip2663's response. Going to get back shortly

@fclety
Copy link

fclety commented Dec 24, 2024

2.14.5 did not solve the problem for me,
I had a similar stacktrace than before, involving Object.removeItem :

async removeItem(key) { await unwrap(storage.removeItem(``${prefix}.${key}``)); }

Called by onAccountsChanged

async onAccountsChanged(accounts) { [...] if (shimDisconnect) await ((_a = config.storage) == null ? void 0 : _a.removeItem(``${this.id}.disconnected``)); [...] }

The @tip2663's workaround works for me 👍

@wahabshah21
Copy link
Author

add

const config = getDefaultConfig({
  appName:'your app',
  // ....
  // this fixed it for me, wagmi seems to have bugged out. 
  // i was hinted by tihs when trying walletConnect - it said `storage.getItem() is not a function`
  storage:createStorage({
    storage:localStorage
  })
})

This actually worked 👏

Version upgrade didn't work for me (although using latest version as well)

@DanielSinclair
Copy link
Collaborator

DanielSinclair commented Dec 24, 2024

Can confirm that this has now been fixed as of Wagmi 2.14.6. The affected versions were 2.14.4 and 2.14.5, so please upgrade and pin to this new version. No code changes necessary.

@theaaronhanks
Copy link

I think this might need to be reopened, as upgrading to 2.14.6 still had the same issue as @fclety with Object.removeItem. The proposed workaround is working for me though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

11 participants