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

Authentication Failure #671

Closed
DanTheTechMan opened this issue Mar 9, 2022 · 92 comments
Closed

Authentication Failure #671

DanTheTechMan opened this issue Mar 9, 2022 · 92 comments
Assignees
Labels
🐛 bug Something isn't working

Comments

@DanTheTechMan
Copy link

Hello,

I followed the instructions in the Setup Wiki and I don't believe I missed anything, however I keep getting an Authentication Failure error. Here's a screenshot of the error:
image
I've already tried moving the OAuth 2.0 JSON credentials file to various different locations on my PC (I'm using a Windows PC), however I keep getting this error. Is this a bug or am I doing something wrong or missing something? Please advise. Thanks.

@github-actions github-actions bot added the 🐛 bug Something isn't working label Mar 9, 2022
@WisdomCritFail
Copy link

im getting the same error :(

@kszkristof
Copy link

same, on a win11 fresh install. i guess its good to know that its not only happening to me ¯_(ツ)_/¯

@ZeKap
Copy link

ZeKap commented Mar 10, 2022

Same here on Linux (Ubuntu 20.04)

@NicoAnth
Copy link

Same here on windows 10

@gabrielPaim98
Copy link

Same error hero. Looking at the dev tools there seems to be no "redirect_uri" on given client_secret.apps.googleusercontent.com.json.
I was able to fix it by going to Cloud Console, credentials, and using "Web client (auto created by Google Service" under OAuth 2.0 client IDs. Just download the .json file and change the "Key file Path" on the app to this new one.
Let me know if there might be any security issues with this 😀.

@jamie-crawford
Copy link

I had this error yesterday. Today I tried again and still received the error. On a lark, I redownloaded my key and it worked. The two key files are quite different in content. Not sure what changed, but it might be worth redownloading your key if you are still experiencing this.

@im-coder-lg
Copy link
Contributor

Hmm @Melvin-Abraham documentation of this issue?

@Enryhen
Copy link

Enryhen commented Mar 13, 2022

I have also experienced this same exact issue on windows 11, hope it could be fixed soon.

@im-coder-lg
Copy link
Contributor

Download the JSON file again with the steps above. /ping @Melvin-Abraham !!!

@Melvin-Abraham Melvin-Abraham pinned this issue Mar 13, 2022
@Melvin-Abraham
Copy link
Owner

Thank you folks for pointing this out and figuring out a solution 😊. I'll add this soon in the FAQ

@dwnsideup
Copy link

Same
image

@sumeshir26
Copy link
Contributor

@dwnsideup Try redownlowding your key file

@zNoobs
Copy link

zNoobs commented Mar 14, 2022

Same problem,

But after selecting the Google account and clicking on "Continue", I get a blank page with this error:
Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared.
I tried with another Google account, same error.
I tried with another web browser, same error.

EDIT:
Now the JSON from cloud console works (I didn't change any settings, I just redownloaded it), and I get the code (Setting authentication in the app step 10) but I get this error on the software:

Failed to get Tokens
Assistant failed to fetch the tokens from server. Either the auth code is invalid or the rate limit might have exceeded.
Try selecting a different Google Account.
Error: Error getting tokens

I tried with another Google account, same error.
Uing the JSON from Web client ID still shows "Unable to process request due to missing initial state. [...]" error.

@kszkristof
Copy link

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

I got the same error when using Web client (auto created by Google Service) that was suggested by gabrielPaim98. I "fixed" it by deleting the existing client IDs and recreating a new one, waiting a day and then downloading the new JSON and it works now.

I don't know if the waiting affected the results or not but when I downloaded the JSON file directly after creating the client credentials, it didn't work..? I think that this is a problem on Google's end (it says that it has created the credentials but it haven't yet or something like that)

@zNoobs
Copy link

zNoobs commented Mar 15, 2022

Still same error today, even with new JSON created:

Failed to get Tokens
Assistant failed to fetch the tokens from server. Either the auth code is invalid or the rate limit might have exceeded.
Try selecting a different Google Account.
Error: Error getting tokens

@vettloffah
Copy link

Tried with multiple keyfiles, including all recommendations above. Getting Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared. error each time.

@Ahmed00010
Copy link

Same error hero. Looking at the dev tools there seems to be no "redirect_uri" on given client_secret.apps.googleusercontent.com.json. I was able to fix it by going to Cloud Console, credentials, and using "Web client (auto created by Google Service" under OAuth 2.0 client IDs. Just download the .json file and change the "Key file Path" on the app to this new one. Let me know if there might be any security issues with this grinning.

thanks

@Hiddespenkelink
Copy link

Also getting errors.

  • Using the Web Client ID the page doesn't load and this appears: This site can’t be reached localhost refused to connect.
  • Using the same client ID is the same for everyone Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared.

Same issue here

@afrizalyogi
Copy link

Also getting errors.

  • Using the Web Client ID the page doesn't load and this appears: This site can’t be reached localhost refused to connect.
  • Using the same client ID is the same for everyone Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared.

Hi guys, I found something that maybe can solve this
Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared. problem.

So, I was copy this code and paste it into the app. This worked for me but I don't know if it will work perfectly or not.

@SivaMarti
Copy link

Also getting errors.

  • Using the Web Client ID the page doesn't load and this appears: This site can’t be reached localhost refused to connect.
  • Using the same client ID is the same for everyone Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared.

Hi guys, I found something that maybe can solve this Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared. problem.

So, I was copy this code and paste it into the app. This worked for me but I don't know if it will work perfectly or not.

I would just like to verify that this solution by @afrizalyogi worked for me 100%.

I was having the exact same issue, "Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared."

The token code seems to appear in the url box. By copying the numbers starting after, "code=" and before "&scope", then pasting them in the Unofficial Google Assistant set up where it asks for the code, resulted in a successful authentication.

Also had to follow previous suggestions by others in this thread,

ie. deleting previous created Client IDs under OAuth 2.0 client IDs, creating a new Client ID for OAuth 2.0, publishing the project under OAuth consent screen to where it switches to "In production", deleting the previously downloaded OAuth client .json file and tokens.json file, redownloading the OAuth client .json file, completely exiting Unofficial Google Assistant from the tray, opening the Unofficial Google Assistant, deleting the previous input "Key File Path " and "Saved Tokens Path", setting the ""Key File Path" again with the newly downloaded OAuth client .json file.

(([One other thing that I did, personally, that wasn't mentioned in the instructions when starting out was to create a folder called "Google Assistant" in the C Drive so that all files were nested in that folder; so that it was structured ie. C:\Google Assistant\Google Assistant\ C:\Google Assistant*****.json C:\Google Assistant\tokens.json

Whether this helped are not, I don't know.]))

I hope this can help others get this project working until an update can be made.

@ghost
Copy link

ghost commented Mar 20, 2022

Also getting errors.

  • Using the Web Client ID the page doesn't load and this appears: This site can’t be reached localhost refused to connect.
  • Using the same client ID is the same for everyone Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared.

Hi guys, I found something that maybe can solve this Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared. problem.

So, I was copy this code and paste it into the app. This worked for me but I don't know if it will work perfectly or not.

I would just like to verify that this solution by @afrizalyogi worked for me 100%.

I was having the exact same issue, "Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared."

The token code seems to appear in the url box. By copying the numbers starting after, "code=" and before "&scope", then pasting them in the Unofficial Google Assistant set up where it asks for the code, resulted in a successful authentication.

Also had to follow previous suggestions by others in this thread,

ie. deleting previous created Client IDs under OAuth 2.0 client IDs, creating a new Client ID for OAuth 2.0, publishing the project under OAuth consent screen to where it switches to "In production", deleting the previously downloaded OAuth client .json file and tokens.json file, redownloading the OAuth client .json file, completely exiting Unofficial Google Assistant from the tray, opening the Unofficial Google Assistant, deleting the previous input "Key File Path " and "Saved Tokens Path", setting the ""Key File Path" again with the newly downloaded OAuth client .json file.

(([One other thing that I did, personally, that wasn't mentioned in the instructions when starting out was to create a folder called "Google Assistant" in the C Drive so that all files were nested in that folder; so that it was structured ie. C:\Google Assistant\Google Assistant\ C:\Google Assistant*****.json C:\Google Assistant\tokens.json

Whether this helped are not, I don't know.]))

I hope this can help others get this project working until an update can be made.

This, and the quoted reply worked. Thanks!

@tmack8001
Copy link

@afrizalyogi I hope you have either modified that token and/or rotated the credentials 😜 (not sure if tokens can be used multiple times, but typically not good security practice to share them in the clear)

@GuyMayer
Copy link

yes Found the solution here https://www.youtube.com/watch?v=PPL-jLOcZvs

@Funkeemonkee06
Copy link

Same error hero. Looking at the dev tools there seems to be no "redirect_uri" on given client_secret.apps.googleusercontent.com.json. I was able to fix it by going to Cloud Console, credentials, and using "Web client (auto created by Google Service" under OAuth 2.0 client IDs. Just download the .json file and change the "Key file Path" on the app to this new one. Let me know if there might be any security issues with this grinning.

THANK YOU SO MUCH

Melvin-Abraham added a commit that referenced this issue Sep 11, 2022
Allow assistant to pick-up OAuth authorization code automatically from
post consent screen if redirect URI points to localhost (port 5754)

- Add dep: express.js
- Add page for successful authorization
- Update link for dep `google-assistant` with prefix `github:`

Addresses Authentication Failure #671
@gamer564q
Copy link

im getting the same error

@im-coder-lg
Copy link
Contributor

@gamer564q instead of its not working, check the comments that got a fix, this makes it hard for us to trace commented fixes.

@Melvin-Abraham can you convert this to a discussion if at all possible?

@Morbiusk
Copy link

yes Found the solution here https://www.youtube.com/watch?v=PPL-jLOcZvs

Gracias...

@WatchTheory
Copy link

yes Found the solution here https://www.youtube.com/watch?v=PPL-jLOcZvs

Worked for me, thanks

@Melvin-Abraham
Copy link
Owner

Addressed this issue in version v1.1.0. Also refer Configure Credentials Guide. This issue was added in FAQ as well

@Melvin-Abraham
Copy link
Owner

Closing as resolved

@manofthepeople
Copy link

it says
when i do this
image

@ryukinix
Copy link

ryukinix commented Jun 2, 2023

Please update the guide considering this and not only FAQ! It's part of the flow currently, the default path, not a alternative one.

@PaulMangoKe
Copy link

Same error hero. Looking at the dev tools there seems to be no "redirect_uri" on given client_secret.apps.googleusercontent.com.json. I was able to fix it by going to Cloud Console, credentials, and using "Web client (auto created by Google Service" under OAuth 2.0 client IDs. Just download the .json file and change the "Key file Path" on the app to this new one. Let me know if there might be any security issues with this 😀.

Thank you sir!

@PaulMangoKe
Copy link

Also getting errors.

  • Using the Web Client ID the page doesn't load and this appears: This site can’t be reached localhost refused to connect.
  • Using the same client ID is the same for everyone Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared.

Hi guys, I found something that maybe can solve this Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared. problem.
So, I was copy this code and paste it into the app. This worked for me but I don't know if it will work perfectly or not.

I would just like to verify that this solution by @afrizalyogi worked for me 100%.
I was having the exact same issue, "Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared."
The token code seems to appear in the url box. By copying the numbers starting after, "code=" and before "&scope", then pasting them in the Unofficial Google Assistant set up where it asks for the code, resulted in a successful authentication.
Also had to follow previous suggestions by others in this thread,
ie. deleting previous created Client IDs under OAuth 2.0 client IDs, creating a new Client ID for OAuth 2.0, publishing the project under OAuth consent screen to where it switches to "In production", deleting the previously downloaded OAuth client .json file and tokens.json file, redownloading the OAuth client .json file, completely exiting Unofficial Google Assistant from the tray, opening the Unofficial Google Assistant, deleting the previous input "Key File Path " and "Saved Tokens Path", setting the ""Key File Path" again with the newly downloaded OAuth client .json file.
(([One other thing that I did, personally, that wasn't mentioned in the instructions when starting out was to create a folder called "Google Assistant" in the C Drive so that all files were nested in that folder; so that it was structured ie. C:\Google Assistant\Google Assistant\ C:\Google Assistant*****.json C:\Google Assistant\tokens.json
Whether this helped are not, I don't know.]))
I hope this can help others get this project working until an update can be made.

This, and the quoted reply worked. Thanks!

So grateful for people like you!

@dash-1-1
Copy link

Help what to do about this

Error: Getting metadata from plugin failed with error: No access, refresh token, API key or refresh handler callback is set.

image

@im-coder-lg
Copy link
Contributor

yes Found the solution here https://www.youtube.com/watch?v=PPL-jLOcZvs

@dash-1-1 have you tried this?

@JohnLGalt
Copy link

JohnLGalt commented Aug 16, 2023

Same error hero. Looking at the dev tools there seems to be no "redirect_uri" on given client_secret.apps.googleusercontent.com.json. I was able to fix it by going to Cloud Console, credentials, and using "Web client (auto created by Google Service" under OAuth 2.0 client IDs. Just download the .json file and change the "Key file Path" on the app to this new one. Let me know if there might be any security issues with this 😀.

I managed to bypass the error in Google Assistant using the Web Client ID, but now when it opens the web browser, and i log in, it throws me to a "something went wrong" window and after that to another page that says "The server cannot process the request because it is malformed. It should not be retried. That’s all we know."

image image

Any advice on how to fix it?

If you're still looking for an answer to this, I had the same thing occurring when I used a 3rd party tool to pick a browser when links are clicked (Browser Chooser 2) set as default browser.

Changing Chrome to be default browser (temporarily) in my OS (Win11) ended this exact issue so I could fix the main issue with the tokens as well.

@iamarb
Copy link

iamarb commented Oct 5, 2023

help me i face failed to get tokens

@WhiteCat65
Copy link

WhiteCat65 commented Feb 15, 2024

image
I dont have "Web client (auto created by google)" what do i do
image

@D4nChen
Copy link

D4nChen commented Apr 14, 2024

image I dont have "Web client (auto created by google)" what do i do image

I have the same issue.

@ak-47-brar
Copy link

image I dont have "Web client (auto created by google)" what do i do image

hey did you got the fix for this

@ak-47-brar
Copy link

Hello,

I followed the instructions in the Setup Wiki and I don't believe I missed anything, however I keep getting an Authentication Failure error. Here's a screenshot of the error: image I've already tried moving the OAuth 2.0 JSON credentials file to various different locations on my PC (I'm using a Windows PC), however I keep getting this error. Is this a bug or am I doing something wrong or missing something? Please advise. Thanks.

did you got fix for this ?

@D4nChen
Copy link

D4nChen commented May 2, 2024

image I dont have "Web client (auto created by google)" what do i do image

hey did you got the fix for this

I followed this guide and resolved it.

@im-coder-lg
Copy link
Contributor

im-coder-lg commented May 7, 2024

Okay, that guide solved it, but it was just a normal setup guide! So, the setup guide still works! Note that you don't necessarily download the OAuth JSON from the Actions Console; the GCP project connected to it has a better and proper(working) OAuth JSON, so follow that video, but rather download from the GCP Console. That ought to work. Now, we must find a loophole for Personal Results.

@AthanasiosPetsanis
Copy link

I had this error yesterday. Today I tried again and still received the error. On a lark, I redownloaded my key and it worked. The two key files are quite different in content. Not sure what changed, but it might be worth redownloading your key if you are still experiencing this.

This worked for me too, kinda. I had to create a new secret, delete the old one, download the json again and this time it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests