wallabyjs / console-ninja

Repository for Console Ninja questions and issues
https://console-ninja.com
Other
385 stars 22 forks source link

[Bug]: errors when upgrading to nextjs 15 rc2 #347

Closed robreiss closed 1 month ago

robreiss commented 1 month ago

What happened?

Errors are reporting when using nextjs 15 rc2 and Console Ninja with a console.log in a client component.

VM7412:1 params are being enumerated. params should be unwrapped with React.use() before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis Error Component Stack

Version

Pro

CLI command to start your dev tool

na

Steps to reproduce (or sample repo)

na

Log output

na
ArtemGovorov commented 1 month ago

Hello,

according to https://nextjs.org/docs/messages/sync-dynamic-apis, this may indicate that you are logging props from Dynamic APIs.

So the issue doesn't look to be Console Ninja specific, and of you console.log something from Dynamic APIs, you should be getting the same error without Console Ninja, or with it paused.

Also, while reported as an error, it looks like at the moment it is just a warning that should not affect your code execution, so you may be able to simply ignore it.

robreiss commented 1 month ago

Your right, I am not sure if its console ninja or not. I didn't have time to go into it in depth. When I pause console ninja or remove the "console.log" statement the problem goes away. Just thought I would give you a heads up. You can delete the bug report if you like. Have you tried console ninja with nextjs 15 rc2?

ArtemGovorov commented 1 month ago

Have you tried console ninja with nextjs 15 rc2?

I have tried nextjs 15 rc1, and was able to reproduce the issue with and without Console Ninja there.

robreiss commented 1 month ago

I started with a fresh "create-next-app"

confirmed no errors with next@15.0.0-rc.0 confirmed there are errors with next@15.0.0-rc.1 confirmed fixed and no errors with next@15.0.0-canary.197

I assume the following fix in canary 197 of nextjs fixed it:

[dynamicIO] Do not warn on arbitrary param access in browser: https://github.com/vercel/next.js/pull/71437

So just a heads up, people trying nextjs rc 2 (i.e. next@15.0.0-rc.1) will see errors, but if they upgrade to a canary past 197 the errors will go away.