Skip to content

fix(replay): Add MIME type to worker blob URL for Safari compatibility - #22971

Closed
sentry[bot] wants to merge 1 commit into
developfrom
seer/fix/replay-worker-safari-mime-type
Closed

fix(replay): Add MIME type to worker blob URL for Safari compatibility#22971
sentry[bot] wants to merge 1 commit into
developfrom
seer/fix/replay-worker-safari-mime-type

Conversation

@sentry

@sentry sentry Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Safari and iOS WebKit environments enforce stricter MIME type validation for Web Workers loaded from blob: URLs. Previously, the Replay compression worker's blob URL was created without an explicit MIME type, causing it to default to text/plain.

This led to Safari silently rejecting the worker script, resulting in the "Failed to load Replay compression worker: Unknown error" message, as the worker's error event would fire without a descriptive ErrorEvent.message.

This change explicitly sets the MIME type to text/javascript when creating the worker blob, ensuring Safari correctly interprets and loads the worker script, thus resolving the issue.

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).
  • Link an issue if there is one related to your pull request. If no issue is linked, one will be auto-generated and linked.

Closes #issue_link_here

Fixes JAVASCRIPT-37KM

Comment @sentry <feedback> on this PR to have Autofix iterate on the changes.

@billyvg

billyvg commented Aug 4, 2026

Copy link
Copy Markdown
Member

dupe of #22377

@billyvg billyvg closed this Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant