authpass
authpass copied to clipboard
Windows 11: MissingPluginException google_sign_in
Describe the bug After the update to 1.9.11 on Windows it is not possible to log in to google drive anymore.
To Reproduce Steps to reproduce the behavior:
- Click
Load file from
- Select
Google Drive
- See error
Expected behavior Being able to login via Google
Screenshots
Desktop (please complete the following information):
- OS: Windows 11 Home; Version 10.0.22631
- Version: 1.9.11
Additional context
2024-02-04 14:00:09.192346 FINER future_task_state_mixin - Running task Datei wird geladen …
2024-02-04 14:00:09.194309 INFO future_task_state_mixin - Initialized task with Datei wird geladen …
2024-02-04 14:00:09.196840 FINER file_source_cloud_storage - loading {type: FileSourceCloudStorage, uuid: 626a1827-eee6-4873-b2ae-35aa7e4bc112, databaseName: , displayPath: keepass.kdbx}
2024-02-04 14:00:09.196840 FINE authpass.google_drive_bloc - Getting authenticated client from googleSignIn
2024-02-04 14:00:09.196840 SEVERE file_source_cloud_storage - Error while loading file from provider {type: FileSourceCloudStorage, uuid: 626-XXXXXXXXXXXXXXXXXXXX-112, databaseName: , displayPath: keepass.kdbx}
### LoadFileException: LoadFileException{message: Unable to use google sign in for authenticated client.}
#0 GoogleDriveProvider.requireAuthenticatedClient (package:authpass/cloud_storage/google_drive/google_drive_provider.dart:234)
<asynchronous suspension>
#1 GoogleDriveProvider.loadEntity (package:authpass/cloud_storage/google_drive/google_drive_provider.dart:127)
<asynchronous suspension>
#2 FileSourceCloudStorage.load (package:authpass/bloc/kdbx/file_source_cloud_storage.dart:110)
<asynchronous suspension>
#3 FileSource.content (package:authpass/bloc/kdbx/file_source.dart:85)
<asynchronous suspension>
#4 Stream.last.<anonymous closure> (dart:async/stream.dart:1607)
<asynchronous suspension>
2024-02-04 14:00:09.196840 FINE authpass.select_file_screen - Error while trying to load file source {type: FileSourceCloudStorage, uuid: 626-XXXXXXXXXXXXXXXXXXXX-112, databaseName: , displayPath: keepass.kdbx}
2024-02-04 14:00:09.196840 FINEST main - didPush
2024-02-04 14:00:09.196840 FINER analytics - (ga) screen(/dialog/alert/error)
2024-02-04 14:00:09.196840 WARNING authpass.dialog_utils - We already show an error dialog. do NOT show another one right away.
title Error while Datei wird geladen …
content:LoadFileException{message: Unable to use google sign in for authenticated client.}
2024-02-04 14:00:09.196840 FINE future_task_state_mixin - Task Datei wird geladen … completed. 0 queued tasks remaining.
2024-02-04 14:00:09.196840 SHOUT main - Unhandled error in app.
### LoadFileException: LoadFileException{message: Unable to use google sign in for authenticated client.}
#0 GoogleDriveProvider.requireAuthenticatedClient (package:authpass/cloud_storage/google_drive/google_drive_provider.dart:234)
<asynchronous suspension>
#1 GoogleDriveProvider.loadEntity (package:authpass/cloud_storage/google_drive/google_drive_provider.dart:127)
<asynchronous suspension>
#2 FileSourceCloudStorage.load (package:authpass/bloc/kdbx/file_source_cloud_storage.dart:110)
<asynchronous suspension>
#3 FileSource.content (package:authpass/bloc/kdbx/file_source.dart:85)
<asynchronous suspension>
#4 Stream.last.<anonymous closure> (dart:async/stream.dart:1607)
<asynchronous suspension>
2024-02-04 14:00:09.196840 WARNING authpass.dialog_utils - We already show an error dialog. do NOT show another one right away.
title null
content:Unerwarteter Fehler: LoadFileException{message: Unable to use google sign in for authenticated client.}
2024-02-04 14:00:09.196840 SHOUT main - Unhandled error in app.
### LoadFileException: LoadFileException{message: Unable to use google sign in for authenticated client.}
#0 GoogleDriveProvider.requireAuthenticatedClient (package:authpass/cloud_storage/google_drive/google_drive_provider.dart:234)
<asynchronous suspension>
#1 GoogleDriveProvider.loadEntity (package:authpass/cloud_storage/google_drive/google_drive_provider.dart:127)
<asynchronous suspension>
#2 FileSourceCloudStorage.load (package:authpass/bloc/kdbx/file_source_cloud_storage.dart:110)
<asynchronous suspension>
#3 FileSource.content (package:authpass/bloc/kdbx/file_source.dart:85)
<asynchronous suspension>
#4 Stream.last.<anonymous closure> (dart:async/stream.dart:1607)
<asynchronous suspension>
2024-02-04 14:00:09.196840 WARNING authpass.dialog_utils - We already show an error dialog. do NOT show another one right away.
title null
content:Unerwarteter Fehler: LoadFileException{message: Unable to use google sign in for authenticated client.}
2024-02-04 14:00:17.306219 FINER analytics - (ga) screen(/selectFile)
2024-02-04 14:00:18.571698 FINEST main - didPush
2024-02-04 14:00:18.571698 FINER analytics - (ga) screen(_PopupMenuRoute<Object?>)
2024-02-04 14:00:20.323128 FINER analytics - (ga) screen(/selectFile)
2024-02-04 14:00:20.324424 FINEST main - didPush
2024-02-04 14:00:20.324424 FINER analytics - (ga) screen(/cloudStorage/selector/GoogleDriveProvider)
2024-02-04 14:00:20.341331 SHOUT main - Unhandled error in app.
### MissingPluginException: MissingPluginException(No implementation found for method init on channel plugins.flutter.io/google_sign_in)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:320)
<asynchronous suspension>
#1 GoogleSignIn._doInitialization (package:google_sign_in/google_sign_in.dart:313)
<asynchronous suspension>
#2 GoogleSignIn.isSignedIn (package:google_sign_in/google_sign_in.dart:414)
<asynchronous suspension>
#3 GoogleDriveProvider.loadSavedAuth (package:authpass/cloud_storage/google_drive/google_drive_provider.dart:213)
<asynchronous suspension>
#4 _CloudStorageSelectorState.initState.<anonymous closure> (package:authpass/cloud_storage/cloud_storage_ui.dart:53)
<asynchronous suspension>
Unfortunately the previous way to sign in to google drive was deprecated last year: https://developers.google.com/identity/protocols/oauth2/resources/oob-migration so I've migrated to google_sign_in
which does not support windows or linux right now.
I would suggestion just syncing your google drive files locally and accessing it through the file system.
If somebody is interested in implementing it, I'd be happy to assist.. Unfortunately I don't have access to a windows/linux system right now.
@hpoul thank you for your quick response. That oob-migration has killed a few tools by now 🗡️ .
I have just taken a small look at the problem and i think we could solve this by using https://pub.dev/packages/flutter_web_auth_2 in a custom google_sign_in platform interface implementation.
Ok if tested it and this indeed works. When i have more time i will make a clean implementation and make a pull request