Skip to content

fix(nextjs): Handle async params in url extraction #17162

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

Merged
merged 5 commits into from
Jul 25, 2025

Conversation

chargome
Copy link
Member

@chargome chargome commented Jul 24, 2025

closes https://linear.app/getsentry/issue/JS-535/error-route-used-searchparams-sentry-skip-normalization-searchparams
closes #16542

Unfortunately we can't resolve the params promise within the template as making this async leads to some nasty RSC errors which we want to stay away from.

@chargome chargome self-assigned this Jul 24, 2025
@chargome chargome marked this pull request as ready for review July 25, 2025 09:50
Copy link
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we test this somehow?

@chargome
Copy link
Member Author

Tests for this are already in place, or do you mean the extract function?

@andreiborza
Copy link
Member

Tests for this are already in place, or do you mean the extract function?

no, I mean can we assert on this not causing warnings/errors in the tests? I think (prior to this fix) they were logged out to stdout right?

@chargome
Copy link
Member Author

no, I mean can we assert on this not causing warnings/errors in the tests? I think (prior to this fix) they were logged out to stdout right?

ah yeah I can see if there's a way to test that, I only tested it in a sample app

Copy link
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the test!

@chargome chargome merged commit ea9ee84 into develop Jul 25, 2025
154 checks passed
@chargome chargome deleted the cg-next-fix-async-params-warn branch July 25, 2025 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants