Nextjs TypeScript source maps not being associated correctly.

Hi Sentry team and community, we’re in the process of evaluating Sentry and have run into an issue where our NextJs source maps do not seem be associating correctly with the code. Any direction or help would be appreciated.

The problem

We have a piece of code that throws an error:

const throwError = () => {
  throw new Error('An Error has been thrown');

A button onClick calls this function. Sentry catches the error fine and we have logs generating on the Sentry dashboard(:clap:) .

The issue seems to be that the Typescript source maps are not being rendered properly on the sentry dashboard:

What we’re expecting to get:

What we’re getting:


The current artefacts looks like this:

However the previous Artefacts looked like this

So I am fairly sure one of those would have given the correct result if the path was the issue.

What I’ve tried so far

I have tried

  • Uploading viia HTTP
  • Uploading via the Sentry CLI
  • Uploading via the Sentry Webpack Plugin

and have no results.

I’m happy to provide more info if needed.


Hey, there are two issues that I see. The first one is that artifacts doesn’t match paths 1:1 (see placeholder [shortname] for example and for the second for me to confirm, can you please provide a link to one of the affected events? Thanks!

First make sure your paths are correct and then put a “~” in front of the first slash, so “~/sandbox/_next/serverless/…”