-
Notifications
You must be signed in to change notification settings - Fork 473
Custom Tab: Session shows blank page when the browser is killed #3773
Comments
This might be related to #3310 so should be re-tested after that lands. Assigning self to follow-up. |
@jonalmeida test this in 24 hours. |
I tested this with custom tabs on r-b and I still see this issue. |
@jonalmeida Do you have STR for this? Is it possible to quick-fix this by finishing the custom tab activity if there's no intent? |
My STR:
I think so, iirc this is roughly what Chrome was doing. |
I've found the issue to our problem. When we have an activity that was opened via an intent, and we background that app so that it gets reclaimed by the OS, the last activity is re-created and the original intent is still there. In our designs, we assumed the Now we see that we're getting the original intent in the
The quick fix for this in r-b/f-b is to do |
What I've found so far with some extra logging when launching a Custom Tab. The initial trace creates the activity, the fragment and then launches the url with UI customizations:
Then, without backing out of the Custom Tab, and switching to use other apps for bit before returning shows the following trace (where the Custom Tab is blank without styling):
Observations:
|
@jonalmeida Regarding |
Interesting.. with a modified version of
|
@pocmo From my last update it seems that it's persistence related, so re-creating the activity doesn't make a difference. |
Should we: |
Then disabling background processes should reproduce it if you move the app to the background and then resume?
Not persisting them was a design choice so far. So I'd vote for (B) for now. |
I tried this too, and it makes it easier to reproduce but I still have to use other apps for a bit for some reason before I can return to the Custom Tab. 🤷♂
Spoke with @NotWoods about this for a bit offline: it should be safe to do this for TWAs as well, although the user flow seems unfortunate: if you went from page A -> B, and returned later, you would always start back at A instead of the last context you were in (B). A nice-to-have fix would be to persist the session and config, so you can return to the original context, but we can persist the session forever if we lose the CT from an app kill without ever deleting it. We could also add a TTL to the session to remove them if they build up and remove them periodically, similar to autosave. |
I've put up a fix for R-B where we check if the session exists in the |
Going to close this as done since the fixes for it need to go into each individual app so that it handles removed sessions in the CustomTabIntegration classes. |
We lose the intent that launched the CT when the app was killed so we can't restore styling and the session that was used i.e. the intent and the
Session
is lost.Related issues:
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: