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

Multi account breaks when another instance of fluffychat launches #301

Closed
krille-chan opened this issue Jul 15, 2023 · 2 comments
Closed
Labels
stale The item is going to be closed soon because of inactivity

Comments

@krille-chan
Copy link
Owner

Description

Fluffychat can be launched again if it is already running. It will then present the login screen as if there were no accounts available.

When this is done and the multi account feature is in use, then all secondary accounts will be removed and are lost on the next launch.

To Reproduce

  1. Install Fluffychat Desktop (in my case via Flathub & build from source, see below for Device details)
  2. Log in with an account.
  3. Log in with a second account through the Beta feature in "Settings -> Accounts".
  4. Verify that the secondary account has been logged in successfully by clicking the avatar in the top left.
  5. Leave the window open and launch Fluffychat again.
  6. Close both windows.
  7. Launch Fluffychat again and observe that the secondary account has been removed.

Additional information:

Tested on two devices

Device A

  • Device: Pinephone Beta Edition
  • OS and OS version: PostmarketOS edge (rolling release, up to date at the time of writing)
  • UI: Phosh 0.15.0
  • Installed version of FluffyChat: 1.2.0 (Flathub)

Device B

  • Device: HP Elitebook x360
  • OS and OS version: Manjaro 21.2.2 (x86_64)
  • UI: sway
  • Installed version of FluffyChat: 1.2.0 (built from source)

Logs from Device B (source build)

First instance
flutter: [Matrix] Initialize client FluffyChat linux
flutter: [Matrix] Initialize client FluffyChat-1643462048386
flutter: [Matrix] FluffyBox encryption is not supported on this platform
flutter: [Matrix] FluffyBox encryption is not supported on this platform
flutter: [Matrix] Successfully connected as ■■■■■ with https://matrix.■■■■■.org
flutter: [Matrix] Successfully connected as ■■■■■ with https://matrix.■■■■■.de
Second instance
flutter: [Matrix] Initialize client FluffyChat linux
flutter: [Matrix] Initialize client FluffyChat-1643462048386
flutter: [Matrix] FluffyBox encryption is not supported on this platform
flutter: [Matrix] Unable to open FluffyBox. Delete database and storage key...
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: FileSystemException: lock failed, path = '/home/■■■■■/.local/share/chat.fluffy.fluffychat/fluffybox_fluffychat_linux_bad_keys.lock' (OS Error: Resource temporarily unavailable, errno = 11)
#0      _RandomAccessFile.lock.<anonymous closure> (dart:io/file_impl.dart:1002)
#1      _rootRunUnary (dart:async/zone.dart:1436)
#2      _CustomZone.runUnary (dart:async/zone.dart:1335)
<asynchronous suspension>
#3      StorageBackendVm.initialize (package:fluffybox/src/hive/src/backend/vm/storage_backend_vm.dart:82)
<asynchronous suspension>
#4      HiveImpl._openBox (package:fluffybox/src/hive/src/hive_impl.dart:111)
<asynchronous suspension>
#5      HiveImpl.openBox (package:fluffybox/src/hive/src/hive_impl.dart:139)
<asynchronous suspension>
#6      BoxCollection.open (package:fluffybox/src/native.dart:34)
<asynchronous suspension>
#7      FluffyBoxDatabase.open (package:matrix/src/database/fluffybox_database.dart:126)
<asynchronous suspension>
#8      FlutterFluffyBoxDatabase.databaseBuilder (package:fluffychat/utils/matrix_sdk_extensions.dart/fluffybox_database.dart:70)
<asynchronous suspension>
#9      Client.init.<anonymous closure> (package:matrix/src/client.dart:1012)
<asynchronous suspension>
#10     Client.init (package:matrix/src/client.dart:1010)
<asynchronous suspension>
#11     Future.wait.<anonymous closure> (dart:async/future.dart)
<asynchronous suspension>
#12     ClientManager.getClients (package:fluffychat/utils/client_manager.dart:40)
<asynchronous suspension>
#13     main (package:fluffychat/main.dart:41)
<asynchronous suspension>

flutter: [Matrix] Initialization failed - LateInitializationError: Field '_collection@2217491656' has not been initialized.
#0      FluffyBoxDatabase.clear (package:matrix/src/database/fluffybox_database.dart)
#1      FlutterFluffyBoxDatabase.databaseBuilder (package:fluffychat/utils/matrix_sdk_extensions.dart/fluffybox_database.dart:75)
<asynchronous suspension>
#2      Client.init.<anonymous closure> (package:matrix/src/client.dart:1012)
<asynchronous suspension>
#3      Client.init (package:matrix/src/client.dart:1010)
<asynchronous suspension>
#4      Future.wait.<anonymous closure> (dart:async/future.dart)
<asynchronous suspension>
#5      ClientManager.getClients (package:fluffychat/utils/client_manager.dart:40)
<asynchronous suspension>
#6      main (package:fluffychat/main.dart:41)
<asynchronous suspension>

flutter: [Matrix] Logout failed - Null check operator used on a null value
#0      Api.logout (package:matrix_api_lite/src/generated/api.dart:1595)
#1      Client.logout (package:matrix/src/client.dart:502)
#2      Client.init (package:matrix/src/client.dart:1127)
<asynchronous suspension>
#3      Future.wait.<anonymous closure> (dart:async/future.dart)
<asynchronous suspension>
#4      ClientManager.getClients (package:fluffychat/utils/client_manager.dart:40)
<asynchronous suspension>
#5      main (package:fluffychat/main.dart:41)
<asynchronous suspension>

flutter: [Matrix] Unable to initialize client - LateInitializationError: Field '_collection@2217491656' has not been initialized.
#0      FluffyBoxDatabase.clear (package:matrix/src/database/fluffybox_database.dart)
#1      FlutterFluffyBoxDatabase.databaseBuilder (package:fluffychat/utils/matrix_sdk_extensions.dart/fluffybox_database.dart:75)
<asynchronous suspension>
#2      Client.init.<anonymous closure> (package:matrix/src/client.dart:1012)
<asynchronous suspension>
#3      Client.init (package:matrix/src/client.dart:1010)
<asynchronous suspension>
#4      Future.wait.<anonymous closure> (dart:async/future.dart)
<asynchronous suspension>
#5      ClientManager.getClients (package:fluffychat/utils/client_manager.dart:40)
<asynchronous suspension>
#6      main (package:fluffychat/main.dart:41)
<asynchronous suspension>

flutter: [Matrix] FluffyBox encryption is not supported on this platform
flutter: [Matrix] Unable to open FluffyBox. Delete database and storage key...
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: FileSystemException: lock failed, path = '/home/■■■■■/.local/share/chat.fluffy.fluffychat/fluffybox_fluffychat-1643462048386_bad_keys.lock' (OS Error: Resource temporarily unavailable, errno = 11)
#0      _RandomAccessFile.lock.<anonymous closure> (dart:io/file_impl.dart:1002)
#1      _rootRunUnary (dart:async/zone.dart:1436)
#2      _CustomZone.runUnary (dart:async/zone.dart:1335)
<asynchronous suspension>
#3      StorageBackendVm.initialize (package:fluffybox/src/hive/src/backend/vm/storage_backend_vm.dart:82)
<asynchronous suspension>
#4      HiveImpl._openBox (package:fluffybox/src/hive/src/hive_impl.dart:111)
<asynchronous suspension>
#5      HiveImpl.openBox (package:fluffybox/src/hive/src/hive_impl.dart:139)
<asynchronous suspension>
#6      BoxCollection.open (package:fluffybox/src/native.dart:34)
<asynchronous suspension>
#7      FluffyBoxDatabase.open (package:matrix/src/database/fluffybox_database.dart:126)
<asynchronous suspension>
#8      FlutterFluffyBoxDatabase.databaseBuilder (package:fluffychat/utils/matrix_sdk_extensions.dart/fluffybox_database.dart:70)
<asynchronous suspension>
#9      Client.init.<anonymous closure> (package:matrix/src/client.dart:1012)
<asynchronous suspension>
#10     Client.init (package:matrix/src/client.dart:1010)
<asynchronous suspension>
#11     Future.wait.<anonymous closure> (dart:async/future.dart)
<asynchronous suspension>
#12     ClientManager.getClients (package:fluffychat/utils/client_manager.dart:40)
<asynchronous suspension>
#13     main (package:fluffychat/main.dart:41)
<asynchronous suspension>

