Firebase unable to process request due to missing initial state - android

I am trying to use phone auth from firebase and I get this error now.
Unable to process request due to missing initial state. This may happen if browser session storage is inaccessible or accidentally cleared.
This was working a week ago and no longer works.

I have solved this by registering my app with SafetyNet with SHA2. To do this follow these steps:
Get your SHA2. If you don't know how to get this, follow this tutorial:
https://www.youtube.com/watch?v=kLaNnuoqnmA
Note. This youtube link is for SHA1 but you will notice that SHA2 will be shown here if you pay attention.
Go to your Firebase Console then, go to Project Settings > App Check. You will notice your app is "Unregistered." click this to register your app.
Enter the SHA2 you copied and Accept some terms below then click Save. you will notice the "Registered" with green check icon.
Btw, this error happens on one of my devices but not on another. I also searched through this error and no one has solved this including this page. This happens in my phone authentication using firebase when getting an OTP as I send my phone number. The app tries to redirect you to a browser for Recaptcha for verification if you don't have SafetyNet. Thus, having no SafetyNet will cause your app to always be redirected for Recaptcha which sometimes causes an error. Thus, to solve this, register your app with Safety Net. to understand this, read this documentation.
https://firebase.google.com/docs/auth/android/phone-auth?authuser=0
Focus on 2. Enable App Verification and you will notice that recaptcha is just an alternative for SafetyNet.

It had on the Ionic/Angular/Capacitor app too. i.e. Android and Chrome. Firebase Auth with Microsoft Login.
So I have cleared all the chrome browser data on the Android device and then no issues. i.e. working fine now.
More workarounds: https://github.com/firebase/firebase-js-sdk/issues/4256

I experienced the issue with an iphone web app. I went into Settings -> Safari and disabled 'Prevent Cross-Site Tracking'.

Related

Persisting anonymous credentials after uninstall firebase - Android

I can not figure out if this should work or not.
According to this post it should NOT work. But it's also from 2017.
According to this it should be stored in the Keystore services, which seems to only be erased if you log out.
Played a couple of other games that I'm confident uses firebase as well, and they seem to be able to log me back in after I uninstall the app (without connecting to Facebook or similar)
Also as a side note iOS keeps the credentials also after uninstall and are able to log back in

Can't add social login with Google on Android - but on iOS it's working

I'm trying to add support to social login with Google on my application using the package google_sign_in.
I got to add support of that on iOS, and it's working. But on Google, for some unknown reason, it can't work anymore.
Few days ago it was working, but now it just start the following loading, and then shows the error Couldn't sign in:
On OAuth consent screen, since I updated some informations on my application, I needed to request again the authorization, but it says that the previous consent is still in use... but I don't know if would be the root of the problem and I really need to wait 4~6 weeks to work again on Android.
The problem was fixed. It was being caused by a wrong jks of Firebase.

Paytm Integration not working android

Paytm Integration not working. I have tried several examples but all of them are showing the same error, even its sample demo at its official site is showing the same Oops error.
It redirects to Oops, Payment failed due to any of these reasons page while logging with testing credentials. I even tried with my own real debit card credentials but it results in the same error.
Testing credentials:
Phone No: 7777777777
Password:Paytm1XXXXXX
[
To solve the issue in Android Nougat, please update the Chrome Browser — to the latest version (V55)
Also — we recommend you to set it to -auto-update but clicking on the three vertical dots on the right hand side.
Once you do the update — please kill and re-open the Paytm app and try adding money now.
Have u got all the parameters from paytm? like MID, WEBSITE, MERCHANT KEY etc. If yes then first and foremost thing you should do is, talk or mail to a Paytm representative allotted to your paytm account.
Second, if you have all the parameters, talk to paytm support for configuring your checksum generation and validation urls. They usually don't configure it properly and it is the most common cause for this error.
Third, they recently changed their flow for server side implementation, so ask your back-end tech person about the update, if he had or not implemented the changes.

Google EndPoint not getting called when request has google plus profile url as parameter

My app uses Google App Engine as backend and it provides google plus & facebook login option to user.
One of the endpoint Api takes user profile picture url as input parameter and tries to store it in the user profile table. My endpoint Api was not getting called successfully when user choose the option of google plus as login,
I have narrowed down the issue to find out that it only happens during google plus login scenario and from the backend logs I see the issue is only because of below parameter which is profile photo url.
https:%2F%2Flh3.googleusercontent.com%2F-xPc6TIzQiFA%2FAAAAAAAAAAI%2FAAAAAAAAAeU%2FUIIpz-4G1dQ%2Fphoto.jpg%3Fsz=400
Backend Request from logs(Data changed for privacy reasons).
/_ah/api/registrationAPI/v2/XXXXXX/Rahul%20Purswani/rahulfhp#gmail.com/https:%2F%2Flh3.googleusercontent.com%2F-xPc6TIzQiFA%2FAAAAAAAAAAI%2FAAAAAAAAAeU%2FUIIpz-4G1dQ%2Fphoto.jpg%3Fsz=400/XXX/YYY/VVV, returning NOBODY to imply authentication is in progress.
My Api Class Declaration :
#Api(name="registrationAPI",
version="v2",
namespace=#ApiNamespace(ownerDomain="backend.XXX.XXX.YY",ownerName="backend.XXX.XXX.YY",packagePath=""))
public class PlayerRegistrationEndPoint {
}
And to my surprise this only happens when I test the Api on local development server through real device. If I deploy my api all works fine, I have spent almost the day to narrow it down, If you have any clue about it that will be really appreciable.
Are you accidentally logging the bytes of your pictures using logging.info(), logging.error(), print, etc? Logging bytes to either the logger or standard out can make the dev instances (or even production instance) go into zombie mode.
This has happened to me many times. Check all logs to make sure you aren't trying to log something that isn't a basic variable type.
I was getting this issue since we migrated our code base from Eclipse to Android Studio, during this migration our app-engine sdk version got changed from 1.9.22 to 1.9.18.
Looking back and doing comparative analysis with why it used to work with eclipse, I tried using 1.9.22 app-engine sdk here and issue got resolved, the zombie behavior is no more and even in development environment everything is stable now.
I also checked & removed all the loggers and out statements, though the issue was not fixed with trying that alone.
Thanks for even letting me know that it can also go wrong in future during development environment testing.

Is my Android licensing working as it should?

I have an app that uses the Android licensing. I'm using the ServerManagedPolicy which according to http://developer.android.com/guide/publishing/licensing.html should cache the server responses.
To test it I did the following:
In the developer console, set the server answer to be "LICENSED" for my account.
Connect the phone to Internet, and run the app. It shows the dialog I created to let the user know it is trying to obtain a valid license. It then shows that it found it and lets me run the app.
I exit the app (back button) and the force close it.
I disconnect from the Internet.
I run the app again. I see the dialog again, but this time it says a valid license was not found and doesn't let me run the app.
Shouldn't the ServerManagedPolicy cache the license it found the first time and let me run the app the second time?
I haven't published this app yet. Could this have something to do?
Thanks!
Don't worry, I had the same issue. When you use a test or dev account, licence is not cached bu the ServerManagedPolicy. But for your real clients, it will be cached by LVL.
Nothing in the docs says it clearly, but that works and actually, is nice feature for devs.
Regards,
stéphane
Btw, You should add a link to your app in your profile as I did... I am curious about it but can't guess what it is.

Categories

Resources