You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This behaviour may be problematic as a silent fail may break the app communication without any message or log to understand what is happening
Also we except this situation to never happen, but we don't have enough knowledge yet about all inter-app redirections that may occur in the app lifecycle. So the probability of having 2 webviews with same hostname should not be considered as null.
Some improvements have been considered:
Remove the if/return so instead of an early return we replace the old registered webview by a new one
This may have the same effect than previous behaviour but instead of breaking the new webview it would be the old one
However this event seems to have a lower probability (more probable scenario is that a component did not unregister successfully when destroyed)
Replace the if/return by a if/throw
This would not fix potential problems, but this would prevent having an instable app -> it is preferable to break it with an explicit error
Implement a mechanism that cleans the registration state and starts a new handshake process when a duplicate ID is detected
This would enforce a clean state and reduce probability of memory leak/ghost listeners
For now we chose to implement the if/throw option in order to verify if this scenario happens and how often.
The objective is to implement the clean state mechanism later when confident enough to implement it.
The text was updated successfully, but these errors were encountered:
This issue's goal is to keep track of how we handle CozyWebviews lifecycle and how they are registered into CozyIntent
We want to ensure that all CozyWebviews are correctly registered into CozyIntent when created and unregistered when destroy
Current implementation does the following:
hostname
in the registration processThis behavior is coded in
cozy-intent/src/api/services/NativeService.ts
:This behaviour may be problematic as a silent fail may break the app communication without any message or log to understand what is happening
Also we except this situation to never happen, but we don't have enough knowledge yet about all inter-app redirections that may occur in the app lifecycle. So the probability of having 2 webviews with same hostname should not be considered as null.
Some improvements have been considered:
if
/return
so instead of an early return we replace the old registered webview by a new oneif
/return
by aif
/throw
For now we chose to implement the
if
/throw
option in order to verify if this scenario happens and how often.The objective is to implement the
clean state
mechanism later when confident enough to implement it.The text was updated successfully, but these errors were encountered: