-
Notifications
You must be signed in to change notification settings - Fork 928
Unable to process request due to missing initial state. #4256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
i have the same problem, heeeeeelp |
Seeing the same issue in production for our react app on android. |
same issue on the Facebook in-app browser while the user does Facebook sign-in. |
Seeing same issue on Android using Next.js & Firebase v8.2.1 |
+1 |
Seeing the same consistently on Android + Chrome deployed on Vercel with Next.JS & Firebase v8.2.1 both using |
+1 on NextJS using Firebase v8.2.2 |
+1 |
+1 - anyone managed to resolve? |
this issue, the version doesn't matter. If you are using a custom domain, you have to set Client SDK configuration. you set it? firebase.initializeApp({
apiKey: '...',
// Replace the default one with your custom domain.
// authDomain: '[YOUR_APP]/firebaseapp.com',
authDomain: 'auth.[YOUR_DOMAIN]'
}); https://cloud.google.com/identity-platform/docs/show-custom-domain |
@kenji7157 I have the same issue on the Facebook in-app browser while the user does Facebook sign-in. |
I am having the same error using the GitHub auth provider when using my Android device + Chrome. I have tried using the Using the same Android device and Firefox, however, works just fine. |
I was using GitHub auth provider with custom domain configured on Netlify as CNAME. Once I updated my GitHub OAuth application with the new custom URL everything worked fine. Eg: |
@raevilman I moved to custom domain and I still have same issue. Althought I am not using Github as DNS provider but gandi.net |
@KevinLourd ~HIH |
Same here. Using cordova wkwebview, inappbrowser, a well configured custom auth domain. I've seen it happen more on iOS than Android. What is weird is that the second time I try to sign in with Facebook (when I don't have to enter my credentials anymore), it works fine. When it's with AppleId (which asks me my credentials every time), the second time fails with the same result. Edit: now it seems that it doesn't always work the second time with Facebook, it has an inconsistent behaviour. |
I have now pointed the auth domain to point to the |
Anyone at Firebase looking into this? If our users can't log into our apps, it should be priority #1 no? |
@louisameline I have contacted the Firebase few days ago, but they asked for a minimum reproductible example. Would anyone have reproduced one by any chance? cc @hsubox76 |
I guess I can share a piece of my app if it stays private. Let me work something out |
@KevinLourd I have a project ( still in development ) which is getting the same issue. Here is the repo : https://github.com/Hamaad-Siddiqui/Fast-Feedback-2.0 |
Hi folks-- for those of you who've been able to reproduce it yourselves, what are the circumstances specifically? For example, are the browsers running in private/incognito mode? Are third-party cookies disabled (this shouldn't apply but in some cases the way this is implemented in the browser could cause issues)? |
One more thought since this issue could be caused by numerous things. There was a recent bug in the Firebase Console that caused the wrong auth domain to be presented when enabling other OAuth providers. The domain had "-default-rtdb" at the end and this would lead to the wrong configuration with the other provider. Since the "missing initial state" issue could be caused by several different things, it would be worth double checking your configuration for GitHub/Microsoft/etc sign in. The bug in the Console was resolved late December and it now displays the correct value, but depending when you looked at the Console to configure the providers you may still have issues. |
@samhorlbeck I've unfortunately not been able to reproduce it consistently, but from the reports I have seen it appears to be happening inside the Instagram WebView on iOS when trying to sign in with Facebook or Google. This happens if someone links to our site in their Instagram bio, where tapping that link doesn't intent to another browser but opens Instagram's in-app, webview-based browser. Based on that, it feels like it might have something to do with these apps' implementations of UIWebView or WKWebView? Though I can verify that sessionStorage/localStorage both work as expected in those browsers, so it's possible that's a red herring. Let me know if I can help in any other ways, and I'll see if I can find anyone who can reliably reproduce it. Thanks! |
@samhorlbeck Just go on a mobile to the website that I provided you the repo of https://fast-feedback-dev.vercel.app |
After two years and not a single reliable solution was provided by anyone from Firebase to this issue, the best thing is to leave Firebase and create your own authentication system with FastAPI. Probably you can learn FastAPI tutorial in less than a week, while this issue with Firebase it seems it will never be solved. Every week I receive emails about different people arriving at this issue in all kinds of apps. For years... At least that's what I have done, zero issues. What's the point of using Firebase if it doesn't work reliably for all phones / browsers? Don't wast your time, guys. Years has passed... the issue is the same as always. Unpredictable, happen to some people in some phones or in some browsers, sometimes it happens sometimes it does not. I don't recommend anyone to use it. Leave Firebase and learn FastAPI (or any other framework, doesn't matter) |
When I switched from Using mobile browsers in NON-incognito mode results in the above error. Since I'm unable to figure out how to handle it, I'm going with |
- Reason: FIREBASE ISSUE: firebase/firebase-js-sdk#4256 - Add google icon - Handle navigator exception
Works on Chrome, fails on any other browser. Why is that Google? |
Consistently having this issue; using Google IdP for multi-tenant; was working perfect until 4 months ago and iOS 16 - have been unable to progress. |
Please note that "chrome" is completely different again wether it's windows / iOS / Android / macOS / Linux /... So your comment is quite vague and not really actionable |
The issues' been open for +2 years; no action from anyone and you are worried about this one comment not being actionable. |
Having the same issue with Flutter + Apple Sign In on Android. I've ran the app on a real device using Brave as default browser. |
so the only auth provider that does not work is github, so you probably wanna switch to something else like google |
I happen to have that issue a lot of time with Google |
Created a working Google Auth using Firebase's built in Authentication system. Used this guide https://www.youtube.com/watch?v=PJCr_aoOv68 but had some trouble because there is a bug I experienced that is recorded here: firebase/firebase-js-sdk#4256 the resolution seems to be using signinwithpopup instead of signinwithredirect.
We are experiencing this in our app. Both on iOS and Android, when signing in with Google and Microsoft. |
Just wanted to comment on this as well and confirm that signin with popup does indeed seem to solve this issue for me on firefox. Turning off enhanced tracking protecting also fixes it on firefox. I haven't tried anything on mobile though. |
For myself the only solution that worked with Mobile-App was to use an in-app browser rather than the external chrome/safari; the flow works again. |
any update on this seems to be caused all the time? |
+1 |
1 similar comment
+1 |
I am having the same problem on android, the only auth provider I have setup and turned on is the phone authentication. I have setup play integrity and followed all the guides to make sure it was setup properly. Even using the debug "fake number" I setup in firebase console it still opens a browser and shows that missing initial state error. |
Same issue here +1 |
Same issue |
We are having this issue on the Firebase native SDK for Android. We are not using a custom domain. If using a custom domain (web SDK) it doesn't happen but we get another sort of problems (doesn't work well with the mobile app). |
after some research, I will continue with creating custom token and sign with it to avoid this error. |
Getting this too. |
Hi everyone, since this issue has been open for a while and we have many scenarios where the "missing initial state" error can show up, I would like to summarize it here: The most common case for this error is if the auth helper code and the main application are NOT on the same origin. This can be fixed by following one of the best practices in https://firebase.google.com/docs/auth/web/redirect-best-practices If you are on the same origin and still seeing this issue, please file a separate issue describing the setup + repro steps. If you are seeing this in mobile, please open an issue in the relevant mobile SDK. Again, a repro app + the browser info will be very useful. Thanks! |
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
When trying to do sign with redirect (social login: google/facebook), many of our users are getting the following error:
Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared.
Steps to reproduce:
Not able to reproduce this. But it occurs very frequently for many of our users.
The text was updated successfully, but these errors were encountered: