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

It is not possible to synchronize with Google Drive #332

Open
feelan03 opened this issue Oct 22, 2022 · 27 comments
Open

It is not possible to synchronize with Google Drive #332

feelan03 opened this issue Oct 22, 2022 · 27 comments

Comments

@feelan03
Copy link

feelan03 commented Oct 22, 2022

Hello. I have a problem. I was can’t sync with my KDBX file in Google Drive. Can you help me?
telegram-cloud-photo-size-2-5377425949857005572-y

@SaifAqqad
Copy link

I have this issue as well 😔

Screenshot_2022-10-22-19-06-28-461_org.mozilla.firefox.jpg

@cjtexas
Copy link

cjtexas commented Nov 3, 2022

Bump! Same here, thanks in advance for addressing this issue 😄

@Derisis13
Copy link

Same is happening to me on linux. Application source is flathub, version is 1.9.6_1904

@juliobm
Copy link

juliobm commented Nov 5, 2022

Same in iOS 16.1

@miguelmenendez
Copy link

Same here.

@feelan03
Copy link
Author

Bump!

@KaYBlitZ
Copy link

KaYBlitZ commented Dec 18, 2022

The problem seems to be that the client id is null? This line here: https://github.com/authpass/authpass/blob/main/authpass/lib/cloud_storage/google_drive/google_drive_provider.dart#L38

Screenshot 2022-12-17 at 10 27 23 PM

Stacktrace:

I/flutter (14801): 2022-12-17 22:24:06.432332 SEVERE cloud_storage_ui_auth - Error while authenticating.
I/flutter (14801): ### _CastError: Null check operator used on a null value
I/flutter (14801): #0      GoogleDriveProvider._clientId (package:authpass/cloud_storage/google_drive/google_drive_provider.dart:38:43)
I/flutter (14801): #1      GoogleDriveProvider.clientFromAuthenticationFlow (package:authpass/cloud_storage/google_drive/google_drive_provider.dart:47:7)
I/flutter (14801): #2      CloudStorageProviderClientBase.startAuth (package:authpass/cloud_storage/cloud_storage_provider.dart:321:21)
I/flutter (14801): #3      CloudStorageAuthentication._startLoginFlow (package:authpass/cloud_storage/cloud_storage_ui_auth.dart:87:36)
I/flutter (14801): #4      CloudStorageAuthentication.build.<anonymous closure> (package:authpass/cloud_storage/cloud_storage_ui_auth.dart:39:21)
I/flutter (14801): #5      _InkResponseState.handleTap (package:flutter/src/material/ink_well.dart:1072:21)
I/flutter (14801): #6      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:253:24)
I/flutter (14801): #7      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:627

Looks like it's because I am testing locally using env/development.dart. I don't have access to production.dart.gpg. Is the current app in the Google Play store compiled with the wrong environment? Because the same error exists in production. The secrets have null values.

@hgohel
Copy link
Contributor

hgohel commented Dec 19, 2022

@hpoul Adding a +1 to this thread. This bug preventsAuthPass users who store their KDBX files on Google Drive from being able to access it. Happens with the latest version 1.9.7 on iOS (iPad), and 1.9.8 on Windows as well.

@Turux
Copy link

Turux commented Jan 4, 2023

I would like to help fixing this issue.
I am happy to dedicate time for either testing or contributing to the source code.

Authpass is great and loosing its integration with Google would completely break my workflow!

hpoul added a commit that referenced this issue Jan 4, 2023
@hpoul
Copy link
Collaborator

hpoul commented Jan 4, 2023

I've now added a redirect_uri, it should fix the problem on the play store and apple store version. Maybe somebody can give it a try by adding joining the beta testing on google play https://play.google.com/apps/testing/design.codeux.authpass or on apples testflight https://testflight.apple.com/join/3CC54i3V .. make sure it's version 1.9.9+1948 (or later) on android or 1.9.9+1949 on testflight
@Turux @hgohel

@SaifAqqad
Copy link

I've now added a redirect_uri, it should fix the problem on the play store and apple store version. Maybe somebody can give it a try by adding joining the beta testing on google play https://play.google.com/apps/testing/design.codeux.authpass or on apples testflight https://testflight.apple.com/join/3CC54i3V .. make sure it's version 1.9.9+1948 (or later) on android or 1.9.9+1949 on testflight @Turux @hgohel

Works like a charm, thank you :D

@Turux
Copy link

Turux commented Jan 5, 2023

I've now added a redirect_uri, it should fix the problem on the play store and apple store version. Maybe somebody can give it a try by adding joining the beta testing on google play https://play.google.com/apps/testing/design.codeux.authpass or on apples testflight https://testflight.apple.com/join/3CC54i3V .. make sure it's version 1.9.9+1948 (or later) on android or 1.9.9+1949 on testflight
@Turux @hgohel

