nextjs-end breaks on refreshing the page due to auth-service-worker error
I cloned the nextjs-end locally and followed all the steps mentioned correctly also set up firebase hosting , Everything works correctly when the website is opened for the 1st time .
When the website is refreshed after some time it throws an error
Uncaught (in promise) FirebaseError: Firebase: Need to provide options, when not being deployed to hosting via source. (app/no-options). at initializeApp (auth-service-worker.js?firebaseConfig=%7B%22apiKey%22%3A%22AIzaSy....
But when I unregister the service worker by going on application tab in dev tools , then it works fine for some time ,
Issue is better described in https://github.com/firebase/friendlyeats-web/issues/295.