krille-chan / fluffychat

The cutest instant messenger in the [matrix]
https://fluffychat.im/
GNU Affero General Public License v3.0
907 stars 153 forks source link

Flatpak. "Your session is lost" "LateInitializationError: Field '_collection@981351407' has not been initialized" #914

Closed fadelkon closed 3 months ago

fadelkon commented 4 months ago

Bug Description

When I opened the app today I read 2 notifications telling me that my "session is lost". The app may have crashed yesterday due to my system running out of RAM. I'm not sure. Something is bad.

I have tried to flatpak uninstalland install again and it didn't fix the issue. I'm afraid I will need to clean some kind of cache.

Steps to Reproduce

  1. run /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=fluffychat --file-forwarding im.fluffychat.Fluffychat
  2. see the error messages.
  3. try to log-in
  4. see the same error mesages appear at the console

Expected Behavior

Not crashing! Or at least, recover it. Give me some instructions on how to clean the environment, or the option. Now the app is not usable.

App Version

1.18.0

Additional Platform Information

Debian 12. Flatpak 1.14.4

Additional Context

Gtk-Message: 21:16:52.562: Failed to load module "canberra-gtk-module"
flutter: [Matrix] Welcome to FluffyChat <3
flutter: [Matrix] !!!CRITICAL!!! Client initialization failed - LateInitializationError: Field '_collection@981351407' has not been initialized.
#0      MatrixSdkDatabase.delete (package:matrix/src/database/matrix_sdk_database.dart)
#1      flutterMatrixSdkDatabaseBuilder (package:fluffychat/utils/matrix_sdk_extensions/flutter_matrix_sdk_database_builder.dart:28)
<asynchronous suspension>
#2      Client.init.<anonymous closure> (package:matrix/src/client.dart:1494)
<asynchronous suspension>
#3      Client.init (package:matrix/src/client.dart:1492)
<asynchronous suspension>
#4      InitWithRestoreExtension.initWithRestore (package:fluffychat/utils/init_with_restore.dart:72)
<asynchronous suspension>
#5      Future.wait.<anonymous closure> (dart:async/future.dart:518)
<asynchronous suspension>
#6      ClientManager.getClients (package:fluffychat/utils/client_manager.dart:48)
<asynchronous suspension>
#7      main (package:fluffychat/main.dart:26)
<asynchronous suspension>

flutter: [Matrix] Unable to initialize client - LateInitializationError: Field '_collection@981351407' has not been initialized.
#0      Client.init (package:matrix/src/client.dart:1626)
<asynchronous suspension>
#1      InitWithRestoreExtension.initWithRestore (package:fluffychat/utils/init_with_restore.dart:72)
<asynchronous suspension>
#2      Future.wait.<anonymous closure> (dart:async/future.dart:518)
<asynchronous suspension>
#3      ClientManager.getClients (package:fluffychat/utils/client_manager.dart:48)
<asynchronous suspension>
#4      main (package:fluffychat/main.dart:26)
<asynchronous suspension>
krille-chan commented 4 months ago

No idea how to clean the environment when talking about flatpak. For snap it is just snap remove fluffychat --purge or delete the FluffyChat directory in the snap home directory

fadelkon commented 3 months ago

Somehow it solved itself. I tried with flatpak uninstall but after installing fluffychat again, it was still crashing... I'm sorry not to be able to reproduce the error anymore nor explain how it healed. I doubt really had to input again the credentials, I think I didn't Well, it's working now, sorry for the nuissance!