Dev Overlay: console.error object arguments always render as empty {}
Nobody has claimed this yet.
- 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
- Start the application in development (
next dev) - Load a page whose client component calls
console.error({ a: 1, b: 2 }) - 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.
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.errorcall and expects it to be legible in the overlay.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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