Skip to content

recordCrossOriginIframes option not recording cross origin iframes #16173

Open
@rodolfoBee

Description

@rodolfoBee
Member

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/browser

SDK Version

9.13.0

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

Sentry.init({
dsn:...,
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
integrations: [
Sentry.replayIntegration({
_experiments:{
recordCrossOriginIframes: true
}
}),
],
})

Steps to Reproduce

  1. Create a page with two cross-origin iframes
  2. configure the SDK as above in both main page and iframes
  3. run a test on the main page

Expected Result

The cross-origin iframes are recorded correctly by the SDK.

Actual Result

When using the setup described above there are 3 resulting replays in Sentry:

  • Replay from the main page: shows the page and the contents of the two cross-origin iframes
  • Replay from cross-origin iframe1: the replay is listed but not found when trying to open it
  • Replay from cross-origin iframe2: same as above

When adding the replay integration only to the main page the cross-origin iframes are not recorded by Sentry.

Originally reported in this internal ticket.

Activity

added theissue type on Apr 30, 2025
moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Apr 30, 2025
chargome

chargome commented on Apr 30, 2025

@chargome
Member

The implementation from #14916 looks correct, but the change already states:

While it's not perfect (sometimes produces an unplayable replay), it might unblock other users looking to experiment with this feature.

We only forward this flag to rrweb, so we don't really control the resulting behaviour of it.

@rodolfoBee might also be worth for the user to look into https://github.com/rrweb-io/rrweb/issues?q=is%3Aissue%20state%3Aopen%20recordCrossOriginIframes for more details.

Regarding not found replays, could you check this on the product side @billyvg?

self-assigned this
on May 5, 2025
billyvg

billyvg commented on May 5, 2025

@billyvg
Member

I made a copy of the repro here https://stackblitz.com/edit/vitejs-vite-khmuql?file=README.md

re: replays not found, I'm not exactly sure what's going on there, though I did see that the user has dropped replay events in their org, which might be the problem?

moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @billyvg@chargome@rodolfoBee

      Issue actions

        recordCrossOriginIframes option not recording cross origin iframes · Issue #16173 · getsentry/sentry-javascript