Skip to content

(nextjs) Metamask connector doesn't inject walletclients anymore #4875

@elmariachi111

Description

@elmariachi111

Check existing issues

Describe the bug

Quite recently I observed, that when I'm connected with Metamask, the useWalletClient hook isn't providing its data. First noticed this while testing with MM on a Brave browser, and after the recent upgrade of Chrome to 142, I can also reproduce it there. I tested that within other environments and the issue seems to only occur when building on Nextjs (app router)

Link to Minimal Reproducible Example

https://demo-mm-privy-next-walletlcient-git-no-privy-welshare.vercel.app/

Steps To Reproduce

I created a repo & deployments to reproduce:

also on Stackblitz, but that doesnt work easily out of the box with next (try running pnpm dev twice) -> https://stackblitz.com/~/github.com/elmariachi111/demo-mm-privy-next-walletlcient?file=package.json

It works fine with Phantom & Brave wallets.

Screen.Recording.2025-11-14.at.14.01.55.mov

What Wagmi package(s) are you using?

wagmi

Wagmi Package(s) Version(s)

2.19.2

Viem Version

2.38.6

TypeScript Version

5.9.3

Anything else?

Nextjs seems to be the deeper cause for this. It worked fine until ~3 weeks ago. Chrome, Metamask had been updated in the meanwhile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions