Firebase only hosts previous version of Flutter web app - firebase

I hosted my web application through Firebase using Flutter. Initially, it was absolutely fine but I realised there was a small error so changed it an redeployed it. However, when I ran flutter deploy it didn't change on the website. I thought that I might have to wait a while for the change to happen but I waited 5 hours and it still hasn't updated. I then tried a few more times, deleting different cache files but nothing worked. I then deleted the Firebase project all together and made a completely new one. I deleted the .firebaserc and firebase.json files. However, on the new website, it is still showing the old version of the website. I don't understand how that could be possible but any help would be really appreciated!

Visit your site from an incognito tab and validate. Also make sure you didn't forget to run flutter build web before firebase deploy.

Related

Firebase not loading the data

Has anyone experienced this kind of issue?
Firebase's started not loading the data on deployed and virtual devices all of a sudden 🙂
Tryed out to clone the code and implement with the new database on another Google profile, but it doesn't help so far.
Deployed on:
Apple AppStore (TestFlight)
Google Play Market
Vedeo: https://imgur.com/6ZrZ8u1
It appears to be the issue was caused by config files on Firebase somehow those configs are affected the entire database and deleting them and reconfiguring has helped to resolve it.
To be more precise I went to Project settings -> Your apps -> SDK setup and configuration section then added the new config files for each Android, iOS, Web apps. And voila the app is back on :)

FLUTTER FIREBASE Change to new instance not working for Android

My client has recently changed their Firebase instance (meaning its under a different project, in a different google sign on). I.e. they have a new instance that they want to use for production. I created the new instance and project with a different name to avoid any confusion. So for Android i removed the old google-services.json and downloaded the new one from Firebase and copied it into the android/app directory. Then I reviewed the project level and app level gradel files. No problems there. I checked inside the new google-services.json file and can clearly see that it is pointing to the new instance of Firebase.
Here's a snippet below:
"project_info": {
"project_number": "506498949424",
"firebase_url": "https://lbds-aeb3d.firebaseio.com",
"project_id": "lbds-aeb3d",
"storage_bucket": "lbds-aeb3d.appspot.com"
},
The old name was LittleBigDeals instead of lbds.
Actually this process has worked fine for the IOS side of the project. The app is now pointing at the new database.
However when I install it on ANdroid it still retrieves data from the old database.
Is there a pointer I'm missing or that I need to refresh in the Android set up.
Any help with this would be greatly appreciated.
Many thanks.
I had this same issue yesterday. I had changed to a different Firebase project in my Flutter app. iOS worked fine but Android still was attempting to use the incorrect Firebase project, despite google-services.json clearly pointing to the new project. The issue appeared to be limited to my local machine but was very bizarre and annoying. Another developer suggested that I try the "flutter clean" command, and once I ran flutter clean and re-started the virtual Android device, it then used the correct Firebase instance.

API Key Problem by moving App between Firebase Projects

I have moved my Flutter App in Firebase from one Project to another new Project and replaced previous google-services.json with the new one. Then I tried the App it was still connected to the previous project, all data was created in the old project, even if I have deleted the app from the old project. I couldn't find a solution to fix it so I deleted the old firebase project and cleared all caches. Then the App started to return API is Invalid errors. I made sure that I dont have any multiple files or they API is written somewhere else a well. without the new google-services.json it returns the error No API Key was found so it seems to be right placed.
I ran out of ideas how to fix it. Did I miss anything?
SOLVED
I was having the same error and I solved it by deleting the build folder and then running flutter package
The only way to solve it was to change my package name and create a new App in my project. I guess the problem is internal at firebase that the old app didn't get properly deleted in the previous project.

How long it takes for a firebase hosting to work?

I followed the instructions, and deployed a simple web yesterday. At first, it kept showing the default website, saying " you've deployed successfully...", not my web.
Also, the 'firebase open' command + "Hosting: Deployed Site" leads to a undefined site:' undefined.firebaseapp.com '.
But, magically, about an hour later when I open the link from 'firebase console' again, the web showed up... I am not sure whether 'firebase open' command worked cause I didn't try.
Today, I added some features, and deployed again. In the firebase CLI, it said deployed. But, the link still showed the old version.
I'll catch up an hours later to see whether it works, but even it works, it takes too long.
has anyone had the same experience? what's wrong with my web?
Thanks.
This is how I solved this issue for my angular 7 app deployment on Firebase hosting:
ng build --prod
go to dist/myproject and run command Firebase init and...
I went to dist/myproject that now contain build files along with Firebase related files. Copy all files except Firebase related files to dist folder in side dist/myproject.
there you will get overwrite warning just select overwrite option.
after copy process completes, run command Firebase deploy.
after completion of process go to shown URL and there you will find your running app.

No change when I deploy the site with Firebase?

I'm trying for several days to deploy my site with Firebase. I'm using Ubuntu 16.10, but still no change. Everything worked with me fine, deploy completed successfully, but I don't know why I can't see my site on!
Any suggestions!
I had a similar problem and it turned out that I was deploying to a different alias of the same project. You can have many aliases within a project (i.e. versions of the same project) , but only one alias will be visible to people visiting your site.
Entering firebase use <alias_or_project_id> in terminal will let you set the alias name you'd like to use.
To deploy that specific alias, run firebase deploy --project <alias_or_project_id>.
I had the same problem and it turned out my browser (chrome) was just caching the old site. Clearing the cache and hard reloading fixed the problem. Hope this helps someone.

Resources