Skip to content

Problem when matching a sourcemap to an issue in a Next.js page with dynamic params #8481

Closed
@ant1m4tt3r

Description

@ant1m4tt3r

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

  1. Create a Nextjs project with Turborepo (https://vercel.com/templates/next.js/turborepo-next-basic)
  2. Configure Sentry manualy (https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/?original_referrer=https%3A%2F%2Fwww.google.com%2F)
  3. Inside the pages directory, create a page with a dynamic param. [id].tsx for instance.
  4. Inside the new file, create and export a component as a Next.js page.
  5. Throw an exception in any part of this component (like on a event handler) and capture it with Sentry.

Expected Result

I expect that the issue presented on Sentry is able to find the correct sourcemap for the file.

Actual Result

Looks like it tries to encode the dynamic param part of the sourcemap name and never finds it in the artifacts of the release, even though it exists there.

The disclaimer about sourcemap in the issue:
image

The artifacts in the release:
image

Product Area

Issues - Source Maps

Link

No response

DSN

No response

Version

No response

Metadata

Metadata

Assignees

Labels

Package: nextjsIssues related to the Sentry Nextjs SDK

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions