-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customer issue: "Blocked a frame with origin <hostname> from accessing a cross-origin frame." #6560
Comments
The same issue is happening on my side as well |
I tried to reproduce this by adding an iframe to a small plain-JS test app of mine. I pointed it to various 3rd party websites and noticed that these "Blocked a frame" and a few other CSP errors only occur on some websites. So my guess is that this might be rather specific to certain websites that perhaps somehow test if they're used in an iframe? @m-nathani could you elaborate a little on what's happening for you? For instance how you're using iFrames and how the error message looks for you. Also, does this error crash replays for you, too? Or is it just an error that's being logged to your console? |
@m-nathani I'm realizing, you already told me about your setup here, right? So I'm wondering if this is only an issue in situations where replay is used inside an iframe and not the base site. |
@Lms24 it appears that the error i faced on the websites does not use This is exact error i faced using 7.28.1:
This is the site address which cause this error. Furthermore, you can check in the chrome dev tools Addiotnally, for the issue mentioned here, would appreciate if can help me resolve, as i am still facing it 🙏🏼 |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
The issue still happens, check here for details: https://sentry.io/organizations/umai/issues/3808100150/?project=5264087&referrer=slack |
I'm not sure if I'm missing some crucial information here but according to your description in #6542, your app is a modal that is embedded in your clients' websites. As we saw in #6542, the Something else I came across while checking your last linked error: There appear to be two script origins ( |
Yeah its possible for embedded clients website's hub conflicting with ours. However as discussed #6542, we can't do anything about it yet... Thanks for highlighting for |
Also, as mentioned in #6542 (I know, you know this already, but just for transparency), I want to mention that Replay currently (and in the forseeable future) doesn't support partially recording a web site or similar multi-hub/origin scenarios. I'm afraid, there's nothing we can do here at this time. cc @bruno-garcia I suggest we close this issue for the time being and re-open, if we get more cross-origin iframe error reports. wdyt? |
Hi @Lms24, i'm getting these: when using Both inject an I'd be more than happy if i could just tell Replay to ignore these frames/origins, as i don't care what happens inside, because it wouldn't be rendered anywhere anyway. Ideas? |
We have a similar issue in our setup, Replay seems to want to peek into any other frame embedded in our page - would it be possible to whitelist only specific frames/origins for Replay to hook into? |
@jirizavadil @pfdzm You should be able to use |
@billyvg |
@jirizavadil Glad to hear -- I'm assuming that snippet is a typo? |
@billyvg well... 😅 yeah, let's call it a late night typo. But it ain't stupid if it works, right? 😂 |
Maybe we should by default block all |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
It's a problem with the Replay package and Safari web browser. Safari is blocking the replay's actions on iframes. When I enable the Replay integration, the following errors appear on my site:
I do not control these dynamically created iframes and are not able to mark them with a
These errors are not logged in Google Chrome. I hope this issue will be fixed, because I don't want to make use of a package that is logging errors. |
This does not work for me, unfortunately. |
Could you open a new issue with details on your setup & what is not working? |
I am not 100% sure my bug is with Sentry, but I'll open a new issue if I ever confirm. |
I'm also getting this error in my Angular app. |
Ok I now managed to solve it. |
I'm seeing these errors with Sentry replayIntegration together with Stripe. I have had no success with Anyone had any luck with getting rid of these errors with Stripe? This is a Safari only issue like others in the thread have mentioned.
|
I guess this flew under the radar because it was already closed - in the future, please just open a new issue in such cases, if you are still experiencing an issue for something that was previously closed, then it is easier for us to keep track of this! We'll need to look more into this, we're quite busy at the moment but will hopefully have some more time on our hands to investigate this further soon! |
I found a workaround, that is not optimal, but at least works for our use case where the iframes are only present on some pages. What I do here is block the whole block: ['body:has(iframe[name*="Stripe"])'] This works for us, since Stripe is only mounted on the payments page. That means we got no replays on the payments page. But for iframes that need to be mounted on every page this workaround will not work, unfortunately. |
I think @billyvg identified the problem and has a possible fix for it in the works! 🎉 |
…ontentDocument` (#201) Do not attempt to access `contentDocument` of iframe if element is blocked, otherwise it will trigger a browser warning. e.g. `Blocked a frame with origin "<foo>" from accessing a frame with origin "<bar>". Protocols, domains, and ports must match.` Fixes getsentry/sentry-javascript#6560
It will be part of the release notes of sentry-javascript, and hopefully in the next/an upcoming release! |
I tried out the latest release (8.22.0) with our app, but the issue isn't fixed for us. I created a new issue with a minimal reproduction, since this issue was closed. #13173 |
Private ticket with customer info: https://getsentry.atlassian.net/browse/FEEDBACK-1689
The customer is getting this "Blocked a frame with origin from accessing a cross-origin frame" error which is preventing any replay from being captured.
The text was updated successfully, but these errors were encountered: