This person has a similar issue to me Firebase for android not working in my test device suddenly but it was never answered, and the people in the comments seem to have a similar issue.
I can access (and update) values in my firebase using nodejs but when I try to do it from android, there are no failures in logcat or anything, it just does not update anything in the database.
I checked the database reference and it's exactly the same as in my nodejs script, and my security settings are read: true, write: true... It just doesn't make sense why it's not working anymore. The exact same code was working fine yesterday.
Does anyone know what could be going on?
After spending HOURS on this myself - the revolutionary solution is to quit the emulator and reopen it again / restart your device.
In my case, it would work on an emulator but not on a real device. It turns out I had to reset my WiFi router. This answer helped me: Firebase database listeners don't work on android with wifi
I had the exact same issue. Looked almost all the blogs,even contacted firebase support as well but couldn't find the solution. Finally here is the solution.
Just update your existing google-services.json from Firebase->Your project's Project Settings.
Rebuild the app and try it out!
Remove firebase from your android project and then again connect it Properly!
Delete the project from firebase.com, it will delete the API keys from google cloud console.
Delete the implementations from build.gradle just remove each line containing firebase word.
Remove the GoogleServices.json file.
Remove the plugins from the build.gradle at the beginning.
Now invalidate caches and restart.
clean the project.
And with a fresh start connect the app with firebase and then things should work properly.
Mine was not working because I mistakenly deleted the keys from google cloud and then things became worse. I was unable to undo the step cause I am not an experienced developer.
CHECK THIS ANSWER ALSO - Firebase credentials API deleted mistakenly not working after creating api manually
Related
I was working on a project for my studies and everything was working fine, but I changed my OS to win11 while wiping all previous data.
Now Firebase is stuck on "loading" after using any type of sign in. Real time database data is not showing as well. After around 5-10 of waiting auth will sometimes work continuously (can sign in, sign out multiple times, until running app again) but database never.
Everything works well when i use physical device. Apps without firebase work fine on emulator. Internet connection works. Example app that doesn't work: https://github.com/firebase/quickstart-android
I have:
Used multiple different emulators(those with google play) with different sdk
Changed SHA1 and google-servies.json
In Settings -> Appearance & Behavior -> SDK Tools downloaded and activated Google play service
Reinstalling Android Studio, installing win10 again
Updated Google Play services version
Tried different projects on different firebase accounts
Activated Sign-in methods in firebase console
Searched web for several hours and done many other things I can't even remember now
The only error I'm sometimes getting is: E/FirebaseInstanceId: binding to the service failed
and this error when I use new emulator for the first time: E/FirebaseMessaging: Topic sync or token retrieval failed on hard failure exceptions: java.util.concurrent.ExecutionException: java.io.IOException: AUTHENTICATION_FAILED. Won't retry the operation.
E/FirebaseInstanceId: Topic sync or token retrieval failed on hard failure exceptions: AUTHENTICATION_FAILED. Won't retry the operation.
E/FA: Missing google_app_id. Firebase Analytics disabled.
E/FA: Uploading is not possible. App measurement disabled
For me it looks like something is blocking(or really slowing down) connection between android studio emulator and firebase.
I would be very grateful for any kind of help, its really important for my studies.
What fixed my problem was installing an older version of android emulator form this website:
https://developer.android.com/studio/emulator_archive
I was using Android Emulator (31.3.10) Beta 1 and switching to Android Emulator (30.9.5) solved the problem.
I think it's the emulator... Or at least it was for me. I was working with version 31.3.10 and had the same problem. App would not connect to the Firebase server in the emulator. Firebase Authentication would eventually work but took forever to login. Firebase was only using local data. Queries to Firebase returned results only from the cache (which was empty anyway), and I could see that (QuerySnapshot.metadata.isFromCache was true).
Tried reinstalling the app, deleted the emulator image and made a new one, nothing worked. Internet access on the emulator was fine, I could browse web pages etc.
Only thing that worked was downgrading the emulator. I went back to 31.2.10, cause I knew that one worked. You can get older versions from https://developer.android.com/studio/emulator_archive
I really hope they fix it soon cause it cost me a whole day to figure out wtf. Hope this helps someone else.
I have the same problem. It happened after several updates: Windows and Android Studio. Apparently, it's the emulator (version 31.3.10).
In my case, the solution to the problem is disabling Wi-Fi in the emulator and enabling mobile Internet. Although in fact the connection in Windows remains the same.
I found the solution here. Error in the emulator version 31.3.10. Change the emulator to 30.2.9
https://youtu.be/qo3SbdbXFos
I was using emulator version something like 31.3.10 and upgraded it to 31.3.11. Now problem is solved.
Downgrading will also work but i like upgrading.
Below i have attached the screenshot:
https://user-images.githubusercontent.com/96950460/193184898-28e24140-8b12-4c80-8900-c56d4776619b.png
The problem seems to be the emulator. I updated android studio recently and the code that I had already gotten to speak to firebase stopped working without me editing anything.
Instead of reverting to an older emulator, I switched to using a physical device such as my phone instead.
It fixed it right away.
I have the same issue with emulator 31.3.12. After app startup it can't connect to any Firebase services. After 7 minutes and several retries it worked. Without any interaction from my side.
I am using Firebase Remote Config and Crashlytics.
I know that there have been a few posts linked to this issue, but I was unable to find one that solves my issue. Many posts have mentioned needing 3 keys in order to use Google login for Firebase, but for the past year, my personal project has done fine with just 1 key, the debug key. I have never generated an APK nor published to Google Play, hence I do not think that the other keys are necessary. All I want to do is to be able to log in to the application on my emulator using a gmail account. Normal email authentication works, as well as other firebase database and storage services, so I'm especially confused.
A couple weeks ago I renamed many of the directories in the project. I'm not sure if it is a coincidence or not, but checking the git logs, the authentication works before the renaming but does not after the renaming. This meant that I edited the google-services.json file, which is now different from from the one that I download from the firebase console. Could this be the reason? It's several commits and hours of work behind the current head though.
I have verified my fingerprint SHA1 on the firebase console with the one on Android Studio. They are identical. I'm not sure what else I need to do. Any help would be really appreciated. Thank you
Edit: I should also add that I saw a youtube video that just deleted the firebase project and restarted. That is a true nuclear option that I do not wish to do...
I am trying to implement the Google Places Autocomplete API sometimes I am able to get location list but sometimes I get "can't load search results" message. Can someone pease help me with the issue.
This issue have a few possible reasons:
No billing account associated to the project
If you are still using the old Places
SDK
If you reach your quota limit(e.g. self imposed cap
usage)
If your app is not properly
restricted
If any of the above doesn't fix your issue, it would be best to reach out to the support team of the Google Maps Platform as this error commonly has something to do with your configuration in the GCP console wherein only the support team of Google Maps Platform can assist you.
Hope this helps.
i already added the billing service also then get the same error then i added the api key in gradle file and then its works for me
Added your api RNGP_ANDRIOD_API_KEY=***** in gradle.properties
If any of the above still doesnt work, and if you happen to be using an emulator to run the app, try uninstalling the app, then re-installing it when you run the program in android studios.
Background info:
I happened to encounter this issue on my emulator despite doing everything mentioned above, but when I tried downloading the app onto my phone, I found it working there so I tried uninstalling the app on my emulator and it worked after.
I'm trying to use the Firebase Storage for images in my app. What happened was I wanted to change the name of my app as I've changed my mind on what the name will be, and so respectfully I updated the Firebase Console Project.
Corresponding name spaces were updated. After the rename of the app project I wasn't able to download the google.json file anymore. Even after deleting the entire project, and starting from scratch the google.json just wouldn't download kept saying there was a problem with the server.
There is another question with this inquiry, but it didn't have a single issue after upgrading to the new Firebase, and the question that is regarding this is specifically about having been upgraded . It took some learning, and there still isn't as much documentation as I'd like. For example, the FirebaseUI (ListAdapter) and such. Would solve a lot of my current issues in regards to handling data being moved, updated, deleted, etc.
Is there any way to know if this specific bug issue has been reported? Is it a known issue, and is there a possible timeline? I plan to scale the app once I launch and am afraid to do so as once I do. I will be upgrading the plan to the $25 plan for better simultaneous connections.
Any help would be graciously appreciated.
UPDATE
Since a few days ago I was able to download the google.json file. That is great! However, the issue still remains. I cannot use the Storage, and it's giving the same error as the attached image.
Also, I have submitted a ticket with Firebase Support. Communicating with Firebase Support currently via email. Will post updates as I have them.
As title said.
Recently I submit an update to my apps. My client report that after updated the app from google play and run it crash immediately. But a uninstall and install work perfectly.
Now I have no clue how to fix this.
Thanks you.
You are probably using sqlite database, and not handling that database properly that's why this is happening. If are adding/deleting some columns in database manage that via proper versioning.