Google Drive Picker Error

Configured Google integration, backups are working. Enabled Google Picker with correct project number. The login attempt seems to be working fine and correct on Google end. But ERPNEXT gives giving Auth error message and window disappears.

Anyone know why? Or where to look for the cause?

Did you follow the instructions at Google Drive ?

We’re using it in production without any issues.

Yeah I followed that guide. Everything looks good. The login page appears but the ERPNext error message is also displayed at the top.
When entering the login details and MFA flows through fine then the popup for login disappears and error message remains.


Screenshot 2022-10-19 092443

I was running into this today as well, and solved this particular error by enabling the “Google Picker API”.

Here’s a corresponding requirements list from the Github PR: feat: Google Drive Picker by barredterra · Pull Request #12715 · frappe/frappe · GitHub

That said, I’m still not able to use the file picker, even after enabling all of the above.

Now, the error that @iadr3805 references no longer appears, but instead there’s simply… nothing.

Here are the errors from the browser console:

Cookie “G_ENABLED_IDPS” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite [cb=gapi.loaded_0:599:21]

Cookie “AEC” with the “SameSite” attribute value “Lax” or “Strict” was omitted because of a cross-site redirect. [iframe](https://accounts.google.com/o/oauth2/iframe)

Content Security Policy: Ignoring “'unsafe-inline'” within script-src: nonce-source or hash-source specified

Content Security Policy: Couldn’t process unknown directive ‘require-trusted-types-for’

Content Security Policy: Ignoring “'unsafe-inline'” within script-src: nonce-source or hash-source specified

Content Security Policy: Ignoring “'unsafe-inline'” within script-src: nonce-source or hash-source specified

Content Security Policy: Couldn’t process unknown directive ‘require-trusted-types-for’

Content Security Policy: Couldn’t process unknown directive ‘require-trusted-types-for’

This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”.

[iframe](https://accounts.google.com/o/oauth2/iframe)

Storage access automatically granted for origin “https://accounts.google.com”.

Cookie “AEC” with the “SameSite” attribute value “Lax” or “Strict” was omitted because of a cross-site redirect. [iframerpc](https://accounts.google.com/o/oauth2/iframerpc?action=checkOrigin)

Uncaught ReferenceError: authResult is not defined

Also, I can’t find any documentation on what the Authorized redirect URIs should be for this particular integration. Perhaps that has something to do with it?

Where to from here?

Hi Have also enabled Driver Picker API but I’m still getting the error posted previously.
In the Browser getting below error
image

So to be clear, you enabled both the “Google Drive API” and the “Google Picker API”, correct?

Yes both are enabled.

It does seem that more verbosity in the error reporting on this module would be good, especially for that generic “Google Authentication Error” issue.

Any ideas @rmeyer ?