davidjbradshaw / iframe-resizer

Keep iFrames sized to their content.

Home Page:https://iframe-resizer.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught TypeError: Cannot read property 'src' of null

Gamemorize opened this issue · comments

FIRST of all THANKS!

I have an iframe from the same website generating this message and then the mutationObserver warning spewing out.

the src of the iframe is not dynamic, and the iframe shows the correct source, its just that these warnings appear in the console log (chrome)

I tried to change checkOrigin to false but the 'src' of null means this fails too. (if I have understood correctly why)

Uncaught TypeError: Cannot read property 'src' of null iframeResizer.min.js:8
[iFrameSizer][tacticsStripIFrame] Unexpected message ([iFrameSizer]tacticsStripIFrame:759:1498:init) iframeResizer.contentWindow.min.js:9
[iFrameSizer][tacticsStripIFrame] Unexpected message ([iFrameSizer]tacticsStripIFrame:758:554:mutationObserver) iframeResizer.contentWindow.min.js:9
[iFrameSizer][tacticsStripIFrame] Unexpected message ([iFrameSizer]tacticsStripIFrame:757:554:mutationObserver) iframeResizer.contentWindow.min.js:9
[iFrameSizer][tacticsStripIFrame] Unexpected message ([iFrameSizer]tacticsStripIFrame:756:554:mutationObserver) iframeResizer.contentWindow.min.js:9
[iFrameSizer][tacticsStripIFrame] Unexpected message ([iFrameSizer]tacticsStripIFrame:754:554:mutationObserver)
etc etc

What other imformation could I supply to help?

ALSO... i am not sure if this related, but I have the iframe height slowly decreasing at the bottom, it appears it is creeping up as the seconds tick by.

Hi,

Do you have this online somewhere I can take a look at, or a version you could email me?

Also can you paste in the the complete log before the error message and I'll take a look.

D.

Also are you using v2.4.3?

I'm using the latest version. I will send you a PM with a live link!

Can you turn the logging on please.

OK, the problem is that you need to load the second JS file into the iFrame, not the host page.

OK, thanks! Not at desk right now, will confrim asap. Sorry for my mistake, And thanks again for this and your help!

Ah, the reason I included BOTH files in the header is that there will be an iframe in an iframe. So I automatically included both files in the common header file. Are nested iframes not possible for now?

In theory they should work and you can ignore that warning.

Thanks, sorry I hadn-t seen your reply when I reposted a specific query (issue 35).