subdavis / Tusk

🐘 🔒 KeePass-compatible browser extension for filling passwords.
https://subdavis.com/Tusk
Other
475 stars 73 forks source link

After moving db files to G TeamDrives, can't access files at new location #270

Closed ppetershagen closed 5 years ago

ppetershagen commented 5 years ago

Bug report

Hi,

I just moved my 2 keyfile dbs from "My Drive" to 2 different TeamDrive folders. (Tusk 2018.9.27)

Turned off G Drive storage support, deleted cached objects, re-authed, didn't help.

The 2 db files are still connected and displayed in the "Manage Databases" form and the Chrome plugin popup (top right).

Steps to reproduce - current behaviour

When I choose "Manage Database Files" it takes me to the "Manage Databases" form, but I can't delete the connected db files there and choose new one from the G TeamDrive.

My workaround currently is, because I need my passwords, to mount the team drive locally and use the file storage approach.

Is that a issue on my side or a bug in Tusk? How can I reset the file connections and choose new database files in G TeamDrives?

What is the expected behaviour

I expect to be able to remove the connected database files and point to the new location in the G TeamDrive.

Environment

Linux Mint 19, Chrome Version 70.0.3538.77 (Official Build) (64-bit), Google G Suite Business, separate TeamDrives

subdavis commented 5 years ago

Have you tried uninstalling and re-installing tusk?

You could also go to advanced settings and clear all your data.

That will erase your past usage data. If this works, let me know and I can file a bug

If that doesn't work, this issue is 100% Google's fault and we can weep together.

ppetershagen commented 5 years ago

Yes, just re-intstalled it, but still not working... the old db files appear again and I don't need to re-auth with drive... Advanced->Stored Data is empty....

But how can I reset the settings?

ppetershagen commented 5 years ago

Ok, I also tried the "Shared Link" and it doesn't add the URL / does nothing... Dev console shows this exception:

14options.build.js:8 Uncaught ReferenceError: getParameterByName is not defined at Object.drive.google.com (options.build.js:8) at r.processSpecialSources (options.build.js:8) at new r (options.build.js:8) at addLink (options.build.js:8) at e (dll.library.js:118) at HTMLAnchorElement.t._withTask.t._withTask (dll.library.js:118)

subdavis commented 5 years ago

You already reset the settings when you uninstalled it.

This is completely Google's fault. It looks like it hasn't re-indexed your Drive.

Make sure the files are deleted from the recycle bin or trash or whatever Drive calls it

Visit myaccount.google.com/permissions and disable Tusk.

Then disable and re-enable Google Drive. If this doesn't work, you may just have to wait a few days for Google to un-screw it's indexing.

subdavis commented 5 years ago

Shared links don't work with Tusk, which is why the description doesn't include Google Drive in the list of supported providers.

This is also Google's fault. As a developer, supporting Google Drive has been a nightmare.

I'm sorry for the trouble, and thanks for opening this issue. I hope we can figure something out.

ppetershagen commented 5 years ago

I personally feel it has to do with the separation of the different profiles in Chrome... I use one profile for private and one for business purposes. I just noticed, that the two db files, which pop up, are from my private profile. They shouldn't appear in my business profile at all.

Unfortunately, removing Tusk from all profiles and closing Chrome, didn't help.

To clarify: private -> @gmail.com , business -> @business-domain.com

subdavis commented 5 years ago

Then as with #64 #126 #133 we find ourselves in the "Chrome won't release the API we need" boat.

https://developer.chrome.com/apps/identity#method-getAccounts wouldn't even help.

identity.getAuthToken allows extensions to specify the account ID they would like to request a token for, which would be PERFECT for users with multiple profiles and solve your issue completely.

EXCEPT that, in a cruel twist of fate, chrome gives the user no API for discovering what the current profile ID is. They allow you to get the "primary" profile, which returns the primary profile ID if that profile is active, and otherwise it returns nothing.

They allow you to list all profiles on the dev channel, but won't tell you which one the active profile is.

HOWEVER

I've never noticed the event at the bottom of the identity page before

It looks like chrome fires an event when the active profile changes, which I could listen to in the background and save in local storage.

TL;DR

This may be fixable after all. So many people have had trouble with this, and nobody has ever mentioned onSignInChanged. Sigh

subdavis commented 5 years ago

@ppetershagen and anyone else still having trouble: see https://github.com/subdavis/Tusk/wiki/Troubleshooting#google-drive-constant-reauthorization

Closing this as duplicate of #133