Skip to content

Replay: recording fails with CSP errors when using base localhost. #7183

Closed
@lucas-zimerman

Description

@lucas-zimerman

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g. bundle.tracing.min.js) in your SDK setup.

@sentry/react

SDK Version

7.37.1

Framework Version

No response

Link to Sentry event

https://sentry-sdks.sentry.io/replays/sentry-capacitor:37499c8735df470d9545817c6c40208d/?referrer=%2Fdiscover%2F%3AeventSlug%2F&t=7&t_main=console

SDK Setup

I noticed that if you include the following line <base href="http://localhost/"/>

Sample: https://github.com/lucas-zimerman/sample-react (based on Relay demo with pictures and the base code added)

Steps to Reproduce

Follow the README.md steps, but basically run the code and press the ' break ' button

Expected Result

No errors on the console.

Actual Result

image

Related to getsentry/sentry-capacitor#318

UPDATE: Error can be mitigated by adding the following block parameter base[href="/"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: replayIssues related to the Sentry Replay SDK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions