Apparently authenticating Google Drive only works on Chromium-based browsers. I use Firefox for everything, but I kept running into an error when I went through the OAuth flow for Google Drive. After selecting the account I wanted to sign in with, I was presented with this screen:
"Sorry, something went wrong."
Nothing I tried worked, even in a private browser window. This happened on both a custom client ID and Rclone's default ID. That is, until I tried it in Chrome, and it worked fine the first try.
Figured I'd post what happened and how I solved it in case other people run into this issue in the future.
2024/08/09 14:14:34 DEBUG : Redirecting browser to: https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=785613615624-ttpuf5vbc1mori5a1q0ff9c72bi9tcma.apps.googleusercontent.com&redirect_uri=http%3A%2F%2F127.0.0.1%3A53682%2F&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=BLSg9fpzi1Hmb4ir73mCXQ
2024/08/09 14:15:12 DEBUG : Received GET request on auth server to "/"
2024/08/09 14:15:12 NOTICE: Got code
Maybe you have some ads or java script blockers? I have never used Chrome (do not even have it installed). Many Google Drive authentications I did either using Firefox or Safari. Both default and custom client-ids. Countless experiments and tests. Never had slightest issue because of browser I use.
I dunno what to tell you guys. I just tried it on a different computer, different operating system (MacOS instead of Windows), and different network with all extensions turned off, and it still didn't work on Firefox. But Chromium worked fine!
Hahaha. I can’t comment. I never used Chrome. All works with Firefox. On macOS, Linux and Windows. No difference.
For sure there is some reason of your issues. But if you can fix it with Chrome then maybe no point to waste time for deeper investigation. Authorising rclone remotes is really one off task.