API Key Problem by moving App between Firebase Projects - firebase

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.

Related

Notifications not received in react native after switching firebase projects

I'm creating an app using react native and firebase messaging. Some time ago I created development firebase project and now I have to switch it to another project, but there is a problem. I created new project and changed google-services.json file in /android/app and it seems to take correct values from this file, because they are in /android/app/build/generated/res/google-services/debug/values/values.xml, but even though the values seems correct, the messaging works only with previous project, notifications from new project are not received. The configuration for both firebase projects seems almost identical and I have no clue how to fix that. I already tried deleting build directory from /android/app and running app with npm run android --reset-cache but it did nothing. Any ideas on what is the cause for that?

Firebase only hosts previous version of Flutter web app

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.

What is impact by deleting android app from firebase

I want to delete android app and create a new app in firebase project to change package name, buy I don't know what impact is by delete app.
https://support.google.com/firebase/answer/7047853?hl=en
I found this doc about delete firebase. Is there any impact else after delete app?
appreciate for answer.
The app is simply removed from the project. That's all. Nothing else in the project will change. You can then create a new app, get a new configuration file for it, and start using it immediately.

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.

NativeScript + Firebase, new firebase project is not being picked up

I am working with Master Detail with Firebase Angular template, and I can successfully build the app locally.
But then when I try to reconfigure the app for my own firebase project, nothing seems to change. It continues to query the default app's firebase.
I have followed the instructions for changing firebase app to my own to the letter but I cannot figure out why it still keeps pointing to the old app.
These are the steps I take to change the firebase app:
I create an App in Firebase, using the app id from package.json.
I download google-services.json and copy it to App_Resources/Android/google-services.json
Additionally, I delete google-services.json from platforms/android/app, just in case.
I uninstall the previously installed App from the emulator. I event deleted and created a new emulator to make sure there are no remnants of the previously built app.
I search all the files in the project for any reference for https://car-rental-b26b7.firebaseio.com which is the default firebase app that comes with the template, and I don't find anything at all.
I also edited firebase.common.ts with the following upon successful initialisation:
.then((instance) => console.log("firebase.init done", instance),
Just to see which project its initialising.
7. Finally, I build: tns run android
And sure enough, the console log shows https://car-rental-b26b7.firebaseio.com as the project being initialised.
I know for definite it is copying the new project's google-services.json over to platforms/android/app, because when I deleted the file it refused to build, as expected. Placing the file back, it builds successfully.
But I have no idea why it continues to reference the original firebase project.
Has anyone come across something similar?

Resources