Skip to content

@sentry/wasm will not work if wasm url is a blob url #8259

Closed
@iven

Description

@iven

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/wasm

SDK Version

7.53.1

Framework Version

No response

Link to Sentry event

No response

SDK Setup

No response

Steps to Reproduce

  1. Setup @sentry/wasm integration.
  2. Init wasm with a blob url returned by URL.createObjectURL().
  3. Open the site with browser, and trigger a sentry event.

Expected Result

The event is reported to Sentry.

Actual Result

Browser throws an error TypeError: Failed to construct 'URL': Invalid URL.

I think it's caused by:

debug_file: debugFile ? new URL(debugFile, url).href : null,

Passing a blob:http://xxxx to new URL() is not legal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions