question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iFrame not mounting after update to v5.1.0

See original GitHub issue

I’ve been using this package without problem for a good while now (v4.1.3). Finally tried updating to v5.1.0 and everything seems fine until I try to refresh the browser page. After I refresh Chrome, the iframe never fully mounts and contentDidMount never triggers. Sometimes after refreshing the browser several more times contentDidMount will trigger again but it’s not predictable.

It also seems that after first loading a page with an iFrame in a given session, then navigating away and revisiting that page will cause the same issue.

Any ideas to help me with this issue?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:6
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
baptisteArnocommented, Dec 24, 2021

@ryanseddon here is a reproduction: https://github.com/baptisteArno/next-react-frame-bug

Just clone the repo, install dependencies and run yarn dev, the div won’t be appended to the iframe. I didn’t have the chance to try in production mode when deployed

1reaction
baptisteArnocommented, Jun 12, 2022

Still not working with version v5.2.3.

A workaround to make this work is to render your componenet containing the frame conditionally like this:

const [show, setShow] = useState(false)
useEffect(() => {
  setShow(true)
}, [])

if(!show) return <></>
return <Frame>...</Frame>

So this issue definitely is linked to server side rendering.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prevent iframe from resizing when content changes
When the page initially loads everything sizes correctly, the iframe expands to the full area of the cell. If you reload the content...
Read more >
IFrame Visualizations - Cloudera Documentation
This setting is enabled by default. However, the X-Frame-Options header added as part of this feature blocks rendering of iFrames injected by third-party...
Read more >
vuex-iframe-share - npm Package Health Analysis - Snyk
This is a package for data synchronization of vuex data in iframe in the vuejs project For more information about how to use...
Read more >
next js iframe not displaying but downloading - You.com
Add new cy commands to switch into iframes and then also switch back to the "main" ... Update the Driver to take into...
Read more >
iframe infections - tmp directory exploit - Joomla! Forum
Not abnormal in notices [Edit: got warnings in tmp directory]. ... After the upgrade to J! 1.0.15, the bad guys haven't been back....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found