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

Always 403 - Error: Sign-in failed with new key #7

Open
alexs77 opened this issue Apr 30, 2020 · 15 comments
Open

Always 403 - Error: Sign-in failed with new key #7

alexs77 opened this issue Apr 30, 2020 · 15 comments

Comments

@alexs77
Copy link

alexs77 commented Apr 30, 2020

I created an AWS EC2 instance and "installed" yt-migrate there. I created a DNS record pointing to the IP, so that I can enter eg. http://ytm.example.org/ and get to my yt-migrate copy.

On the OAuth Consent screen, I entered example.org in the list of authorized domains (because ytm.example.org gets shortened to the top private domain; I own the real top private domain).

In the credentials of the OAuth 2.0 client, I added http://ytm.example.org both at Authorized JavaScript origins and Authorized redirect URIs.

Entered the API key and the client ID in main.js. But sign in always fails with "Error: Sign-in failed", no matter what browser I use.

@raj-khare
Copy link
Owner

Can you show the error message returned from the google server by going to the dev tools?

@alexs77
Copy link
Author

alexs77 commented May 1, 2020

image

cb=gapi.loaded_0:181 Uncaught 
{error: "idpiframe_initialization_failed", details: "Cookies are not enabled in current environment."}
details: "Cookies are not enabled in current environment."
error: "idpiframe_initialization_failed"
__proto__: Object

@alexs77
Copy link
Author

alexs77 commented May 1, 2020

image

I get this, when I use a new "person" (profile) in Chrome. One with no addons at all. I haven't logged in to "Google" for sync either, in this profile.

https://content.googleapis.com/discovery/v1/apis/youtube/v3/rest?pp=0&fields=kind%2Cname%2Cversion%2CrootUrl%2CservicePath%2Cresources%2Cparameters%2Cmethods%2CbatchPath%2Cid&key=... returns a 400 error. The "key" value matches the "client secret" I got when setting up the OAuth client in google cloud.

Interestingly, the error is different this time - now it is "Error: Error. Please try again"; it used to be (in my main profile): "Error: Sign-in failed".

@raj-khare
Copy link
Owner

I've updated the code so that you'll be able to see the exact error message. Please pull the updates and let me know the errors.

@raj-khare
Copy link
Owner

Also, are you restricting API Key?

@alexs77
Copy link
Author

alexs77 commented May 1, 2020

I'm not restricting the API key.

image

This time, I got a different error message on my main account: Error: popup_closed_by_user
What popup? I allowed popups in the website permissions. Normally, I use uBlock Origin; it's disabled for this site. Also ads are allowed/enabled in the website permissions.

image
Is it right, that almost nothing is shown in the dev console?

image
That's from my other account. For a short time, it showed "signed in" and then it changed to error.

@raj-khare
Copy link
Owner

Can you try on this: https://raj-khare.github.io/yt-migrate/. I have refreshed the quota.

@raj-khare
Copy link
Owner

A popup screen for choosing the google account has to appear.

@raj-khare
Copy link
Owner

As per google docs:

idpiframe_initialization_failed
Failed to initialize a required iframe from Google, for instance, due to an unsupported environment. A details property will give more information on the error raised.

Maybe try in another browser or incognito window?

@raj-khare
Copy link
Owner

Also, try disabling "Block third-party cookies and site data" option.

@alexs77
Copy link
Author

alexs77 commented May 1, 2020

As far as incognito window is concerned - that's why I used a new profile. But I'll try an incognito window

"Block third-party cookies and site data" - where is that? I allowed all the things that I could allow (or have it still set to "Ask"). Nothing is set to block.

Another browser: I tried to use Safari, iCab and Firefox. Doesn't work on any other browser. At best, it shortly shows "SIgned in", but then the error (Error: Error. Please try again) is shown.

@raj-khare
Copy link
Owner

Is the error still popup_closed_by_the_user?

@alexs77
Copy link
Author

alexs77 commented May 1, 2020

In Chrome it's still Error: popup_closed_by_user, yes.

However, in Firefox, I got it to work :) I created a new project in GCP and thus new API key and client. And now it works and I was able to migrate a first batch ;)

@raj-khare
Copy link
Owner

Great! I'll try to fix the bugs

@janoschp
Copy link

Getting the same error popup_closed_by_user

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

3 participants