Closed mscolnick closed 5 months ago
I think I found the issue:
If the iframe is already loaded, it gets stuck here. Maybe checking iframeDoc.readyState
before adding the event listener?
My current workaround is to just force the event with iframe.dispatchEvent(new Event("load"));
@mscolnick this should be fixed now. Please upgrade and let me know if your project now works. Btw, can you share information about browser, OS, and the versions of the software you're experiencing this bug in?
Fix shipped in v1.7.
Thanks! I'll let you know if it does work, but I expect it to be fine.
Chrome 122 MacOS Nextjs 14 React 18
@mscolnick mind confirming if the fix worked for you?
Yep it did, thanks for the quick fix!
In which versions of the package (and relevant enviroment tools such as Node.js) have you observed the bug?
1.6.0
What steps will reproduce the bug?
I am testing locally on the same origin, using nexjs. Sometimes the frames with connect with createIframeParentTransport and createIframeTransport, but 80% of the time, they do not.
My question is: does the order in which createIframeParentTransport and createIframeTransport run matter?
That seems to be the only race condition in my code.
What behavior did you expect?
I would expect them to connect every time regardless of order.
What actually happened?
It connects about 10% of the time
Workaround
Currently don't have a workaround
Proposed fix
No response
Other remarks
No response
Contribution