perkeep / gphotos-cdp

This program uses the Chrome DevTools Protocol to drive a Chrome session that downloads your photos stored in Google Photos.
Apache License 2.0
656 stars 36 forks source link

Cannot sign in to google photos: application or browser is not secure #18

Open mpl opened 4 years ago

mpl commented 4 years ago

I'm getting an error during login to the google account, stating that the app is not secured. I'm hoping updating chromedp might help with that. And we'll have to do it anyway to keep up with chrome changes. However, we should not update to the latest version yet because: https://github.com/chromedp/chromedp/issues/627 And indeed I did hit that problem with 81.0.4044.138 here.

mpl commented 4 years ago

Problem persists with:

github.com/chromedp/cdproto v0.0.0-20200209033844-7e00b02ea7d2 github.com/chromedp/chromedp v0.5.4-0.20200417165948-9fff3ea3e94b

mpl commented 4 years ago

Setting up an App Password (https://support.google.com/accounts/answer/185833) did not help either. And in hindsight, not surprising, since I get the error as soon as I enter the username, even before entering the password.

mpl commented 4 years ago

Using this trick: https://github.com/perkeep/gphotos-cdp/issues/1#issuecomment-567378082 worked for me. We should automate "stealing cookies" from the currently running chrome session. But until we figure out which part to steal exactly, I think I'll just add a flag to "initialize" a profile dir like the trick above does, as a quick fix for anyone who encounters this problem.

mpl commented 4 years ago

fwiw, just copying Default/Cookies into $TMPDIR/gphotos-cdp/Default/Cookies does not seem to be enough.

mpl commented 4 years ago

I have an up to date branch that was doing the trick a couple of weeks ago, but which is now obsolete for some reason. I'm giving up for now, since Google seems to have fixed some things on their end and I can now sign in again directly from chromedp, and I can therefore go back to fixing other bugs.

vibhoothi commented 3 years ago

I am having the same issue,

Couldn't sign you in
This browser or app may not be secure. Learn more
Try using a different browser. If you’re already using a supported browser, you can refresh your screen and try again to sign in.

I am on 53afb72ae12955edaac20533d9fcfda12b630336

mpl commented 3 years ago

@vibhoothiiaanand have you tried https://github.com/perkeep/gphotos-cdp/issues/1#issuecomment-567378082 ?