Recent Android Studio cannot connect to firebase? - java

I tried creating multiple new projects and made sure that all codes in several files are correct. I'm quite new to this and have never encountered this problem previously. After using the assistant to connect to firebase, it opens up the browser, asks me to login and ask for permission. After clicking the accept, a new window opens up with "localhost:55842/" and what happens to Android Studio, it will be giving a response "Firebase: Received a request from an invalid host firebase". Is there any way I can fix this? I have tried using previous version of IDEs but the only difference is that the connection succeeds but it can't receive or save data into the firebase.

Please make sure you turn off any antivirus and firewall temporary to enable firebase assistant connect flow running.
Android Studio choose random listening port each time we try to connecto to firebase web console, so we can't simply just allow one port in firewall/antivirus for android studio, completely disable is the only option
In my case, Avira antivirus is the cause, disable real time scan and then firebase connect flow running as expected (tried on Android Studio 3.6.1)

Hi I am not sure if you have solved this problem. I was facing the same issue. So it's the problem with the JSON file since android studio stores everything in the build it might have few older files conflicting with new file so I went ahead and deleted the old build file and restarted my android studio with the project and everything was working fine after.

Related

Mobile app emulation able to connect to online application service but not working on actual device

I'm currently trying to solve an issue with a mobile application that is throwing a "Error communicating with application service' alert upon being launched.
The error occurs on both ios and android versions of the app across
multiple device's, wifi, 4G etc.
An emulation of the application using Android Studios DOES work. The
app successfully communicates with the sites API. I can see all of
this information on the logcat within Android Studio.
The mobile application has not been updated recently, the local version i'm
running the emulation with is identical to the live version. The app
hasn't been updated prior to the error occurring.
The domain/URL that the application is connecting to has recently had
a Certificate Signup Request generated for the SSL certificate that expires
in a few months. I'm not sure if this is relevant however I have read
that a emulated device handles https differently to an actual device.
To further diagnose the issue on an actual device I'm looking into "tcpdump" as it can potentially show everything that is happening on the device. I've tried using LogcatExtreme but it doesn't show a more verbose detailing of the error that is occurring.
Here is a link to the application that you can download right now. If anyone believes this is a security risk, please let me know and I will take it down. https://play.google.com/store/apps/details?id=au.com.silkhospitality.Silk
Even though I haven't exhausted all avenues of diagnosis I wanted to ask the community before I potentially end up in a culdesac.
Both the Android and iOS version of the application in question were redeployed to their respective app stores in order to solve this. The real reason for them failing to connect to the application was never discovered. These applications were both 5+ years old and needed some minor environmental changes to be made but none of the core programming was changed/altered in order to successfully redeploy.

Working on single Firebase project from two machines

I have a single project which is synced on two different machines. I have Android Studio and the emulator successfully installed on both machines. I also have successfully implemented Firebase + Google authentication. When I open the emulator on the first machine and run the app, everything works fine but when I run the same project on the second machine using the same user, the authentication fails. If it try to print the error it says:
Google sign in failed! Error 10:
How can I make both authentications work on both machines? Thanks!
You have to add the SHA-1 key of the second machine in your firebase project.
The process is well explained already in this post. Please check it out in case you need clarification.

I have some problems using my app for the second time

I have developed an app using Android Studio, which include login and register activities. when I copied my code to my new computer I have launched the app for the first time and it worked just fine. The day after, when I was trying again to launch the app once again. I wasn't able to sign-in to an existing user. I even could not create a new one. Does someone have any idea what caused it' and how could it be fixed?
Your question has no details at all..
Do you store the user credentials on a db?(it could be that you cannot login because you didn't connect correctly to the db) which type of db? is a Web service to an admin panel or some code posted on a hosting/vps?
Find out which is the error inside the logcat and post ONLY the error, maybe the stacktrace can help you.
So you can launch the app but the data inside is missing(credentials).. Do you see everything as usual or are there any images/details missing?
Stupid but easy to forget: do you have an active internet connection on the emulator?
have you tried to debug the code, have to tried to debug at least the authentication/register process?
Add more details, check your manifest is ok and you have all the permissions(internet, wifi or anything else), post the logcat error(if there is an error) or post the debug error, then someone can answer

Device not listed / ADB dropping my device 2017 SDK 25

Can connect MTP but not over ADB. ADB DEVICES shows nothing. Will go all afternoon, works fine, then suddenly cannot push to device from Android Studio. I have tried to no avail:
Re/starting ADB
Checking thaT SDK is installed
Driver issues (Can see filesystem)
Switching to a USB 2.0 from 3.0
Restarting dev machine, android phone, android studio
Revoking debugging authorizations worked for some period of time before adb fails to see the device again
What ELSE could be preventing this? Worked fine for so long after the last SDK 25 update and today and yesterday I lose connection frequently.
EDIT: Is my device possibly failing somehow? Has me wondering would cause revoked USB debug certs like this? Meaning to try another one when I get my hands on it later
EDIT: This worked for 5 hours, and now does not work. It keeps asking me allow USB debugging when I plug in because I did not check the box, however adb still fails to see the device listed.
So far it is working after I went to USB debugging options in Android phone and pressed "Revoke USB debugging authorizations". Prompted to add authorization, accepted and seems to work.
Debugging Authorizations. How do these just, "go bad"? Expiration date?

Unable to Understand Message GCM

I'm dealing with Eclipse Luna to build the web app (jsp,java) while dealing with Eclipse Juno to build the android app. Plus, i'm referring to this link as my tutorial http://javapapers.com/android/google-cloud-messaging-gcm-for-android-and-push-notifications/
Registration id generated successfully in android device.
This what appears when the message is push respectively in the GCM
[ messageId=0:1407227521756362%31e4cc17f9fd7ecd ]
What does it mean? How to fix it since i should have a message received at the Emulator and im not getting it.....?
Thank you.
As it seems that my comment helped solve the problem, I'm posting it as an answer :
If your device is connected to the internet with WiFi, you have to make sure ports 5228,5229,5230 are not blocked (usually 5228 is enough).

Categories

Resources