Currently (November 13/14, 2019), Firebase Hosting is experiencing a critical issue when accessing apps via a custom domain, and it has been more than 24 hours since I noticed the issue.
The issue is so critical that my app does not even load, and the users just see a blank screen. The issue is wide spread at the moment, and also other apps are seeing HTTP 404 errors when being accessed via a custom subdomain connected with Firebase Hosting.
You can read more about the issue details at the below blog post:
Here are lessons learned from this episode:
If you are using a managed service provider such as Firebase Hosting, do have a back up plan regarding how you will manage if you face similar issues. In my case, it was changing the URLs in the landing page and in the backend point to the default Firebase provided subdomain, so at least the users can access the app.
Firebase Hosting lets you attach multiple custom subdomains to your app (e.g., app1.example.com, app2.example.com) Do that now! As I learned, the app worked fine on the default subdomains AND any new custom subdomains, but not on the existing custom subdomain (e.g., app.example.com).
Ideally, you would want to also deploy your SPA to another service provider such as AWS as well, using their AWS S3 Static Hosting service. This will allow you to point your subdomain to another provider if you face any issues with Firebase Hosting, and vice versa.
If you are using Firebase Functions or any other backend, make sure your app links can be quickly configurable, so you can change it in such scenarios.
Don't just rely on Google analytics, manually check your SPA (Single Page Application) from time to time as in the above case users were visiting the landing page and the app, but none were able to sign up as the app didn't load at all for those users. And for me, it was working fine as apparently locally I had a cached version of the file in the browser. Only when I refreshed the app, I noticed the same problem.
If you are running any marketing and promotion campaigns, STOP them immediately as you will loose money and reputation for your app. Whats more bad than bringing a user via a paid campaign to your landing page, and when they click Sign Up to login to your app, all they see is a blank page. They are not going to come back.
If you have lot of existing users, make sure you have them in your marketing system, so that you can immediately notify them that your app's login domain has changed. Otherwise, they wouldn't be able to login to your app.
Update (15 November, 2019) - Firebase Hosting has now finally fixed the issue after three days. AXSAR Solo now works fine on the custom domain as well.