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

bug: storage.removeItem is not a function #4475

Closed
1 task done
minionlancer28 opened this issue Dec 22, 2024 · 10 comments
Closed
1 task done

bug: storage.removeItem is not a function #4475

minionlancer28 opened this issue Dec 22, 2024 · 10 comments

Comments

@minionlancer28
Copy link

minionlancer28 commented Dec 22, 2024

Check existing issues

Describe the bug

Dear wagmi team.
When to connect wallet in next.js project, there is issue "TypeError: storage.removeItem is not a function"

I tried like this.

npm init @rainbow-me/rainbowkit@latest
npm run dev
Visit browser (http://localhost:3000) and click connect button with metamask wallet.
In that case, there is issue as the follows.

Unhandled Runtime Error
TypeError: storage.removeItem is not a function

Call Stack
Object.removeItem
webpack-internal:\node_modules@wagmi\core\dist\esm\createStorage.js (28:1)
Object.onAccountsChanged
webpack-internal:\node_modules@wagmi\core\dist\esm\connectors\injected.js (387:1)

how to fix it? it is wagmi bug, isn't it?

Link to Minimal Reproducible Example

No response

Steps To Reproduce

No response

What Wagmi package(s) are you using?

wagmi, @wagmi/core

Wagmi Package(s) Version(s)

2.16.1

Viem Version

2.17.0

TypeScript Version

5.5.2

Anything else?

No response

@minionlancer28 minionlancer28 changed the title storage.removeItem is not a function bug: storage.removeItem is not a function Dec 22, 2024
@kritik-sah
Copy link

kritik-sah commented Dec 22, 2024

Got the Same error TypeError: storage.removeItem is not a function
@minionlancer28 bro rollback to a stable version that worked for me "wagmi": "2.10.2"

@sinolopes
Copy link

Same problem for me, probably due to using next js 15,I tried to use cookie storage but it no longer works with headers()).get("cookie")

@pr15il
Copy link

pr15il commented Dec 23, 2024

this happens in the latest release ([email protected]) while in the previous release ([email protected]) there is no problem

@minionlancer28
Copy link
Author

Fixed with wagmi@"2.10.2"

@pr15il
Copy link

pr15il commented Dec 23, 2024

@kritik-sah bro why not use "wagmi": "2.14.3"?

@minionlancer28
Copy link
Author

Running with "2.14.3" ,too.
Thank you.

@lyfmantle
Copy link

same issue with 2.14.4, no problem with 2.14.3

@jxom jxom closed this as completed in 0129070 Dec 23, 2024
@chervyachok
Copy link

I'm using @wagmi/vue and faced same issue. Any suggestions how to fix it?

@dzek69
Copy link

dzek69 commented Dec 23, 2024

@chervyachok downgrade or wait for next release

Copy link
Contributor

github-actions bot commented Jan 7, 2025

This issue has been locked since it has been closed for more than 14 days.

If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Wagmi version. If you have any questions or comments you can create a new discussion thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants