Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Fails to load iframe from https source to http page #11197

Closed
dhunkin opened this issue Apr 3, 2013 · 5 comments
Closed

Fails to load iframe from https source to http page #11197

dhunkin opened this issue Apr 3, 2013 · 5 comments
Labels

Comments

@dhunkin
Copy link

dhunkin commented Apr 3, 2013

Code from test:

it('should test phantom iframe creation and receive message from iframe', function(done) {
  var ifrm = document.createElement('iframe');
  ifrm.setAttribute('src', 'https://dummy.net/channel.html');
  ifrm.style.visibility = 'hidden';
  var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
  var eventer = window[eventMethod];
  var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message";
  eventer(messageEvent, function(e) {
    done();
  }, false);
  document.body.appendChild(ifrm);
});

I run this code under karma test runner with Mocha test framework using Phantomjs as a browser to test in. This code can`t load the iframe from https source. channel.html should only do window.parent.postMessage('test', '*') on load. If I change it to load from http - it works great. However with dummy (fake domain) it crashes karma completely with http..

@JamesMGreene
Copy link
Collaborator

  • Does this work in a normal browser?
  • What OS? Version?
  • What PhantomJS version? Compiled from source or download binaries?

@JamesMGreene
Copy link
Collaborator

Also, did you launch PhantomJS with the command line option: --ignore-ssl-errors=true?

@dhunkin
Copy link
Author

dhunkin commented Apr 3, 2013

It works with Chrome, Opera and Safari, and not with Firefox (all latest versions). Mac OS 10.8.2.
PhantomJS 1.9.0 - seems to be installed with brew (not compiled for sure).
No, I did not at the moment. I launch it with Karma test runner.

@dhunkin
Copy link
Author

dhunkin commented Apr 16, 2013

Is there any news on this issue ? --ignore-ssl-errors=true option doesn`t help. What do you think, is it WebKit restriction or V8 ? May be I can help to fix this ?

@stale stale bot added the stale label Dec 27, 2019
@stale
Copy link

stale bot commented Dec 30, 2019

Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!

@stale stale bot closed this as completed Dec 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants