gapi-querier
gapi-querier copied to clipboard
error:{"error":"popup_closed_by_user"}
I've configured API as explained in the guideline but I receive this error. Maybe do it related to MFA?
Did you get a sign-in popup? maybe blocked by a popup blocker?
If you did get the popup was the sign-in show as successful? and then did you click to allow access?
Did you get a MFA verification prompt? I do have MFA enabled on my account, though I've never been prompted to verify when using this tool. Something to test I suppose.
If you look at google apps access (https://myaccount.google.com/permissions) do you see "Google Photos - API Querier" both in "Signing in with Google" and "Third-party apps with account access" sections?
Any more information/details would help to figure out the issue. Though my default guess is something went wrong in the sign-in flow. I've only encountered this "popup_closed_by_user" error when I close the signin popup.
Hi Jonagh,
I resolved in another way. I don't use your app, but simply I archive the photos that I've included into an album so that in the photo stream I've just the photos that are not included in any album.
For me it's enough. Let me know if It could be a suitable solution also for you.
Mirko
Il giorno gio 29 ago 2019 alle ore 18:16 jonagh [email protected] ha scritto:
Did you get a sign-in popup? maybe blocked by a popup blocker?
If you did get the popup was the sign-in show as successful? and then did you click to allow access?
Did you get a MFA verification prompt? I do have MFA enabled on my account, though I've never been prompted to verify when using this tool. Something to test I suppose.
If you look at google apps access ( https://myaccount.google.com/permissions) do you see "Google Photos - API Querier" both in "Signing in with Google" and "Third-party apps with account access" sections?
Any more information/details would help to figure out the issue. Though my default guess is something went wrong in the sign-in flow. I've only encountered this "popup_closed_by_user" error when I close the signin popup.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jonagh/gapi-querier/issues/4?email_source=notifications&email_token=AHVUZLH7BT232IN4YWZWOLTQG7Y43A5CNFSM4IPODVY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5PBBFY#issuecomment-526258327, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVUZLDT2NEETKSH3Z3OLHDQG7Y43ANCNFSM4IPODVYQ .
--
Mirko
Glad you found a workaround. I prefer not to archive my photos (as I use archival for other purposes), but my app works fine for me so no need anyway.
Just for reference - I tested with MFA/2FA flow...
Popup > choose my google account to use > wait for MFA/2FA verification on phone > verified on phone > popup shows sign-in/verification success > click allow button to give app access to google photos.
... and everything works as expected.
I have been getting the same error, bit weird but it worked in a incognito browser. I can provide the console log errors if you wish to reopen and investigate.
Ya sure, that would be helpful. Do you have two-factor authentication also? Did it work the first time and then not work subsequent times? or you always got this error?
I'll try and find time to play around and figure it out.
I am sorry but I cannot recreate this. I tried logging in from an incognito window to test something and it worked. I do use two factor authentication. It never worked for me until I tried it in the incognito window and then it worked everywhere. Clearing the cache, removing permission, and adding a new client ID couldn't cause this to be recreated.
If I can recreate this I will copy it down ASAP and post it here. Feel free to close. I may open another issue as it seems that the script may be falsely reporting some photo's of mine that are in albums.
@ankenyr Thank you for sharing the incognito trick, I had the same problem :)
@jonagh Thank you for this script and deatiled README!
I experienced the same problem as ankenyr but it also existed for me in the incognito window.
My scenario was this:
- Get the script working on domain 1
- Switch to a different domain but use the same Client ID (There were a couple of missteps here as I think I needed to update the URL for the OAuth 2.0 Client ID and the OAuth consent screen).
- Get the popup_closed_by_user message.
- Recreate the OAuth 2.0 Client ID
- Everything starts working on the new domain.
Tried this on multiple domains, even in fresh Incog windows. Was driving me mental. Maybe an API issue? Ref https://github.com/google/google-api-javascript-client/issues/507.
The trick above didn't work for me :(
I know I'm necro-posting, but I figured out a new reason for this error: blocking of 3rd party cookies. I had those blocked and saw this error. I enabled 3rd party cookies and then the sign in process succeeded. This is Chrome on Windows, if it matters. Thanks for a useful tool!
I know I'm necro-posting, but I figured out a new reason for this error: blocking of 3rd party cookies. I had those blocked and saw this error. I enabled 3rd party cookies and then the sign in process succeeded. This is Chrome on Windows, if it matters. Thanks for a useful tool!
Oh nice catch, yeah I've had 3rd Party Cookies cause me other issues too.
I also wouldn't call this necro-posting since the topic is still open. UI for this error could include some suggestions to check 3PC at least? Cheers
I'm running into the same problem. I'm only doing this for a single domain. I've tried incognito and it's always the same error. Where is there an option for 3rd party cookies?
Did you get a sign-in popup? maybe blocked by a popup blocker?
yes, sign in popup worked fine
If you did get the popup was the sign-in show as successful? and then did you click to allow access?
yes, success and allowed access
Did you get a MFA verification prompt?
yes, completed MFA
If you look at google apps access (https://myaccount.google.com/permissions) do you see "Google Photos - API Querier" both in "Signing in with Google" and "Third-party apps with account access" sections?
yes and yes
What else can I try?
In case somebody pick this up sometime. Some more info for debugging:
I tried to run the code ni a docker container and if i set a plugin_name: "" ,on auth.js (after line 41) it seems to be working per this reference https://developers.google.com/identity/sign-in/web/sign-in
Alright, with code submitted by @amaharana I've updated the Google Auth code to their latest lib. I also added slightly more error message outputting. I'm not sure if this change will fix the issues mentioned above - as there seems to be several possible causes, and google auth still has the same general flow. But maybe?
Note that I haven't bothered adding any cache-busting/file-versioning so make sure to force the files to refresh (if you're trying off a domain that you may have cached).
The third party cookie setting is browser specific. Google it for your browser and you'll find lots of instructions online.
I recommend disabling it right after you're done here - third party cookies are mostly used for marketing purposes, not to make your experience better with the site you're visiting (those are first party cookies).
On Sat, May 14, 2022 at 1:03 PM Reese @.***> wrote:
I'm running into the same problem. I'm only doing this for a single domain. I've tried incognito and it's always the same error. Where is there an option for 3rd party cookies?
Did you get a sign-in popup? maybe blocked by a popup blocker?
yes, sign in popup worked fine
If you did get the popup was the sign-in show as successful? and then did you click to allow access?
yes, success and allowed access
Did you get a MFA verification prompt?
yes, completed MFA
If you look at google apps access ( https://myaccount.google.com/permissions) do you see "Google Photos - API Querier" both in "Signing in with Google" and "Third-party apps with account access" sections?
yes and yes
What else can I try?
— Reply to this email directly, view it on GitHub https://github.com/jonagh/gapi-querier/issues/4#issuecomment-1126776229, or unsubscribe https://github.com/notifications/unsubscribe-auth/APAVQF5UPYCKD4EWJFDIZ4TVJ7MFTANCNFSM4IPODVYQ . You are receiving this because you commented.Message ID: @.***>