GoogleChromeLabs / GoogleChromeLabs/bubblewrap
Offline or Network Error causes Address Bar to show
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 319
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When you have nothing cached, and have installed a fresh apk, if you are offline or your network errors, you will see your app with the address bar visible. I believe this is called Chrome Custom Tabs mode.
**To Reproduce**
Steps to reproduce the behavior:
1. Clear your browser cache and uninstall your example apk
2. Install the apk
3. Disconnect from the internet or cause a network error in some way
4. Open the installed app
5. Notice the address bar
6. Close the app
7. Connect to the internet or fix the network error
8. Open the app again
9. No address bar
**Expected behavior**
I would expect the address bar to not be there in any case. Or at a minimum that the address bar would disappear as soon as the assetlinks file was confirmed.
I guess, in a way I kinda get why if you don't have internet on the first launch, why the address bar may show.
But why can't it (as soon as it fetches the .well-known/assetlinks.json file) remove the address bar. Or even better, don't show the address bar, until the assetlinks file has not validated **and** a site has loaded in the web view.
**Screenshots**
https://user-images.githubusercontent.com/5929807/116548626-d9f5eb80-a937-11eb-895f-c16fa17f91d7.mp4
> Note: in the video above, I was connected to a fast and working wifi connection, despite the weird network error. But I get that that isn't really a bug for this project.
**Smartphone (please complete the following information):**
- Device: Google Pixel 5g
- OS: Android
- Browser: stock browser
- Version: whatever pwabuilder uses
**Additional context**
The also happens completly randomly sometimes when I open the app. So let's say I install the app, and it's all working fine. 9/10 when I open the app the address bar is gone. But then, for some unknown reason, I'll open it randomly, and the address bar will reappear.
Possible related: https://github.com/GoogleChromeLabs/bubblewrap/issues/50
Contributor guide
Assessment
This issue has not been assessed yet.