Closed r00dY closed 2 years ago
Hey @r00dY - if this still an issue for you, can you provide a minimal setup for replicating the issues? I believe that the sdk should be storing all messages before init is called, so they can be handled at the appropriate time.
Closing because of inactivity. Feel free to reopen if you are still running into issues.
@Jwhiles what if connect
message is sent before your SDK is loaded? I must lazy load your SDK because of #1046 and message comes before the load.
@r00dY I think
@Jwhiles what if
connect
message is sent before your SDK is loaded? I must lazy load your SDK because of #1046 and message comes before the load.
@r00dY I think I'm experiencing this. It's VERY frustrating - and I can't quite pin down when/how to avoid missing this call so my extension only works 1/4 of the time...did you find any solutions?
We are aware of the issues and are currently working on a solution. We hope to release an update of the App SDK at some point next month but cannot provide an ETA just yet.
I don't think there is a workaround for this problem. Currently, the App SDK must be included in the first chunk loaded by the app. If the SDK is loaded later (e.g. via dynamic loading, lazy loading), things become flaky.
(Reopening this issue to communicate the status of our work.)
We released an alpha version that hopefully resolves your issues: 4.10.0-alpha.1. Would be great to hear from you folks whether you are still running into problems with that update.
You can install the alpha by running npm install @contentful/app-sdk@4.10.0-alpha.1
The change is now available in 4.11.0.
Hey,
This issue is related to https://github.com/contentful/ui-extensions-sdk/issues/344, (mentioning @pixelass and @Jwhiles)
It seems that
init
method from Contentful App SDK is listening toconnect
message from parent window. However, sometimes,init
can be called later. The above-mentioned issue is a good example of that.Unfortunately when
init
is called afterconnect
message is run, then it doesn't work. Everything is silent, no timeout, nothing is happening and app is not working.It seemed to work though. Have something changed?
Best, Andrzej