Skip to content
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

Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared. #98

Open
Roaders opened this issue Jul 11, 2021 · 8 comments

Comments

@Roaders
Copy link

Roaders commented Jul 11, 2021

Hi

I am trying to get the console-input.js example working. I have setup my google console project, have downloaded the key file and have run my app:

image

I then get the Google Account sign in page where I pick my account and then various confirmation pages:

image

image

image

But then rather than a code I get:

image

Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared.

I've tried to figure out what the issue is and there are some bugs reported about this. It seems related to domain registration. I can't see any domains that are used so I am not sure what if anything should be registered.

Is this an issue with my setup or has Google changed the configuration? It looked like the app process setup has changed a bit since your readme (and in fact Google help pages) were written. For example in the Set activity controls for your account the Device Information and Voice & Audio Activity switches were not present on the page that opens so I was unable to turn them on.

@Roaders
Copy link
Author

Roaders commented Jul 11, 2021

BTW - this is chrome and I have not set any extra privacy settings or restricting local storage access or anything like that.

@Roaders
Copy link
Author

Roaders commented Jul 11, 2021

...and I also tested with Edge to get the same issue

@endoplasmic
Copy link
Owner

What is the Firebase app doing in this scenario? It seems like it's missing some sort of configuration? I just tried the example and it seems to be working fine for me.

@Roaders
Copy link
Author

Roaders commented Jul 14, 2021

I didn't do anything with firebase. That is from the default setting created by google when I setup a new project.

@endoplasmic
Copy link
Owner

I know this is a bit old, but did you end up figuring out your issue @Roaders?

@Roaders
Copy link
Author

Roaders commented Sep 9, 2021

No. I followed the instructions as closely as I could (some of the setup options were slightly different from what was described) and I was left with that error.

@skamath99
Copy link

skamath99 commented Jan 23, 2022

@endoplasmic I'm getting the same exact error! Pretty new to firebase and OAuth, not sure how to resolve this. Is there a specific configuration or setup I'm supposed to use with Firebase?

For OAuth2 I'm using the default "Web client (auto created by Google Service)" where the:
Authorized URIs:

Authorized redirect URIs

  • https://<my_project>.firebaseapp.com/__/auth/handler

@marcussacana
Copy link

marcussacana commented Nov 24, 2022

I solved with a strange process.
1 - Enabled the oauth authorized redirect uri to: http://localhost:5754/auth/handler
2 - Restarted Google Assistent, and Clicked in the "Browser Didn't open" button after try login
3 - Copied the Auth url, look like this: https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&scope=...&response_type=code&client_id=...&redirect_uri=
4 - In the end of this url, has a redirect_uri parameter, I modified that parameter to http%3A%2F%2Flocalhost%3A5754%2Fauth%2Fhandler
5 - Press Ctrl + Shift + I in the Google Assistent to open the Inspector
6 - Go to Network tab to enable the network debugging
7 - Continue the login in your browser
8 - After auth, the google assistent will look like everything is right, and will begin a 10 seconds cooldown.
9 - You will see in the Network tab a request to '/token' that has a error response, click in that
10 - Go to "initializator" tab of that request, look for the first 'request' function call and click it
11 - A javascript code will open, put a breakpoint with F2
12 - Press "Retry" in the Google Assistent to try login again
13 - In the your browser login success message, back the page 2 times and login more one time
14 - The debugger will stop the code, now go to console and run this command: opts.data = opts.body = opts.body.replace("uri=https", "uri=http");
15 - If didn't displayed any error, back to the Sources tab and click in "Resume" in the debugger menu
16 - Just wait and see the magic :)

Dear god, that was a trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants