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

Google drive authentication #1562

Open
1 task
matjaz79 opened this issue Mar 14, 2024 · 18 comments
Open
1 task

Google drive authentication #1562

matjaz79 opened this issue Mar 14, 2024 · 18 comments

Comments

@matjaz79
Copy link

Which version of floccus are you using?

5.0.10

Sync method

Google Drive

Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.

chromium

Which version of Nextcloud Bookmarks are you using? (if relevant)

No response

Which version of Nextcloud? (if relevant)

No response

What kind of WebDAV server are you using? (if relevant)

No response

Describe the Bug

You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy for keeping apps secure.

You can let the app developer know that this app doesn't comply with one or more Google validation rules.
Preberite več o tej napaki.
Če ste razvijalec storitve floccus bookmark sync, si oglejte podrobnosti o napaki.
Napaka 400: invalid_request

Expected Behavior

authenticate to google drive for bookmark save

To Reproduce

new profile - google drive

Debug log provided

  • I have provided a debug log file
@matjaz79 matjaz79 added the bug label Mar 14, 2024
Copy link

Hello 👋

Thank you for taking the time to open this issue with floccus. I know it's frustrating when software
causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at
and if possible solved.
I'm Marcel and I created floccus and have been maintaining it ever since.
I currently work for Nextcloud which leaves me with less time for side projects like this one
than I used to have.
I still try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it.
Until then, please be patient.
Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation
to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can
collaborate to make this software better. For everyone.
Thus, if you can, you could also have a look at other issues to see whether you can help other people with your knowledge
and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and
try to fix the odd bug yourself. Everyone will be thankful for extra helping hands!
One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum,
to twitter or somewhere else. But this is a technical issue tracker, so please make sure to
focus on the tech and keep your opinions to yourself.

I look forward to working with you on this issue
Cheers 💙

@marcelklehr
Copy link
Member

marcelklehr commented Mar 17, 2024

I cannot reproduce this, sorry. Can you try again, do you have other details that I could try to reproduce?

@KolyaKorruptis
Copy link

I had the same problem on ungoogled chromium. I managed to sign in eventually by exporting my floccus profile from a working browser and then importing it on chromium, as described here #1267 (comment)
I'm still having problems to sync, but that might be unrelated.

@marcelklehr marcelklehr moved this to Triaging in Floccus May 19, 2024
@marcelklehr marcelklehr mentioned this issue Jul 7, 2024
1 task
@marcelklehr
Copy link
Member

Sometimes Google refuses to sign people in using floccus, but I don't know why, I haven't been able to reproduce this so far.

@seriousfreezing
Copy link

I'm experiencing the same error

@KolyaKorruptis
Copy link

Sometimes Google refuses to sign people in using floccus, but I don't know why, I haven't been able to reproduce this so far.

It might be related to using a VPN that google considers a potential bot address and requires extra login steps (captcha).

@lazymonkey2
Copy link

lazymonkey2 commented Aug 23, 2024

happening to me too with floccus app v5.2.5 on samsung S23 running android 14 (and chrome browser).

after I select the google account to be used and I confirm to continue the app returns to previous page (login with google) without showing any error (please consider adding at least an error message).

I have also tried importing a profile from browser, and at first it seems to be good, but on sync I get this error:
E018: couldn't authenticate with the server.

the log is useless:

2024-08-23T09:34:04.390Z Starting sync process for account mio
2024-08-23T09:34:04.397Z onSyncStart: begin
2024-08-23T09:34:04.472Z onSyncFail
2024-08-23T09:34:04.473Z Syncing failed with E018: Couldn't authenticate with the server.
2024-08-23T09:34:04.479Z onSyncFail

@marcelklehr
Copy link
Member

please consider adding at least an error message

I'll see if I Google provides a more detailed error message on what exactly is failing

@marcelklehr
Copy link
Member

In the meantime, I checked the Google API console: The error rate for floccus is currently hovering at around 0.1% from 60000 requests per hour, so this is not a very widespread phenomenon, I would say. Perhaps this is a form of censorship? May I ask which countries you reside in?

@KolyaKorruptis
Copy link

Same country as you.

@marcelklehr
Copy link
Member

huh

@marcelklehr
Copy link
Member

marcelklehr commented Aug 26, 2024

On Ungoogled Chromium this issue is expected as Google does not recognize the redirect URL that they use ( 🙈 )

@marcelklehr
Copy link
Member

In the latest release the exact error should be logged

@marcelklehr
Copy link
Member

Can you please post a log of an unsuccessful sync attempt here?

@stutopp
Copy link

stutopp commented Dec 31, 2024

@marcelklehr I am experiencing an auth error as well.
Logs attached and below:

2024-12-31T13:34:19.269Z Starting sync process for account srt
2024-12-31T13:34:19.271Z onSyncStart: begin
2024-12-31T13:34:19.429Z onSyncFail
2024-12-31T13:34:19.429Z Syncing failed with E018: Couldn't authenticate with the server.
2024-12-31T13:34:19.430Z onSyncFail

I am using floccus 5.4.0 with Chrome 131.0.6778.205 and Firefox 133.0.3 on Windows 10 Pro 10.0.19045. I am authenticating to a Google Workspace enterprise account and can successfully authenticate/re-authenticate to the account across multiple Chrome profiles and in Firefox. I have a hundred or so bookmarks. I set up the account and had no sync issues while connected to a US Mullvad server. I tried to set it up again today without the VPN (still US-based) and experienced the same error--can authenticate to the Google account but get the E018 error.

I am pretty available the next few weeks to troubleshoot with you. I am a domain admin and superadmin so I can pull any logs you need from the Workspace.

@marcelklehr
Copy link
Member

Hello @stutopp

Can you try debugging the network request to google for authentication to see what exactly google returns (possibly a reason for the failure)?

Firefox

  • Go to about:debugging
  • go to "This firefox"
  • click on Inspect button next to floccus entry
  • go to the network tab in the inspector
  • trigger a sync by clicking on sync now for the account of your choice.
  • check the failing network requests

Chrome

  • Go to chrome://extensions
  • enable Developer mode
  • click on dist/html/background.html button in floccus' entry next to "Inspect views: "
  • go to the network tab in the inspector window
  • trigger a sync by clicking on sync now for the account of your choice
  • check the failing network requests

@stutopp
Copy link

stutopp commented Jan 5, 2025

@marcelklehr I was able to find the exact API error and identified a fix. The error was that the Workspace did not have "Allow third-party apps for Drive files" enabled. In my case, it was disabled in a resent configuration update, so the timing checks out. The relevant response is below (with headers removed for brevity).

"response": {
  "status": 403,
  "statusText": "",
  "httpVersion": "http/2.0",
  "headers": [
    <deleted>
   ],
  "cookies": [],
  "content": {
	"size": 281,
	"mimeType": "application/json",
	"text": "{\n  
		\"error\": {\n    
			\"code\": 403,\n    
			\"message\": \"The domain administrators have disabled Drive apps.\",\n    
			\"errors\": [\n {\n        
				\"message\": \"The domain administrators have disabled Drive apps.\",\n        
				\"domain\": \"global\",\n        
				\"reason\": \"domainPolicy\"\n      
				}\n ]\n  
		}\n
	}\n"
  },
  "redirectURL": "",
  "headersSize": -1,
  "bodySize": -1,
  "_transferSize": 420,
  "_error": null,
  "_fetchedViaServiceWorker": false
},

@marcelklehr
Copy link
Member

I'm glad we were able to figure it out, I've added a log statement to the code to make the response in this case easier to find in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Triaging
Development

No branches or pull requests

6 participants