Every now and then we are met with the error: "Unable to process request due to missing initial state" whilst trying to log in using Firebase. The problem is usually resolved when the user tries to login a second time.
I see a lot of similar tickets which are all dismissed for not running the helper code on the same origin as the actual application.
I can confirm both our Firebase helper code and application run on the same origin, so this is not the problem.
We've tested multiple versions of the Firebase SDK but it seems to be present in every version we try
The issue appears on both Android and iOS and is not tied to using a specific browser.
It is not a recent error, but has happened for well over a year
It appears to be some sort of race condition in the Firebase SDK client code.
Steps and code to reproduce issue
The problem is very hard to reproduce because it seems to happen only sporadically. Nevertheless we receive a lot of complaints from our users. Some info that might help:
We've seen it happen both on Android and iOS devices on both Chrome and Safari
The error doesn't necessarily appear the first time, but can happen after a couple of logins
A retry solves the issue (temporarily) in nearly all cases
Like I said it appears to be a race condition which makes it very hard to accurately reproduce. I'll keep retrying to see if there are any specific steps that may help to trigger it more often.
Operating System
iOS 16.x and up, Android 12 and up, any browser
Environment (if applicable)
React 17.0.1
Firebase SDK Version
10.6.0
Firebase SDK Product(s)
Auth
Project Tooling
React web app.
Detailed Problem Description
Every now and then we are met with the error: "Unable to process request due to missing initial state" whilst trying to log in using Firebase. The problem is usually resolved when the user tries to login a second time.
I see a lot of similar tickets which are all dismissed for not running the helper code on the same origin as the actual application.
I can confirm both our Firebase helper code and application run on the same origin, so this is not the problem.
It appears to be some sort of race condition in the Firebase SDK client code.
Steps and code to reproduce issue
The problem is very hard to reproduce because it seems to happen only sporadically. Nevertheless we receive a lot of complaints from our users. Some info that might help:
Like I said it appears to be a race condition which makes it very hard to accurately reproduce. I'll keep retrying to see if there are any specific steps that may help to trigger it more often.