flutter: [Matrix] Initialization failed - LateInitializationError: Field '_collection@2217491656' has not been initialized.
#0      FluffyBoxDatabase.clear (package:matrix/src/database/fluffybox_database.dart)
#1      FlutterFluffyBoxDatabase.databaseBuilder (package:fluffychat/utils/matrix_sdk_extensions.dart/fluffybox_database.dart:75)
<asynchronous suspension>
#2      Client.init.<anonymous closure> (package:matrix/src/client.dart:1012)
<asynchronous suspension>
#3      Client.init (package:matrix/src/client.dart:1010)
<asynchronous suspension>
#4      Future.wait.<anonymous closure> (dart:async/future.dart)
<asynchronous suspension>
#5      ClientManager.getClients (package:fluffychat/utils/client_manager.dart:40)
<asynchronous suspension>
#6      main (package:fluffychat/main.dart:41)
<asynchronous suspension>

flutter: [Matrix] Logout failed - Null check operator used on a null value
#0      Api.logout (package:matrix_api_lite/src/generated/api.dart:1595)
#1      Client.logout (package:matrix/src/client.dart:502)
#2      Client.init (package:matrix/src/client.dart:1127)
<asynchronous suspension>
#3      Future.wait.<anonymous closure> (dart:async/future.dart)
<asynchronous suspension>
#4      ClientManager.getClients (package:fluffychat/utils/client_manager.dart:40)
<asynchronous suspension>
#5      main (package:fluffychat/main.dart:41)
<asynchronous suspension>

flutter: [Matrix] Unable to initialize client - LateInitializationError: Field '_collection@2217491656' has not been initialized.
#0      FluffyBoxDatabase.clear (package:matrix/src/database/fluffybox_database.dart)
#1      FlutterFluffyBoxDatabase.databaseBuilder (package:fluffychat/utils/matrix_sdk_extensions.dart/fluffybox_database.dart:75)
<asynchronous suspension>
#2      Client.init.<anonymous closure> (package:matrix/src/client.dart:1012)
<asynchronous suspension>
#3      Client.init (package:matrix/src/client.dart:1010)
<asynchronous suspension>
#4      Future.wait.<anonymous closure> (dart:async/future.dart)
<asynchronous suspension>
#5      ClientManager.getClients (package:fluffychat/utils/client_manager.dart:40)
<asynchronous suspension>
#6      main (package:fluffychat/main.dart:41)
<asynchronous suspension>

flutter: [Matrix] Multi account is enabled but client null is not logged in. Removing...
flutter: [Matrix] Multi account is enabled but client null is not logged in. Removing...
Third instance (after closing first and second)
flutter: [Matrix] Initialize client FluffyChat linux
flutter: [Matrix] FluffyBox encryption is not supported on this platform
flutter: [Matrix] Successfully connected as ■■■■■ with https://matrix.■■■■■.org
Copy link

github-actions bot commented Mar 5, 2024

This issue is stale because it has been open for 120 days with no activity.

@github-actions github-actions bot added the stale The item is going to be closed soon because of inactivity label Mar 5, 2024
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale The item is going to be closed soon because of inactivity
Projects
None yet
Development

No branches or pull requests

1 participant