Skip to content

[NUXT] Can't get the sourcemaps to work. #13847

Closed as not planned
Closed as not planned

Description

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nuxt

SDK Version

8.32.0

Framework Version

Nuxt 3.13.2

Link to Sentry event

https://market-wiz.sentry.io/issues/5937402524/?project=4507160564858880&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D&referrer=issue-stream&statsPeriod=24h&stream_index=1

Reproduction Example/SDK Setup

in nuxt.config.ts

sentry: {
    sourceMapsUploadOptions: {
      authToken: "",
      org: "market-wiz",
      project: "hmc-crm-nuxt",
    },
  },
....
sourcemap: {
    server: true,
    client: true,
  },
modules: [
    ....,
    '@sentry/nuxt/module'
  ],
....

sentry.client.config.ts

import * as Sentry from '@sentry/nuxt';
const router = useRouter()
const { public: { sentry } } = useRuntimeConfig()
Sentry.init({
    // If set up, you can use your runtime config here
    dsn: sentry.dsn,
    environment: sentry.environment,
    enabled: process.env.enviroment !== 'development',
    integrations: [
        Sentry.browserTracingIntegration({ router }),
        Sentry.replayIntegration({
            maskAllInputs: false,
            maskAllText: false,
        })
    ],
    tracesSampleRate: 0.2,
    replaysSessionSampleRate: 0,
    replaysOnErrorSampleRate: 1.0,
});

Also during the build the following warnings outputed:

[info] Building client...
[info] vite v5.4.8 building for production...
[sentry-vite-plugin] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
[info] ✓ 3269 modules transformed.
[info] rendering chunks...
[sentry-vite-plugin] Warning: Didn't find any matching sources for debug ID upload. Please check the `sourcemaps.assets` option.
[info] ✓ built in 1m 12s
[success] Client built in 71526ms
[info] Building server...
[info] vite v5.4.8 building SSR bundle for production...
[sentry-vite-plugin] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
[info] transforming...
...
[sentry-vite-plugin] Warning: Didn't find any matching sources for debug ID upload. Please check the `sourcemaps.assets` option.
[info] ✓ built in 1m 12s
[success] Server built in 72312ms
[success] [nitro] Generated public .output/public
[info] [nitro] Building Nuxt Nitro server (preset: `node-server`)
[sentry-rollup-plugin] Info: Sending telemetry data on issues and performance to Sentry. To disable telemetry, set `options.telemetry` to `false`.
> Found 1072 files
> Analyzing 1072 sources
> Adding source map references
> Bundled 1072 files for upload
> Bundle ID: 544229cf-c1a2-58d3-80f4-df4de27ff355
> Uploaded files to Sentry
> File upload complete (processing pending on server)
> Organization: market-wiz
> Project: ***-nuxt
> Release: 357334fc5e7d729e8f2a12e5d7642f06c94d9a23
> Dist: None
> Upload type: artifact bundle
Source Map Upload Report
.....

Steps to Reproduce

<script setup>
  const triggerError = () => {
    throw new Error("Nuxt Button Error");
  };
</script>

<template>
  <button id="errorBtn" @click="triggerError">Trigger Error</button>
</template>

Expected Result

Have sourcemaps linked

Actual Result

Seems to me that only server-side sourcemaps are uploaded.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Package: nuxtIssues related to the Sentry Nuxt SDKStale

    Type

    Projects

    • Status

      Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions