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

Konacha fails if browser uses extensions that add iframe #195

Open
paneq opened this issue Feb 1, 2015 · 1 comment
Open

Konacha fails if browser uses extensions that add iframe #195

paneq opened this issue Feb 1, 2015 · 1 comment

Comments

@paneq
Copy link

paneq commented Feb 1, 2015

I experience:

Uncaught SecurityError: Blocked a frame with origin "http://localhost:3500" from accessing a frame with origin "chrome-extension://noojglkidnpfjbincgijbaiedldjfbhh".  The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "chrome-extension". Protocols must match.

in google chrome in code:

// Check that all iframes loaded successfully.
  var iframes = document.getElementsByTagName('iframe');
  for (var i = 0; i < iframes.length; ++i) {
    if (!iframes[i].contentWindow.mocha) {
      (function (path) {
        mocha.suite.addTest(new Mocha.Test(path, function () {
          throw new Error("Failed to load " + path + ".\n" +
                          "Perhaps it failed to compile? Check the rake output for errors.");
        }));
      })(iframes[i].getAttribute("data-path"));
    }
  }

My workaround is to run the tests in incognito window where all extensions are disabled.

@jfirebaugh
Copy link
Owner

I guess the way to work around this would be to check the scheme and host of the iframe before trying to access contentWindow. Happy to accept a pull request that does so.

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

No branches or pull requests

2 participants