Just tested it on Android and it works just fine! Thanks so much!
I will see if I can test it on iOS and give you an update ASAP

@hgohel
Copy link
Contributor

hgohel commented Jan 5, 2023

@hpoul Thanks for the fix! Confirming that Android is fixed, but I can't sign up for Apple test flight (I used to be on the beta earlier). I get the message "This beta isn't accepting any new testers right now."

Will a Windows build follow? Thanks again.

@Turux
Copy link

Turux commented Jan 7, 2023

@hpoul I have noticed that on Android the beta version (1.9.9+1948) OAuth seems to expire after a few hours.
The app throws an error, but until logging out from Google and logging back in, it will continue using the local copy of the db.
Not sure if you were aware of this...

@agilisone
Copy link

agilisone commented Jan 12, 2023

Hello, I am an avid fan of AuthPass and currently just tried helping my friend create and manage a KeyPass database. Unfortunately, AuthPass is my app of choice when it comes to browsing and he cannot log into Google Drive due to the same issue discussed by the OP.

However, I am using the same version, v1.9.7+1940 and I have no issues with syncing changes that may have been made by KeePass on Windows since I have have previously authenticated and logged into Google prior to Google changing their OAUTH methods.

How can I opt both him and I into the Testflight program for this app so I can help contribute and he can start using AuthPass.

FYI: My Personal GitHub account is new but I have an account on GitHub that I use at work and I am a heavy contributor.

Cheers!

@Turux
Copy link

Turux commented Jan 26, 2023

As an update, here is the error I am experiencing.

Unexpected Error: OAuth2 credentials have expired and can't be refreshed.

This happens on 1.9.9+1948 running on Android 13.
Steps to reproduce:

  1. Open AuthPass
  2. Login with Google and access a kdbx file
  3. Close the app
  4. Wait some time (30 minutes works)
  5. Open AuthPass again
  6. See the error

My main worry is that if the error is dismissed the app will continue working with the local version of the file and not synchronise with Google. Practically creating a fork on the KDBX.

Thanks, and as I mentioned before, I would be very happy to help and support the development, both in coding and testing.

@kissifrot
Copy link

If it's fixed in master, could a release be done?

@sensbo
Copy link

sensbo commented Mar 30, 2023

Still have this described issue with iOS, 16.4

@renemifsud
Copy link

Hi, Is there any way I can help to release this fix?

@Turux
Copy link

Turux commented May 25, 2023

Hi all, I found a workaround that has allowed me to keep using this app and accessing my DB on Google Drive.

In short I've been using the native Google Drive client to keep the DB locally synced on my device and then point Authpass to the local file.
It's simple but it works. Every time the file is edited, the native GDrive client will sync it in the cloud.

I've tested this on Android and it works.

PS: Concurrent editing might be problematic but with an encrypted database it will always be the case.

Update: after more thorough testing I have realised that this works does not work for iOS. Although the app will let you open your DB, it won't sync with Google. It happens to be just a local copy.

@gaetan1903
Copy link

i have same issue in windows with version 1.9.8 and last 1.9.9

@hgohel
Copy link
Contributor

hgohel commented Oct 7, 2023

I've now added a redirect_uri, it should fix the problem on the play store and apple store version.

@hpoul On Windows the originally reported issue still continues even with v1.9.9 1975, and fails on Android with v1.9.9 1975 as well (sent in an error report via the app).

@terala
Copy link

terala commented Nov 19, 2023

This repros in Linux, with version 1.9.9.

@hgohel
Copy link
Contributor

hgohel commented Feb 5, 2024

With v1.9.11_2007 access to password databases stored on Google drive is working again. Thank you, @hpoul!

@Turux
Copy link

Turux commented Feb 5, 2024

I have just tested with version 1.9.11+2007 on Android 14 and I am still experiancing some issues.
The app can successfully sign in and access the kdbx but after closing and reopening the token seems to be lost again as I am getting the following error:
LoadFileException{message: Unable to use google sign in for authenticated client.}
Cloud not test on MacOS as the App Store is still stuck on the previous version.

@hgohel
Copy link
Contributor

hgohel commented Feb 5, 2024

... after closing and reopening the token seems to be lost again as I am getting the following error

True. I didn't see that until I went back into the app. The kdbx remains loaded and I can read passwords in this state, but I am unable to modify the kdbx file.

@Turux
Copy link

Turux commented Feb 5, 2024

The kdbx remains loaded and I can read passwords in this state, but I am unable to modify the kdbx file.

Yes, but at least not being able to modify the file is an improvement from the previous behaviour, where the user was presented with a cached version of the kbdx without being made aware that any edit would not be synced to the cloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests