Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error accessing params and queryparams when browser script injected into NextJs v15 app #1358

Open
a88zach opened this issue Jan 30, 2025 · 6 comments
Labels
bug Something isn't working in progress

Comments

@a88zach
Copy link

a88zach commented Jan 30, 2025

Description

When using Nextjs v15, errors are thrown with accessing params and query params

Steps to Reproduce

Add newrelic to a NextJs v15 app
Follow this article to inject the browser script https://newrelic.com/blog/how-to-relic/how-to-monitor-app-based-router-nextjs-application
Start the application and click anywhere on the page once loaded

reproduction: https://github.com/a88zach/issue-1358

Expected Behavior

Relevant Logs / Console output

  • Screenshots showing errors

Image

@a88zach a88zach added the bug Something isn't working label Jan 30, 2025
@workato-integration
Copy link

@a88zach
Copy link
Author

a88zach commented Jan 30, 2025

Relevant changes in Next v15: https://nextjs.org/docs/messages/sync-dynamic-apis

@metal-messiah
Copy link
Member

Thanks for sharing this @a88zach . Any chance you have a live replication case we can play with? Is this live on a publicly-accessible site? Otherwise, are you on a version of Next@15 greater than this rc?

@a88zach
Copy link
Author

a88zach commented Jan 30, 2025

I'm on version 15.1.6. I don't have a public reproduction, but I'll put together an example repo and post it here

@jwage
Copy link

jwage commented Jan 31, 2025

This issue may be related symfony/ux#2537

If you have an html element with a property containing an object that has dynamic methods, when you click the element, the element gets passed to newrelic stringify and calls toJSON on the element.__component. In the case of symfony live components, element.__component.toJSON() makes an ajax request and you get an error that the toJSON live action does not exist.

image

@a88zach
Copy link
Author

a88zach commented Jan 31, 2025

@metal-messiah reproduction here: https://github.com/a88zach/issue-1358

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in progress
Projects
None yet
Development

No branches or pull requests

3 participants