Skip to content

DSN ingestion silently ignores Vue SDK envelopes sent as text/plain #1349

Description

@micopiira

Environment

  • Spotlight 4.11.8, running in Docker on localhost:8969
  • @sentry/vue 10.73.0
  • Chrome 152, macOS
  • Application running at http://localhost:8080
  • Standard Sentry DSN transport, without spotlightBrowserIntegration

Steps to Reproduce

  1. Start Spotlight on port 8969.

  2. Configure @sentry/vue in a browser application:

    import { init, captureException } from '@sentry/vue';
    
    init({
        dsn: 'http://spotlight@localhost:8969/0'
    });
    
    captureException(new Error('Vue DSN ingestion test'));
  3. Inspect the outgoing network request:

    POST /api/0/envelope/?sentry_version=7&sentry_key=spotlight&sentry_client=sentry.javascript.vue%2F10.73.0
    Origin: http://localhost:8080
    Content-Type: text/plain;charset=UTF-8
  4. Open Spotlight’s Errors view.

Expected Result

The exception should appear in Spotlight. A valid Sentry envelope sent through the Vue SDK’s standard DSN transport should be recognized and parsed.

This allows testing the application’s normal Sentry configuration locally without adding Spotlight-specific integrations to application code.

Actual Result

The request returns HTTP 200, but the event does not appear.

I verified the following against the same /api/0/envelope/ endpoint, with an Origin header present:

sentry_client Content-Type HTTP status Exception displayed
sentry.javascript.vue/10.73.0 text/plain;charset=UTF-8 200 No
sentry.javascript.browser/10.73.0 text/plain;charset=UTF-8 200 Yes
sentry.javascript.vue/10.73.0 application/x-sentry-envelope 200 Yes

Changing only the SDK identifier in the query string or only the content type makes ingestion work.

The apparent cause is this condition in the ingestion handler:

if (
    ctx.req.query("sentry_client")?.startsWith("sentry.javascript.browser") &&
    ctx.req.header("Origin")
) {
    contentType = SENTRY_CONTENT_TYPE;
}

The correction introduced in #471 excludes sentry.javascript.vue, despite Vue using the same browser transport.

This is separate from #1295: the test envelopes contain actual exceptions with exception.values, rather than message-only events.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions