-
Notifications
You must be signed in to change notification settings - Fork 59
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
error "Cannot read properties of null (reading 'postMessage')" #85
Comments
Interesting! Thanks for reporting. Do you have a reproducible example I can look at? |
Does this happen only after the connection has been made for some time? Do you know if the iframe has been removed or have you called |
yes, I'm calling
I also upgraded to the latest version, You can see it here: https://bit.dev/teambit/base-ui |
This is helpful. Thanks. I clicked between nav elements about a hundred times and didn't get it but I'll keep trying. Regardless, I'll probably add a null check. I'm just trying make sure there isn't a larger problem I should be aware of. |
Fixed in v6.6.2. Thanks for reporting and for the details! |
6.2.2* :) |
Lol…yes, thank you. |
Hey @KutnerUri, I noticed you're doing some I'd like to hear more about why that was necessary for you. I'm wondering if this may be useful to other users of Penpal and should be built into Penpal itself. |
I don't remember 100%, but I think it had some race condition because of server-side rendering. When the site is pre-generated on the server, it loads the entire html, including iframes, so the browser loads/executes both the parent and child iframe at the same time. |
version: 5.3.0
I am getting getting this error:
It seems to come form this line of code:
Usually the
source
is awindow
, so I'm guessing this is happening because the parent window is getting a message from an iframe that already closed (similar to the connectionDestroyed error during handshake).Maybe add a null guard there?
The text was updated successfully, but these errors were encountered: