syphon icon indicating copy to clipboard operation
syphon copied to clipboard

Messages not readable after app restart

Open moan0s opened this issue 3 years ago • 8 comments

To test try the following:

  • start the app
  • create an encrypted room (without inviting someone)
  • send a message
  • close the app
  • restart the app
  • open the room
  • Message bubble is there but simply says Encrypted Message

moan0s avatar Apr 05 '22 19:04 moan0s

hey @moan0s do you mind providing what version + platform you're using? Is this one Arch as well?

Sounds like nothing is getting saved to cold storage, which would explain the key failure in the other issue as well

ereio avatar Apr 05 '22 21:04 ereio

I am using syphon-bin 0.2.12-1 Here some details on my setup

OS: EndeavourOS Linux x86_64
Host: 20YM Lenovo ThinkBook 16p Gen 2
Kernel: 5.17.1-arch1-1
DE: Plasma 5.24.4

but I encounter this issue on tails (current 4.29) as well (trying to get syphon to run on tails)

moan0s avatar Apr 06 '22 08:04 moan0s

This is what I get when running from commandline

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: SqliteException(1): near "ON": syntax error, SQL logic error or missing database (code 1)
  Causing statement: INSERT INTO rooms (id, name, alias, homeserver, avatar_uri, topic, join_rule, drafting, direct, sending, invite, guest_enabled, encryption_enabled, world_readable, hidden, archived, last_batch, prev_batch, next_batch, last_read, last_update, total_joined_users, name_priority, draft, reply, user_ids) VALUES (?, ?, ?, NULL, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT(id) DO UPDATE SET id = ?, name = ?, alias = ?, homeserver = NULL, avatar_uri = ?, topic = ?, join_rule = ?, drafting = ?, direct = ?, sending = ?, invite = ?, guest_enabled = ?, encryption_enabled = ?, world_readable = ?, hidden = ?, archived = ?, last_batch = ?, prev_batch = ?, next_batch = ?, last_read = ?, last_update = ?, total_joined_users = ?, name_priority = ?, draft = ?, reply = ?, user_ids = ?
#0      throwException (package:sqlite3/src/impl/exception.dart:34)
#1      DatabaseImpl._prepareInternal (package:sqlite3/src/impl/database.dart:250)
#2      DatabaseImpl.prepare (package:sqlite3/src/impl/database.dart:152)
#3      _VmDelegate.runBatched (package:drift/src/ffi/database.dart:186)
#4      _BaseExecutor.runBatched.<anonymous closure> (package:drift/src/runtime/executor/helpers/engines.dart:121)
#5      _BaseExecutor._synchronized.<anonymous closure> (package:drift/src/runtime/executor/helpers/engines.dart:51)
#6      new Future.sync (dart:async/future.dart:296)
#7      Lock.synchronized.callBlockAndComplete (package:drift/src/utils/synchronized.dart:17)
#8      ServerImplementation._waitForTurn.<anonymous closure> (package:drift/src/remote/server_impl.dart:226)
<asynchronous suspension>
#9      ServerImplementation._runBatched (package:drift/src/remote/server_impl.dart:142)
<asynchronous suspension>
#10     DriftCommunication.setRequestHandler.<anonymous closure>.<anonymous closure> (package:drift/src/remote/communication.dart:152)
<asynchronous suspension>

moan0s avatar Apr 06 '22 08:04 moan0s

Thanks for this! Huge help. Will take a look this weekend / soon.

Looks like it may have never created the DB based on the SQL logic error or missing database (code 1) portion of the error. I've been meaning to debug the several issues that Arch users have brought up so I'll try running Syphon on a fresh install. There's a hot cache, key/value store, that saves a lot of essential data to quickly load the app on open. It may be what is keeping your session alive even though the cold storage DB is never created.

ereio avatar Apr 06 '22 14:04 ereio

I'm having this issue on MacOS too

EdGeraghty avatar Apr 14 '22 13:04 EdGeraghty

good to know, I'll try to recreate there first

ereio avatar Apr 15 '22 12:04 ereio

@moan0s if you don't mind, could you try out the latest nightly here and see if you experience any issues?

https://git.syphon.org/syphon-org/syphon/releases/tag/fix/linux-storage-issue-357dc11-linux

shasum: ab3f6b5448b2d033eaf8aa97bc2fb7173b9db48c89ac4193f68369f812014a0a

ereio avatar May 06 '22 21:05 ereio

Yes this build seems to work 🎉🎉🎉 Still having segmentation faults when closing the app but that is a topic for another issue. Thank you so much 🥳

moan0s avatar May 07 '22 00:05 moan0s