krille-chan / fluffychat

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

error in init - unable to build the sqlite database #1073

Open git-girl opened 7 months ago

git-girl commented 7 months ago

Bug Description

first of all thx so much for putting in all this work for this cute app! this is a pretty sparse issue description without trying to troubleshoot a lot on my part. definitly can do that though and try investigating this properly

On startup we get a notification saying "An error occured while inti the app": "Unable to build the SQLite database. The app tries to use the legacy database for now. Please report [...]. The error message is: Null check operator used on a null value

this started only with the new package version. i did used to have a patch that patched 1.14 to 1.16, but i am on 1.19 now.

starting from the terminal this gets printed to stdout/stderr. i redacted the libsecret_errors for one hex contained one of my devices hostname.

log ```log flutter: [Matrix] Welcome to FluffyChat <3 ** (fluffychat:1013662): WARNING **: 10:22:17.102: Unable to retrieve framework response: Message is not valid JSON ** (fluffychat:1013662): WARNING **: 10:22:17.105: libsecret_error: [REDACTED] flutter: [Matrix] Unable to init database encryption - FormatException: Unexpected extension byte (at offset 2) #0 _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1741) #1 Utf8Decoder.convert (dart:convert/utf.dart:349) #2 StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:502) #3 StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:477) #4 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:647) #5 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334) #6 getDatabaseCipher (package:fluffychat/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_database/cipher.dar t:17) #7 _constructDatabase (package:fluffychat/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_database/builder.d art:57) #8 flutterMatrixSdkDatabaseBuilder (package:fluffychat/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_datab ase/builder.dart:24) #9 Client.init. (package:matrix/src/client.dart:1594) #10 Client.init (package:matrix/src/client.dart:1592) #11 InitWithRestoreExtension.initWithRestore (package:fluffychat/utils/init_with_restore.dart:72) #12 Future.wait. (dart:async/future.dart:518) #13 ClientManager.getClients (package:fluffychat/utils/client_manager.dart:48) #14 main (package:fluffychat/main.dart:26) ** (fluffychat:1013662): WARNING **: 10:22:17.108: libsecret_error: [REDACTED] flutter: [Matrix] Unable to init database encryption - FormatException: Missing extension byte (at offset 1) #0 _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1741) #1 Utf8Decoder.convert (dart:convert/utf.dart:349) #2 StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:502) #3 StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:477) #4 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:647) #5 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334) #6 getDatabaseCipher (package:fluffychat/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_database/cipher.dart:17) #7 _constructDatabase (package:fluffychat/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_database/builder.dart:57) #8 flutterMatrixSdkDatabaseBuilder (package:fluffychat/utils/matrix_sdk_extensions/flutter_matrix_dart_sdk_database/builder.dart:24) #9 Client.init. (package:matrix/src/client.dart:1594) #10 Client.init (package:matrix/src/client.dart:1592) #11 InitWithRestoreExtension.initWithRestore (package:fluffychat/utils/init_with_restore.dart:72) #12 Future.wait. (dart:async/future.dart:518) #13 ClientManager.getClients (package:fluffychat/utils/client_manager.dart:48) #14 main (package:fluffychat/main.dart:26) ** (fluffychat:1013662): WARNING **: 10:22:17.113: libsecret_error: [REDACTED] ** (fluffychat:1013662): WARNING **: 10:22:17.115: libsecret_error: [REDACTED] flutter: [Matrix] Unable to init Hive encryption - FormatException: Unexpected extension byte (at offset 1) #0 _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1741) #1 Utf8Decoder.convert (dart:convert/utf.dart:349) #2 StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:502) #3 StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:477) #4 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:647) #5 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334) #6 FlutterHiveCollectionsDatabase.databaseBuilder (package:fluffychat/utils/matrix_sdk_extensions/flutter_hive_collections_database.dart:37) #7 Client.init. (package:matrix/src/client.dart:1594) #8 Client.init (package:matrix/src/client.dart:1592) #9 InitWithRestoreExtension.initWithRestore (package:fluffychat/utils/init_with_restore.dart:72) #10 Future.wait. (dart:async/future.dart:518) #11 ClientManager.getClients (package:fluffychat/utils/client_manager.dart:48) #12 main (package:fluffychat/main.dart:26) ** (fluffychat:1013662): WARNING **: 10:22:17.118: libsecret_error: [REDACTED] ** (fluffychat:1013662): WARNING **: 10:22:17.120: libsecret_error: [REDACTED] flutter: [Matrix] Unable to init Hive encryption - FormatException: Unexpected extension byte (at offset 1) #0 _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1741) #1 Utf8Decoder.convert (dart:convert/utf.dart:349) #2 StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:502) #3 StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:477) #4 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:647) #5 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334) #6 FlutterHiveCollectionsDatabase.databaseBuilder (package:fluffychat/utils/matrix_sdk_extensions/flutter_hive_collections_database.dart:37) #7 Client.init. (package:matrix/src/client.dart:1594) #8 Client.init (package:matrix/src/client.dart:1592) #9 InitWithRestoreExtension.initWithRestore (package:fluffychat/utils/init_with_restore.dart:72) #10 Future.wait. (dart:async/future.dart:518) #11 ClientManager.getClients (package:fluffychat/utils/client_manager.dart:48) #12 main (package:fluffychat/main.dart:26) ** (fluffychat:1013662): WARNING **: 10:22:17.125: libsecret_error: [REDACTED] ** (fluffychat:1013662): WARNING **: 10:22:17.127: libsecret_error: [REDACTED] ** (fluffychat:1013662): WARNING **: 10:22:17.172: libsecret_error: [REDACTED] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: FormatException: Unexpected extension byte (at offset 0) #0 _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1741) #1 Utf8Decoder.convert (dart:convert/utf.dart:349) #2 StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:502) #3 StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:477) #4 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:647) #5 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334) ** (fluffychat:1013662): WARNING **: 10:22:17.181: libsecret_error: [REDACTED] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: FormatException: Unexpected extension byte (at offset 1) #0 _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1741) #1 Utf8Decoder.convert (dart:convert/utf.dart:349) #2 StandardMessageCodec.readValueOfType (package:flutter/src/services/message_codecs.dart:502) #3 StandardMessageCodec.readValue (package:flutter/src/services/message_codecs.dart:477) #4 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:647) #5 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334) flutter: [Matrix] Set background mode in VOIP plugin - false flutter: dynamic_color: Accent color detected. [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value #0 _isPressed. (package:keyboard_shortcuts/keyboard_shortcuts.dart:51) #1 WhereIterator.moveNext (dart:_internal/iterable.dart:451) #2 _isPressed (package:keyboard_shortcuts/keyboard_shortcuts.dart:55) #3 _KeyBoardShortcuts.listener (package:keyboard_shortcuts/keyboard_shortcuts.dart:135) #4 RawKeyboard.handleRawKeyEvent (package:flutter/src/services/raw_keyboard.dart:875) #5 KeyEventManager.handleRawKeyMessage (package:flutter/src/services/hardware_keyboard.dart:1164) #6 BasicMessageChannel.setMessageHandler. (package:flutter/src/services/platform_channel.dart:235) #7 _DefaultBinaryMessenger.setMessageHandler. (package:flutter/src/services/binding.dart:603) #8 _invoke2 (dart:ui/hooks.dart:344) #9 _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:45) #10 _Channel.push (dart:ui/channel_buffers.dart:135) #11 ChannelBuffers.push (dart:ui/channel_buffers.dart:343) #12 PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:737) #13 _dispatchPlatformMessage (dart:ui/hooks.dart:257) [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value #0 _isPressed. (package:keyboard_shortcuts/keyboard_shortcuts.dart:51) #1 WhereIterator.moveNext (dart:_internal/iterable.dart:451) #2 _isPressed (package:keyboard_shortcuts/keyboard_shortcuts.dart:55) #3 _KeyBoardShortcuts.listener (package:keyboard_shortcuts/keyboard_shortcuts.dart:135) #4 RawKeyboard.handleRawKeyEvent (package:flutter/src/services/raw_keyboard.dart:875) #5 KeyEventManager.handleRawKeyMessage (package:flutter/src/services/hardware_keyboard.dart:1164) #6 BasicMessageChannel.setMessageHandler. (package:flutter/src/services/platform_channel.dart:235) #7 _DefaultBinaryMessenger.setMessageHandler. (package:flutter/src/services/binding.dart:603) #8 _invoke2 (dart:ui/hooks.dart:344) #9 _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:45) #10 _Channel.push (dart:ui/channel_buffers.dart:135) #11 ChannelBuffers.push (dart:ui/channel_buffers.dart:343) #12 PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:737) #13 _dispatchPlatformMessage (dart:ui/hooks.dart:257) [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value #0 _isPressed. (package:keyboard_shortcuts/keyboard_shortcuts.dart:51) #1 WhereIterator.moveNext (dart:_internal/iterable.dart:451) #2 _isPressed (package:keyboard_shortcuts/keyboard_shortcuts.dart:55) #3 _KeyBoardShortcuts.listener (package:keyboard_shortcuts/keyboard_shortcuts.dart:135) #4 RawKeyboard.handleRawKeyEvent (package:flutter/src/services/raw_keyboard.dart:875) #5 KeyEventManager.handleRawKeyMessage (package:flutter/src/services/hardware_keyboard.dart:1164) #6 BasicMessageChannel.setMessageHandler. (package:flutter/src/services/platform_channel.dart:235) #7 _DefaultBinaryMessenger.setMessageHandler. (package:flutter/src/services/binding.dart:603) #8 _invoke2 (dart:ui/hooks.dart:344) #9 _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:45) #10 _Channel.push (dart:ui/channel_buffers.dart:135) #11 ChannelBuffers.push (dart:ui/channel_buffers.dart:343) #12 PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:737) #13 _dispatchPlatformMessage (dart:ui/hooks.dart:257) [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value #0 _isPressed. (package:keyboard_shortcuts/keyboard_shortcuts.dart:51) #1 WhereIterator.moveNext (dart:_internal/iterable.dart:451) #2 _isPressed (package:keyboard_shortcuts/keyboard_shortcuts.dart:55) #3 _KeyBoardShortcuts.listener (package:keyboard_shortcuts/keyboard_shortcuts.dart:135) #4 RawKeyboard.handleRawKeyEvent (package:flutter/src/services/raw_keyboard.dart:875) #5 KeyEventManager.handleRawKeyMessage (package:flutter/src/services/hardware_keyboard.dart:1164) #6 BasicMessageChannel.setMessageHandler. (package:flutter/src/services/platform_channel.dart:235) #7 _DefaultBinaryMessenger.setMessageHandler. (package:flutter/src/services/binding.dart:603) #8 _invoke2 (dart:ui/hooks.dart:344) #9 _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:45) #10 _Channel.push (dart:ui/channel_buffers.dart:135) #11 ChannelBuffers.push (dart:ui/channel_buffers.dart:343) #12 PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:737) #13 _dispatchPlatformMessage (dart:ui/hooks.dart:257) [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value #0 _isPressed. (package:keyboard_shortcuts/keyboard_shortcuts.dart:51) #1 WhereIterator.moveNext (dart:_internal/iterable.dart:451) #2 _isPressed (package:keyboard_shortcuts/keyboard_shortcuts.dart:55) #3 _KeyBoardShortcuts.listener (package:keyboard_shortcuts/keyboard_shortcuts.dart:135) #4 RawKeyboard.handleRawKeyEvent (package:flutter/src/services/raw_keyboard.dart:875) #5 KeyEventManager.handleRawKeyMessage (package:flutter/src/services/hardware_keyboard.dart:1164) #6 BasicMessageChannel.setMessageHandler. (package:flutter/src/services/platform_channel.dart:235) #7 _DefaultBinaryMessenger.setMessageHandler. (package:flutter/src/services/binding.dart:603) #8 _invoke2 (dart:ui/hooks.dart:344) #9 _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:45) #10 _Channel.push (dart:ui/channel_buffers.dart:135) #11 ChannelBuffers.push (dart:ui/channel_buffers.dart:343) #12 PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:737) #13 _dispatchPlatformMessage (dart:ui/hooks.dart:257) flutter: [Matrix] Set background mode in VOIP plugin - false flutter: [Matrix] Loading a list of 250 participants for the room ![REDACTED] This may affect the performance. Please make sure to not unnecessary request so many participants or suppress this warning. flutter: [Matrix] Set background mode in VOIP plugin - false flutter: [Matrix] Set background mode in VOIP plugin - false ```

Steps to Reproduce

  1. Start the App

Expected Behavior

no err

App Version

fluffychat-bin 1.19.0-3

Additional Platform Information

thinkpad e14 - arch linux 6.8.7

Additional Context

No response

jiteshsingh commented 6 months ago

related to https://github.com/krille-chan/fluffychat/issues/1012