Skip to content

next.js issue with initial values and evm address #2215

@imornar

Description

@imornar

Describe the bug

I pulled the code npx degit Web3Auth/web3auth-examples/quick-starts/nextjs-quick-start w3a-quick-start
I see couple of issues:

To Reproduce

.1. When I start the app, console is full of errors Import trace for requested module:

.2. a) When I connect evm with metamask it seems to work, I see address from useAccount().
.2. b) When I refresh the page, on first render, address is undefined, so initialValue from cookies seems to not work.

.3. If I connect with social auth e.g. (google) evm address is undefined ( from useAccount )

Expected behavior

I would expect:

  1. No errors in server console
  2. b) evm address should be visible on first render (fetched from cookies)
  3. If I connect with non metamask options, I should be able to see generated evm address on success login

Device Info (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome / Brave
  • "@web3auth/modal": "^10.0.2",
  • node v22.11.0
  • pnpm 10.11.1

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