vercel / vercel/next.js

Dev Overlay: console.error object arguments always render as empty {}

Open
#96,209 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Error Overlay
Dominant language
JavaScript
Stars
142k
Forks
32.4k
Avg merge
2d 14h
Merged PRs (30d)
351

Description

Link to the code that reproduces this issue

https://github.com/MaxtuneLee/next-console-log-error-repo

To Reproduce
  1. Start the application in development (next dev)
  2. Load a page whose client component calls console.error({ a: 1, b: 2 })
  3. Open the Dev Overlay and expand the resulting "Console Error"
Current vs. Expected behavior

Following the steps above, I expected the Console Error panel to show the object's actual properties, e.g. {a: 1, b: 2}, the same content the browser's native devtools console shows for the same console.error call.

Instead, the Dev Overlay always renders the object as an empty {}, regardless of what properties it actually has. This happens for every plain object passed to console.error.

Image
Provide environment information
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 40634
  Available CPU cores: 16
Binaries:
  Node: 23.11.1
  npm: 10.9.2
  Yarn: N/A
  pnpm: 9.15.9
Relevant Packages:
  next: 16.3.0-canary.96 // Latest available version is detected (16.3.0-canary.96).
  eslint-config-next: N/A
  react: 19.2.8
  react-dom: 19.2.8
  typescript: 5.9.3
Next.js Config:
  output: N/A
Which area(s) are affected? (Select all that apply)

Error Overlay

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context
  • This only affects the display of the object in the Dev Overlay, no data loss elsewhere.
  • Also affects any React warning that logs a plain object as part of its console.error call and expects it to be legible in the overlay.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked reproduction repository, run the app with next dev, and reproduce console.error({ a: 1, b: 2 }) in the Dev Overlay. Trace the Console Error rendering path and verify that the overlay displays the object's properties rather than {} while preserving the existing behavior for other console errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nextjs, react
Domain
devtools, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.