Skip to content
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

Examples don't work due to DOMException: Blocked a frame with origin "https://fiddle.jshell.net" #3785

Closed
muuki88 opened this issue May 19, 2022 · 4 comments · Fixed by prebid/Prebid.js#8440
Labels
bug problems with site functionality

Comments

@muuki88
Copy link
Contributor

muuki88 commented May 19, 2022

Examples don't work due to issues with jsfiddle: https://docs.prebid.org/dev-docs/examples/basic-example.html

Uncaught DOMException: Blocked a frame with origin "https://fiddle.jshell.net" from accessing a cross-origin frame.
    at Object.6260 (https://cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js:122:133)
    at r (https://cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js:4:138148)
    at https://cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js:122:458
    at n (https://cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js:4:139393)
    at https://cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js:122:50
@muuki88 muuki88 added the bug problems with site functionality label May 19, 2022
@dgirardi
Copy link
Contributor

Introduced by prebid/Prebid.js#8364 . cpexIdSystem would cause this in any cross-origin scenario.

Tagging @EskelCz

@EskelCz
Copy link
Contributor

EskelCz commented May 19, 2022

@dgirardi Sorry I'm confused.

  1. Our module is not even configured there
  2. It just tries to read a 1st party cookie, why would it block an iframe?

Do you have some idea what's going on?

@dgirardi
Copy link
Contributor

Sorry - I should have been more specific. the problem is

window.top.cpexIdVersion = '0.0.3'

Writing to window.top will throw an exception if cross-origin. The examples use a version of prebid with all modules installed, and that line is in the main body of the module - it's enough to install it to get the exception.

@EskelCz
Copy link
Contributor

EskelCz commented May 20, 2022

@dgirardi I see, that makes sense. Thanks for figuring it out.
Here's a fix: prebid/Prebid.js#8440
(If I can move the version into the submodule, so it's still accessible programatically in some way)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug problems with site functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants