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

Always get the warning msg : No response from iFrame. Check ** #473

Closed
kruggs opened this issue Mar 24, 2017 · 5 comments
Closed

Always get the warning msg : No response from iFrame. Check ** #473

kruggs opened this issue Mar 24, 2017 · 5 comments

Comments

@kruggs
Copy link

kruggs commented Mar 24, 2017

Hi,
i'm using iframe-resizer for sometime in our company, great tool by the way :)
I'm facing an issue when i upgrade from .8 to .11, seems since .9 what ever i do i always get the warning msg : No response from iFrame. Check iFrameResizer.contentWindow.js has been loaded in iFrame

I tryied with a very simple code, i took your exemple iframe

<script src="https://local/assets/vendor/iframe-resizer-3.5.11/js/iframeResizer.js"></script>

<div>
<iframe src="/aaaa.html" id="qwerty" width="100%" scrolling="no"></iframe>
</div>
<script>
iFrameResize( {log:true},'#qwerty' );
</script>

(aaaa.html is the same html code as frame.content.html )
The resize is working, everything is working but i still get the warning msg after 5s (default value of the timeout from what i can see in the code)
I have to stay the .8 as i can't find what is triggering that :(

Someone have the same issue ?

@davidjbradshaw
Copy link
Owner

It's safe to ignore the warning, just means your iFrame took over 5 seconds to load. You can increase the timeout by setting the warningTimeout values in ms to a higher value. For example:

iFrameResizer({warningTimeout: 10000})

@kruggs
Copy link
Author

kruggs commented Mar 24, 2017

Ok, but am i the only one to have this ?

everything load very fast, all event, trigger AND message works.
What ever the timeout i set i got this message. So it' probably more than just a question of timeout.
I remind you the iframe is the same html of the one in "example folder"

@hedleysmith
Copy link

Looks like this might have been fixed here: 18df681 - try updating to the most recent version

@VOsipenkov
Copy link

I implemented this example
import ReactIframeResizer from "react-iframe-resizer-super";

const IFrameArea = () => {

  const url = "http://localhost:8080/myApp/jsf/data-payments-myApp.jsf";
  const iframeResizerOptions = {
    log: true,
    checkOrigin: false,
    iframeResizerEnable: true,
    autoResize: true,
    resizedCallback: () => { console.log("resized!"); },
  };
  return (
    <ReactIframeResizer src={url} iframeResizerOptions={iframeResizerOptions}/>
  );
};

But there is cross -browsing error occurs

Can you help me to understand what to do?

Error:
react-dom.development.js:240 Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://localhost:8081" from accessing a cross-origin frame.
at HTMLIFrameElement.contentDocumentDesc.get [as contentDocument] (blob:http://localhost:8081/44b2cd47-4451-45ba-a806-033db653f85b:66:14)
at ProxyComponent.IframeResizer._this.injectIframeResizerUrl (http://localhost:8081/js/bundle.js:92578:23)
at IframeResizer._this.onLoad (http://localhost:8081/js/bundle.js:92597:13)
at HTMLUnknownElement.callCallback (http://localhost:8081/js/bundle.js:72913:14)
at Object.invokeGuardedCallbackDev (http://localhost:8081/js/bundle.js:72951:16)
at Object.invokeGuardedCallback (http://localhost:8081/js/bundle.js:73000:29)
at Object.invokeGuardedCallbackAndCatchFirstError (http://localhost:8081/js/bundle.js:73014:43)
at executeDispatch (http://localhost:8081/js/bundle.js:73279:19)
at executeDispatchesInOrder (http://localhost:8081/js/bundle.js:73301:5)
at executeDispatchesAndRelease (http://localhost:8081/js/bundle.js:73399:5)

@davidjbradshaw
Copy link
Owner

davidjbradshaw commented May 25, 2018 via email

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

4 participants