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

Signal unlinks from phone after update/refresh: conversation history loss #99

Open
Totogro opened this issue Feb 16, 2023 · 15 comments
Open
Labels
bug Something isn't working

Comments

@Totogro
Copy link

Totogro commented Feb 16, 2023

What happened?

Every now and then, probably when the snap is refreshed to a newer version (not every refresh) I start signal-desktop only to discover that it is not linked to my phone anymore and asks me to link to it again. Just as if it was the very first time I used signal-desktop. That means all conversation history is lost on the desktop.
It it the third time in 4 months this happens.
First link lasted from 13th of Nov. 2022 - 19th Nov 2022
Second link 20th Nov 2022 - 15th Feb 2023
And now from today 16th Feb 2023 - but for how long before I lose everything again ?

What should have happened?

When the app starts after a snap refresh it should just work as usual and keep the link to my phone and keep my whole history intact and accessible.

Output of snap info $snap_name

name:      signal-desktop
summary:   Private messaging from your desktop.
publisher: Snapcrafters
store-url: https://snapcraft.io/signal-desktop
contact:   https://github.com/snapcrafters/signal-desktop/issues
license:   AGPL-3.0-only
description: |
  Private messaging from your desktop.
  
  To use the Signal desktop app, Signal must first be installed on your
  phone.
  
  **Are you having issues?**
  
  Let us know by creating a new issue here:
  https://github.com/snapcrafters/signal-desktop/issues
  
  **Authors**
  
  This snap is maintained by the Snapcrafters community, and is not
  necessarily endorsed or officially maintained by the upstream developers.
commands:
  - signal-desktop
snap-id:      r4LxMVp7zWramXsJQAKdamxy6TAWlaDD
tracking:     latest/stable
refresh-date: aujourd'hui à 14h49, heure des Rocheuses
channels:
  latest/stable:    6.6.0 2023-02-16 (448) 193MB -
  latest/candidate: 6.6.0 2023-02-16 (448) 193MB -
  latest/beta:      ↑                            
  latest/edge:      ↑                            
installed:          6.6.0            (448) 193MB -

Output of snap connections $snap_name

Interface               Connecteur                             Prise                           Notes
audio-playback          signal-desktop:audio-playback          :audio-playback                 -
audio-record            signal-desktop:audio-record            :audio-record                   -
browser-support         signal-desktop:browser-support         :browser-support                -
camera                  signal-desktop:camera                  :camera                         -
content[gnome-42-2204]  signal-desktop:gnome-42-2204           gnome-42-2204:gnome-42-2204     -
content[gtk-3-themes]   signal-desktop:gtk-3-themes            gtk-common-themes:gtk-3-themes  -
content[icon-themes]    signal-desktop:icon-themes             gtk-common-themes:icon-themes   -
content[sound-themes]   signal-desktop:sound-themes            gtk-common-themes:sound-themes  -
desktop                 signal-desktop:desktop                 :desktop                        -
desktop-legacy          signal-desktop:desktop-legacy          :desktop-legacy                 -
gsettings               signal-desktop:gsettings               :gsettings                      -
home                    signal-desktop:home                    :home                           -
network                 signal-desktop:network                 :network                        -
opengl                  signal-desktop:opengl                  :opengl                         -
removable-media         signal-desktop:removable-media         -                               -
screen-inhibit-control  signal-desktop:screen-inhibit-control  :screen-inhibit-control         -
unity7                  signal-desktop:unity7                  :unity7                         -
wayland                 signal-desktop:wayland                 :wayland                        -
x11                     signal-desktop:x11                     :x11                            -

Output of snap version

snap    2.58.2
snapd   2.58.2
series  16
ubuntu  20.04
kernel  5.4.0-124-generic

Relevant log output

[  806.503700] audit: type=1400 audit(1676555663.382:138): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/3978/mem" pid=3978 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[  806.503822] audit: type=1400 audit(1676555663.382:139): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/3978/mem" pid=3978 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[  806.503895] audit: type=1400 audit(1676555663.382:140): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/3978/mem" pid=3978 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[  806.503965] audit: type=1400 audit(1676555663.382:141): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/3978/mem" pid=3978 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[  806.504035] audit: type=1400 audit(1676555663.382:142): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/3978/mem" pid=3978 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[  806.504105] audit: type=1400 audit(1676555663.382:143): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/3978/mem" pid=3978 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[  806.504174] audit: type=1400 audit(1676555663.382:144): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/3978/mem" pid=3978 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[  806.504241] audit: type=1400 audit(1676555663.382:145): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/3978/mem" pid=3978 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[  806.504309] audit: type=1400 audit(1676555663.382:146): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/3978/mem" pid=3978 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[  806.504376] audit: type=1400 audit(1676555663.382:147): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/3978/mem" pid=3978 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[ 1093.033615] audit: type=1400 audit(1676555949.913:266): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/4550/mem" pid=4550 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[ 1093.034170] audit: type=1400 audit(1676555949.913:267): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/4550/mem" pid=4550 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[ 1093.034180] audit: type=1400 audit(1676555949.913:268): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/4550/mem" pid=4550 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[ 1093.034187] audit: type=1400 audit(1676555949.913:269): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/4550/mem" pid=4550 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[ 1093.034193] audit: type=1400 audit(1676555949.913:270): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/4550/mem" pid=4550 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[ 1093.034199] audit: type=1400 audit(1676555949.913:271): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/4550/mem" pid=4550 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[ 1093.034204] audit: type=1400 audit(1676555949.913:272): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/4550/mem" pid=4550 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[ 1093.034210] audit: type=1400 audit(1676555949.913:273): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/4550/mem" pid=4550 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[ 1093.034217] audit: type=1400 audit(1676555949.913:274): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/4550/mem" pid=4550 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[ 1093.034222] audit: type=1400 audit(1676555949.913:275): apparmor="DENIED" operation="open" profile="snap.signal-desktop.signal-desktop" name="/proc/4550/mem" pid=4550 comm="signal-desktop" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
[ 1311.879112] audit: type=1400 audit(1676556168.755:394): apparmor="DENIED" operation="open" profile="snap-update-ns.firefox" name="/var/lib/" pid=4682 comm="5" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[ 1311.885386] audit: type=1400 audit(1676556168.763:395): apparmor="DENIED" operation="open" profile="snap-update-ns.firefox" name="/var/lib/" pid=4682 comm="5" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[ 1383.078197] audit: type=1400 audit(1676556239.955:398): apparmor="DENIED" operation="open" profile="snap.snap-store.snap-store" name="/var/lib/snapd/hostfs/usr/share/gdm/greeter/applications/gnome-initial-setup.desktop" pid=5546 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 1383.251571] audit: type=1400 audit(1676556240.127:399): apparmor="DENIED" operation="open" profile="snap.snap-store.snap-store" name="/var/lib/snapd/hostfs/usr/share/gdm/greeter/applications/gnome-initial-setup.desktop" pid=5546 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 1385.638129] audit: type=1400 audit(1676556242.515:405): apparmor="DENIED" operation="open" profile="snap.snap-store.snap-store" name="/etc/PackageKit/Vendor.conf" pid=5546 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 1386.536552] audit: type=1400 audit(1676556243.411:406): apparmor="DENIED" operation="open" profile="snap.snap-store.snap-store" name="/etc/appstream.conf" pid=5546 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 1439.962889] audit: type=1400 audit(1676556296.839:407): apparmor="DENIED" operation="open" profile="snap.snap-store.snap-store" name="/var/lib/snapd/hostfs/usr/share/gdm/greeter/applications/gnome-initial-setup.desktop" pid=5546 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 1440.139126] audit: type=1400 audit(1676556297.015:408): apparmor="DENIED" operation="open" profile="snap.snap-store.snap-store" name="/var/lib/snapd/hostfs/usr/share/gdm/greeter/applications/gnome-initial-setup.desktop" pid=5546 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0

Teminal output of app

Set Windows Application User Model ID (AUMID) { appUserModelId: 'org.whispersystems.signal-desktop' }
NODE_ENV production
NODE_CONFIG_DIR /snap/signal-desktop/448/opt/Signal/resources/app.asar/config
NODE_CONFIG {}
ALLOW_CONFIG_MUTATIONS undefined
HOSTNAME undefined
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
SIGNAL_ENABLE_HTTP undefined
userData: /home/[redacted]/snap/signal-desktop/448/.config/Signal
config/get: Successfully read user config file
config/get: Successfully read ephemeral config file
making app single instance
Error org.freedesktop.DBus.Error.Failed: cannot find desktop file "/var/lib/snapd/desktop/applications/signal-desktop_signal.desktop"
Error org.freedesktop.DBus.Error.Failed: cannot find desktop file "/var/lib/snapd/desktop/applications/signal-desktop_signal.desktop"
{"level":30,"time":"2023-02-16T14:41:08.982Z","msg":"app.ready: preferred system locales: fr, fr-FR, fr-FR, fr, fr"}
{"level":30,"time":"2023-02-16T14:41:09.003Z","msg":"Loading preferred system locale: 'fr'"}
{"level":30,"time":"2023-02-16T14:41:09.225Z","msg":"app ready"}
{"level":30,"time":"2023-02-16T14:41:09.227Z","msg":"starting version 6.6.0"}
{"level":30,"time":"2023-02-16T14:41:09.229Z","msg":"media access status [object Undefined] [object Undefined]"}
{"level":30,"time":"2023-02-16T14:41:09.231Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2023-02-16T14:41:09.249Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2023-02-16T14:41:09.250Z","msg":"got fast spellcheck setting true"}
{"level":30,"time":"2023-02-16T14:41:09.254Z","msg":"getSystemTraySetting saw --use-tray-icon flag. Returning MinimizeToSystemTray"}
{"level":30,"time":"2023-02-16T14:41:09.256Z","msg":"Initializing BrowserWindow config: {\"show\":false,\"width\":1920,\"height\":1016,\"minWidth\":300,\"minHeight\":200,\"autoHideMenuBar\":false,\"titleBarStyle\":\"default\",\"titleBarOverlay\":false,\"backgroundColor\":\"#121212\",\"webPreferences\":{\"devTools\":false,\"spellcheck\":true,\"nodeIntegration\":false,\"nodeIntegrationInWorker\":false,\"sandbox\":false,\"contextIsolation\":true,\"preload\":\"[REDACTED]/preload.bundle.js\",\"backgroundThrottling\":true,\"enablePreferredSizeMode\":true,\"disableBlinkFeatures\":\"Accelerated2dCanvas,AcceleratedSmallCanvases\"},\"icon\":\"[REDACTED]/images/signal-logo-desktop-linux.png\",\"x\":9,\"y\":34}"}
{"level":30,"time":"2023-02-16T14:41:09.455Z","msg":"spellcheck: user locale: fr"}
{"level":30,"time":"2023-02-16T14:41:09.455Z","msg":"spellcheck: available spellchecker languages:  [\"af\",\"bg\",\"ca\",\"cs\",\"cy\",\"da\",\"de\",\"de-DE\",\"el\",\"en\",\"en-AU\",\"en-CA\",\"en-GB\",\"en-GB-oxendict\",\"en-US\",\"es\",\"es-419\",\"es-AR\",\"es-ES\",\"es-MX\",\"es-US\",\"et\",\"fa\",\"fo\",\"fr\",\"fr-FR\",\"he\",\"hi\",\"hr\",\"hu\",\"hy\",\"id\",\"it\",\"it-IT\",\"ko\",\"lt\",\"lv\",\"nb\",\"nl\",\"pl\",\"pt\",\"pt-BR\",\"pt-PT\",\"ro\",\"ru\",\"sh\",\"sk\",\"sl\",\"sq\",\"sr\",\"sv\",\"ta\",\"tg\",\"tr\",\"uk\",\"vi\"]"}
{"level":30,"time":"2023-02-16T14:41:09.456Z","msg":"spellcheck: setting languages to:  [\"fr\"]"}
{"level":30,"time":"2023-02-16T14:41:09.461Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2023-02-16T14:41:09.544Z","msg":"MainSQL: updateSchema:\n  Current user_version: 78;\n  Most recent db schema: 78;\n  SQLite version: 3.39.4;\n  SQLCipher version: 4.5.3 community;\n  (deprecated) schema_version: 339;\n"}
[9233:0216/154109.594513:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.login1.Manager.Inhibit: object_path= /org/freedesktop/login1: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.173" (uid=1000 pid=9233 comm="/snap/signal-desktop/448/opt/Signal/signal-desktop" label="snap.signal-desktop.signal-desktop (enforce)") interface="org.freedesktop.login1.Manager" member="Inhibit" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=1400 comm="/lib/systemd/systemd-logind " label="unconfined")
WARNING: Kernel has no file descriptor comparison support: Operation not permitted
{"level":30,"time":"2023-02-16T14:41:10.089Z","msg":"Updating BrowserWindow config: %s {\"maximized\":false,\"autoHideMenuBar\":false,\"fullscreen\":false,\"width\":1920,\"height\":1016,\"x\":0,\"y\":64}"}
{"level":30,"time":"2023-02-16T14:41:10.092Z","msg":"config/set: Saving ephemeral config to disk"}
{"level":30,"time":"2023-02-16T14:41:10.094Z","msg":"config/set: Saved ephemeral config to disk"}
(node:9380) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `exe --trace-deprecation ...` to show where the warning was created)
{"level":30,"time":"2023-02-16T14:41:14.350Z","msg":"got fast spellcheck setting true"}
{"level":30,"time":"2023-02-16T14:41:14.356Z","msg":"main window is ready-to-show"}
{"level":30,"time":"2023-02-16T14:41:14.357Z","msg":"showing main window"}
{"level":30,"time":"2023-02-16T14:41:14.404Z","msg":"System tray service: created"}
{"level":30,"time":"2023-02-16T14:41:14.405Z","msg":"System tray service: updating main window. Previously, there was not a window, and now there is"}
{"level":30,"time":"2023-02-16T14:41:14.406Z","msg":"System tray service: rendering no tray"}
{"level":30,"time":"2023-02-16T14:41:14.406Z","msg":"System tray service: enabling"}
{"level":30,"time":"2023-02-16T14:41:14.407Z","msg":"System tray service: rendering the tray"}
{"level":30,"time":"2023-02-16T14:41:14.407Z","msg":"System tray service: creating the tray"}
{"level":30,"time":"2023-02-16T14:41:14.469Z","msg":"Begin ensuring permissions"}
{"level":30,"time":"2023-02-16T14:41:14.706Z","msg":"Ensuring file permissions for 4 files"}
{"level":30,"time":"2023-02-16T14:41:14.712Z","msg":"Finish ensuring permissions in 242ms"}
{"level":30,"time":"2023-02-16T14:41:17.279Z","msg":"deleteAllBadges: deleted 0 files"}
{"level":30,"time":"2023-02-16T14:41:17.378Z","msg":"MainSQL: removeKnownStickers: About to iterate through 219 stickers"}
{"level":30,"time":"2023-02-16T14:41:17.387Z","msg":"MainSQL: removeKnownStickers: Done processing 219 stickers"}
{"level":30,"time":"2023-02-16T14:41:17.388Z","msg":"deleteAllStickers: deleted 0 files"}
{"level":30,"time":"2023-02-16T14:41:17.393Z","msg":"MainSQL: removeKnownDraftAttachments: About to iterate through 162 conversations"}
{"level":30,"time":"2023-02-16T14:41:17.424Z","msg":"MainSQL: removeKnownDraftAttachments: Done processing 162 conversations"}
{"level":30,"time":"2023-02-16T14:41:17.425Z","msg":"deleteAllDraftAttachments: deleted 0 files"}
{"level":30,"time":"2023-02-16T14:41:17.441Z","msg":"cleanupOrphanedAttachments: found 33 attachments on disk"}
{"level":30,"time":"2023-02-16T14:41:17.442Z","msg":"MainSQL: getKnownConversationAttachments: About to iterate through 162"}
{"level":30,"time":"2023-02-16T14:41:17.447Z","msg":"MainSQL: getKnownConversationAttachments: Done processing"}
{"level":30,"time":"2023-02-16T14:41:17.448Z","msg":"cleanupOrphanedAttachments: found 31 conversation attachments (0 missing), 2 remain"}
{"level":30,"time":"2023-02-16T14:41:17.449Z","msg":"cleanupOrphanedAttachments: took 202ms"}
{"level":30,"time":"2023-02-16T14:41:17.452Z","msg":"Begin ensuring permissions"}
{"level":30,"time":"2023-02-16T14:41:17.454Z","msg":"sending `database-ready`"}
{"level":30,"time":"2023-02-16T14:41:17.463Z","msg":"MainSQL: getKnownMessageAttachments(62dfd61e68eaaee7): Starting iteration through 17 messages"}
{"level":30,"time":"2023-02-16T14:41:17.521Z","msg":"MainSQL: finishGetKnownMessageAttachments(62dfd61e68eaaee7): reached the end after processing 17 messages"}
{"level":30,"time":"2023-02-16T14:41:17.522Z","msg":"cleanupOrphanedAttachments: found 2 message attachments, (0 missing) 0 remain"}
{"level":30,"time":"2023-02-16T14:41:17.523Z","msg":"deleteAll: deleted 0 files"}
{"level":30,"time":"2023-02-16T14:41:17.523Z","msg":"deleteOrphanedAttachments: took 75ms"}
{"level":30,"time":"2023-02-16T14:41:17.588Z","msg":"Ensuring file permissions for 510 files"}
{"level":50,"time":"2023-02-16T14:41:17.602Z","msg":"ensureFilePermissions: Error from chmod ENOENT: no such file or directory, chmod '[REDACTED]/SingletonCookie'"}
{"level":50,"time":"2023-02-16T14:41:17.603Z","msg":"ensureFilePermissions: Error from chmod ENOENT: no such file or directory, chmod '[REDACTED]/SingletonLock'"}
{"level":30,"time":"2023-02-16T14:41:17.813Z","msg":"Finish ensuring permissions in 360ms"}
{"level":30,"time":"2023-02-16T14:41:18.092Z","msg":"Prevent display sleep service: allowing display sleep"}
{"level":30,"time":"2023-02-16T14:41:18.092Z","msg":"Background throttling enabled because no call is active"}
{"level":30,"time":"2023-02-16T14:41:18.382Z","msg":"updater/start: Updates disabled - not starting new version checks"}
{"level":30,"time":"2023-02-16T14:41:18.445Z","msg":"App loaded - time: 9238"}
{"level":30,"time":"2023-02-16T14:41:18.445Z","msg":"SQL init - time: 339"}
{"level":30,"time":"2023-02-16T14:41:18.446Z","msg":"Preload - time: 2754"}
{"level":30,"time":"2023-02-16T14:41:18.446Z","msg":"WebSocket connect - time: 4164"}
{"level":30,"time":"2023-02-16T14:41:18.446Z","msg":"Processed count: 0"}
{"level":30,"time":"2023-02-16T14:41:18.447Z","msg":"Messages per second: 0"}
{"level":30,"time":"2023-02-16T14:41:28.178Z","msg":"MainSQL: slow query updateConversations duration=65ms"}
@Totogro Totogro added the bug Something isn't working label Feb 16, 2023
@Totogro
Copy link
Author

Totogro commented Feb 16, 2023

This is a serious issue that will push me to reconsider using this app I have been using since the very beginning. I cannot accept to loose my personal data.

Also : where can I find my history and is there a way to restore it ? Even temporarily ? I need to get information from it.

Thank you for your help.

@merlijn-sebrechts
Copy link
Member

What is going wrong?

This really sucks, and it shouldn't happen. From your logs it seems as if Signal removes its own data. It's not clear from the logs why that happens.

Do you know if Signal was running during the update?

Can you show the output of the following commands, before running the workaround below?

snap changes
sudo snap get core -d
snap list signal-desktop

where can I find my history and is there a way to restore it ? Even temporarily ?

First, you have to make sure that the snap is shut down completely. (also look in the tray on the top right of your screen to exit it from there).

Then, save your current state, just to be sure.

snap save signal-desktop

Then revert the snap (and your data) to the previous version

snap revert signal-desktop

Save the state of the old version again, just to be sure

snap save signal-desktop

Then, open signal desktop and it should show you your old data.

@Totogro
Copy link
Author

Totogro commented Feb 16, 2023

Hello, thank you. I don't think Signal was running, I think the refresh happened upon the computer session startup.

Sorry, it is in French :
("Actualiser automatiquement" = automatic refresh)

$ snap changes
Identifiant  État  Descendance                               Prêt                                      Résumé
816          Done  aujourd'hui à 14h48, heure des Rocheuses  aujourd'hui à 14h49, heure des Rocheuses  Actualiser automatiquement les paquets Snap "signal-desktop", "standard-notes", "vlc"
817          Done  aujourd'hui à 14h55, heure des Rocheuses  aujourd'hui à 14h55, heure des Rocheuses  Actualiser tous les paquets Snap :pas de mise à jour

$ sudo snap get core -d
[sudo] Mot de passe de [redacted user name] : 
{
	"seed": {
		"loaded": true
	},
	"system": {
		"hostname": "[redacted computer name]",
		"network": {},
		"timezone": "UTC"
	}
}


$ snap list signal-desktop
Nom             Version  Révision  Suivi          Éditeur       Notes
signal-desktop  6.6.0    448       latest/stable  snapcrafters  -

@merlijn-sebrechts
Copy link
Member

@Totogro have you tried to get your history back? How did that go?

@Totogro
Copy link
Author

Totogro commented Feb 21, 2023

@merlijn-sebrechts in the meantime I came accross this very good webpage
https://www.tc3.dev/posts/2021-11-02-extract-messages-from-signal/
which explains how to extract my history right from the DB, so it is even better for me this way ! I found all the previous DB so my data is there. (and attachments files in the folders next to it)

It means that previous snap folders are still there with all the data.
The bug is still relevant though : history is scattered among many snap folders and it shouldn't.

@merlijn-sebrechts
Copy link
Member

I honestly have no idea why this is happening. We had this issue in the past if Signal updated while running, but that shouldn't happen anymore since refresh-app-awareness was released.

Do you have a peculiar setup, like multiple phones, or multiple installs of signal desktop?

@thegrandpoobah
Copy link

I just ran into this issue as well.. Signal update was pending, my power went out, automatically rebooted and wham.. signal desktop is unlinked with phone.

I did the steps outlined in a prior comment and this is the output:

> snap changes
no changes found
> sudo snap get core -d
{
	"seed": {
		"loaded": true
	},
	"system": {
		"hostname": "sensiblemonster",
		"network": {},
		"timezone": "UTC"
	}
}
> snap list signal-desktop
Name            Version  Rev  Tracking       Publisher     Notes
signal-desktop  6.12.0   482  latest/stable  snapcrafters  -

I also extracted the following debug log from Signal Desktop itself:

https://debuglogs.org/desktop/6.12.0/3b3d91976c72ee5679a5238ea44135b20c5a2c5303d70e7243b36d94924da727.gz

Relevant to the discussion I think is the following line:

INFO  2023-04-11T02:56:06.586Z key/initialize: Generating new encryption key, since we did not find it on disk

So looks like for whatever reason it lost the encryption key??

I also tried the revert instructions from the same comments above and it successfully reverted to 6.11.0 and got my message history back. Thank you for that, but its defiintely scary to seeminly lose everything.

For what its worth, I have had this issue in the past, but didn't actually think I could fix it, so I just relinked the desktop. This is the first time I've actually looked into the issue and saw that a fix might be possible.

@dnzgr
Copy link

dnzgr commented Oct 22, 2023

I'm also affected by this bug — not so much the need to relink the device (thought that has happened in the past but not recently), but every time that the signal version is updated in the background, I first see that emojis do not show properly, or trying to open preferences from the file menu leads to immediate crash, and upon restart recent messages have disappeared as described by OP

Any updates on this issue since last posted comment in April?

@merlijn-sebrechts
Copy link
Member

@dnzgr

This sound like a different issue. Can you run the following commands and show the output to diagnose the issue:

snap changes
sudo snap get core -d
snap list signal-desktop
snap info signal-desktop
snap version
snap connections signal-desktop

@popey
Copy link
Contributor

popey commented Oct 23, 2023

I have a theory why this may happen. It looks like the key goes in $SNAP_USER_DATA which resolves to ~/snap/signal-desktop/<revision>, so today, for me, that's ~/snap/signal-desktop/532. There's a symlink of ~/snap/signal-desktop/current pointing to ~/snap/signal/desktop/532:

alan@nuc:~/snap/signal-desktop$ ll
total 20
drwxr-xr-x  5 alan alan 4096 Oct 23 13:04 ./
drwx------ 42 alan alan 4096 Oct 23 11:10 ../
drwxr-xr-x  5 alan alan 4096 Oct 14 09:56 531/
drwxr-xr-x  5 alan alan 4096 Oct 23 13:04 532/
drwxr-xr-x  3 alan alan 4096 Oct 12 20:14 common/
lrwxrwxrwx  1 alan alan    3 Oct 23 13:04 current -> 532/

However, when the application gets refreshed a new revision arrives, and the current symlink will point to the new folder. If Signal internally thinks that the path to the key is ~/snap/signal-desktop/532/.pki/nssdb (for example) then when the application refreshes, it will lose access to that path, and end up pointing to a location it can't get to, as current will now point to (for example) ~/snap/signal-desktop/533.

This is a bit of a guess, but I have seen this behaviour in other applications, and the solution or workaround was to coerce the application to put the data in $SNAP_USER_COMMON which is ~/snap/signal-desktop/common, which doesn't get moved when the snap is updated. Might be worth investigating.

@merlijn-sebrechts
Copy link
Member

merlijn-sebrechts commented Oct 23, 2023

@popey the strange thing is that I have never had this issue on my own system. I track the candidate channel, so I get updates frequently and unexpectedly. We used to have a lot of these reports until the refresh awareness landed globally.

  • So either refresh app awareness isn't working for these people for some reason
  • Or, there is some code that does what you describe, but that has never executed on my machine.

@thegrandpoobah
Copy link

For what it is worth, the behavior that @dnzgr explains is almost exactly what I see as well.

@merlijn-sebrechts merlijn-sebrechts changed the title [Bug]: Randomly unlinked from phone : conversation history loss Signal unlinks from phone after update/refresh: conversation history loss Oct 23, 2023
@merlijn-sebrechts
Copy link
Member

@thegrandpoobah Can you also run the following commands and post the output? (These are different from the output you posted above.)

snap info signal-desktop
snap version
snap connections signal-desktop

@thegrandpoobah
Copy link

thegrandpoobah commented Oct 23, 2023

snap info signal-desktop:

name:      signal-desktop
summary:   Speak Freely - Private Messenger
publisher: Snapcrafters✪
store-url: https://snapcraft.io/signal-desktop
contact:   https://github.com//snapcrafters/signal-desktop/issues
license:   AGPL-3.0-only
description: |
  **Note: To use the Signal desktop app, you must first install Signal on your phone.**
  
  Millions of people use Signal every day for free and instantaneous communication anywhere in the
  world. Send and receive high-fidelity messages, participate in HD voice/video calls, and explore a
  growing set of new features that help you stay connected. Signal's advanced privacy-preserving
  technology is always enabled, so you can focus on sharing the moments that matter with the people
  who matter to you.
  
  - Say anything - State-of-the-art end-to-end encryption (powered by the open source Signal
  Protocol™) keeps your conversations secure. Privacy isn't an optional mode; it's just the way that
  Signal works. Every message, every call, every time.
  - Go fast - Messages are delivered quickly and reliably, even on slow networks. Signal is
  optimized to operate in the most constrained environment possible.
  - Feel free - Signal is a completely independent 501c3 nonprofit. Development is supported by
  users like you. No advertisements. No trackers. No kidding.
  - Be yourself - You can use your existing phone number and address book to securely communicate
  with your friends.
  - Speak up - Whether they live across town or across the ocean, Signal's enhanced audio and video
  quality will make your friends and family feel closer.
  - Whisper in the shadows - Switch to the dark theme if you refuse to see the light.
  
  **Are you having issues?**
  
  Let us know by creating a new issue here: https://github.com/snapcrafters/signal-desktop/issues
  
  **Authors**
  
  This snap is maintained by the Snapcrafters community, and is not necessarily endorsed or
  officially maintained by the upstream developers.
commands:
  - signal-desktop
snap-id:      r4LxMVp7zWramXsJQAKdamxy6TAWlaDD
tracking:     latest/stable
refresh-date: 7 days ago, at 00:09 EDT
channels:
  latest/stable:    6.35.0 2023-10-20 (532) 181MB -
  latest/candidate: 6.35.0 2023-10-20 (532) 181MB -
  latest/beta:      ↑                             
  latest/edge:      ↑                             
installed:          6.34.0            (530) 181MB -

snap version:

snap    2.60.4
snapd   2.60.4
series  16
ubuntu  23.04
kernel  6.2.0-34-generic

snap connections signal-desktop:

Interface               Plug                                   Slot                            Notes
audio-playback          signal-desktop:audio-playback          :audio-playback                 -
audio-record            signal-desktop:audio-record            :audio-record                   -
browser-support         signal-desktop:browser-support         :browser-support                -
camera                  signal-desktop:camera                  :camera                         -
content[gnome-42-2204]  signal-desktop:gnome-42-2204           gnome-42-2204:gnome-42-2204     -
content[gtk-3-themes]   signal-desktop:gtk-3-themes            gtk-common-themes:gtk-3-themes  -
content[icon-themes]    signal-desktop:icon-themes             gtk-common-themes:icon-themes   -
content[sound-themes]   signal-desktop:sound-themes            gtk-common-themes:sound-themes  -
desktop                 signal-desktop:desktop                 :desktop                        -
desktop-legacy          signal-desktop:desktop-legacy          :desktop-legacy                 -
gsettings               signal-desktop:gsettings               :gsettings                      -
home                    signal-desktop:home                    :home                           -
network                 signal-desktop:network                 :network                        -
opengl                  signal-desktop:opengl                  :opengl                         -
removable-media         signal-desktop:removable-media         -                               -
screen-inhibit-control  signal-desktop:screen-inhibit-control  :screen-inhibit-control         -
unity7                  signal-desktop:unity7                  :unity7                         -
wayland                 signal-desktop:wayland                 :wayland                        -
x11                     signal-desktop:x11                     :x11                            -

I should say that I intentionally moved back a version (6.34) to get around the encryption key missing issue.

@aneagoe
Copy link

aneagoe commented Oct 21, 2024

I see the same issue with almost every update. Update is pending, I stop signal and then signal fails to start up, complaining about access to the database. I have to wipe clean to get it to start. Running manually from terminal, shows the following output:

[andrei@andrei-nb:~]$ signal-desktop 
libpxbackend-1.0.so: cannot open shared object file: No such file or directory
Failed to load module: /home/andrei/snap/signal-desktop/common/.cache/gio-modules/libgiolibproxy.so
Set Windows Application User Model ID (AUMID) { AUMID: 'org.whispersystems.signal-desktop' }
NODE_ENV production
NODE_CONFIG_DIR /snap/signal-desktop/720/opt/Signal/resources/app.asar/config
NODE_CONFIG {}
ALLOW_CONFIG_MUTATIONS undefined
HOSTNAME andrei-nb
NODE_APP_INSTANCE undefined
SUPPRESS_NO_CONFIG_WARNING undefined
SIGNAL_ENABLE_HTTP undefined
userData: /home/andrei/snap/signal-desktop/720/.config/Signal
config/get: Successfully read user config file
config/get: Successfully read ephemeral config file
making app single instance
Error org.freedesktop.DBus.Error.Failed: cannot find desktop file "/var/lib/snapd/desktop/applications/signal-desktop_signal.desktop"
Error org.freedesktop.DBus.Error.Failed: cannot find desktop file "/var/lib/snapd/desktop/applications/signal-desktop_signal.desktop"
Gtk-Message: 15:25:44.816: Failed to load module "pk-gtk-module"
Gtk-Message: 15:25:44.822: Failed to load module "pk-gtk-module"
{"level":30,"time":"2024-10-21T13:25:46.077Z","msg":"got fast localeOverride setting null"}
{"level":30,"time":"2024-10-21T13:25:46.079Z","msg":"app.ready: hour cycle preference: UnknownPreference"}
{"level":30,"time":"2024-10-21T13:25:46.079Z","msg":"app.ready: preferred system locales: en-US, en"}
{"level":30,"time":"2024-10-21T13:25:46.079Z","msg":"locale: Supported locales: af-ZA, ar, az-AZ, bg-BG, bn-BD, bs-BA, ca, cs, da, de, el, en, es, et-EE, eu, fa-IR, fi, fr, ga-IE, gl-ES, gu-IN, he, hi-IN, hr-HR, hu, id, it, ja, ka-GE, kk-KZ, km-KH, kn-IN, ko, ky-KG, lt-LT, lv-LV, mk-MK, ml-IN, mr-IN, ms, my, nb, nl, pa-IN, pl, pt-BR, pt-PT, ro-RO, ru, sk-SK, sl-SI, sq-AL, sr, sv, sw, ta-IN, te-IN, th, tl-PH, tr, ug, uk-UA, ur, vi, yue, zh-CN, zh-HK, zh-Hant"}
{"level":30,"time":"2024-10-21T13:25:46.080Z","msg":"locale: Preferred locales: en-US, en"}
{"level":30,"time":"2024-10-21T13:25:46.080Z","msg":"locale: Locale Override: null"}
{"level":30,"time":"2024-10-21T13:25:46.084Z","msg":"locale: Matched locale: en"}
{"level":40,"time":"2024-10-21T13:25:46.216Z","msg":"intl.onWarn [@formatjs/intl] \"defaultRichTextElements\" was specified but \"message\" was not pre-compiled. \nPlease consider using \"@formatjs/cli\" to pre-compile your messages for performance.\nFor more details see https://formatjs.io/docs/getting-started/message-distribution"}
{"level":30,"time":"2024-10-21T13:25:46.217Z","msg":"locale: Text info direction for en: ltr"}
{"level":50,"time":"2024-10-21T13:25:46.218Z","msg":"Detected change in safeStorage backend, can't decrypt DB key (previous: gnome_libsecret, current: basic_text)"}
{"level":30,"time":"2024-10-21T13:25:46.219Z","msg":"getSystemTraySetting got value DoNotUseSystemTray"}
{"level":30,"time":"2024-10-21T13:25:46.219Z","msg":"getSystemTraySetting returning DoNotUseSystemTray"}
{"level":30,"time":"2024-10-21T13:25:46.222Z","msg":"app ready"}
{"level":30,"time":"2024-10-21T13:25:46.223Z","msg":"starting version 7.29.0"}
{"level":30,"time":"2024-10-21T13:25:46.223Z","msg":"media access status [object Undefined] [object Undefined]"}
{"level":30,"time":"2024-10-21T13:25:46.229Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2024-10-21T13:25:46.251Z","msg":"got fast theme-setting value system"}
{"level":30,"time":"2024-10-21T13:25:46.251Z","msg":"got fast spellcheck setting true"}
{"level":30,"time":"2024-10-21T13:25:46.253Z","msg":"visibleOnAnyScreen(window): x=1920, y=37, width=1920, height=1080"}
{"level":30,"time":"2024-10-21T13:25:46.253Z","msg":"visibleOnAnyScreen(display #33): x=1920, y=0, width=3840, height=1600"}
{"level":30,"time":"2024-10-21T13:25:46.253Z","msg":"Initializing BrowserWindow config: {\"show\":false,\"width\":1920,\"height\":1080,\"minWidth\":300,\"minHeight\":200,\"autoHideMenuBar\":false,\"titleBarStyle\":\"default\",\"backgroundColor\":\"#3a76f0\",\"webPreferences\":{\"devTools\":false,\"spellcheck\":true,\"enableBlinkFeatures\":\"CSSPseudoDir,CSSLogical\",\"enablePreferredSizeMode\":true,\"nodeIntegration\":false,\"nodeIntegrationInWorker\":false,\"sandbox\":false,\"contextIsolation\":true,\"preload\":\"[REDACTED]/preload.wrapper.js\",\"backgroundThrottling\":true,\"disableBlinkFeatures\":\"Accelerated2dCanvas,AcceleratedSmallCanvases\"},\"icon\":\"[REDACTED]/images/signal-logo-desktop-linux.png\",\"x\":1920,\"y\":37}"}
{"level":30,"time":"2024-10-21T13:25:46.397Z","msg":"spellcheck: user locales: [\"en-US\",\"en\"]"}
{"level":30,"time":"2024-10-21T13:25:46.397Z","msg":"spellcheck: available spellchecker languages: [\"af\",\"bg\",\"ca\",\"cs\",\"cy\",\"da\",\"de\",\"de-DE\",\"el\",\"en\",\"en-AU\",\"en-CA\",\"en-GB\",\"en-GB-oxendict\",\"en-US\",\"es\",\"es-419\",\"es-AR\",\"es-ES\",\"es-MX\",\"es-US\",\"et\",\"fa\",\"fo\",\"fr\",\"fr-FR\",\"he\",\"hi\",\"hr\",\"hu\",\"hy\",\"id\",\"it\",\"it-IT\",\"ko\",\"lt\",\"lv\",\"nb\",\"nl\",\"pl\",\"pt\",\"pt-BR\",\"pt-PT\",\"ro\",\"ru\",\"sh\",\"sk\",\"sl\",\"sq\",\"sr\",\"sv\",\"ta\",\"tg\",\"tr\",\"uk\",\"vi\"]"}
{"level":30,"time":"2024-10-21T13:25:46.398Z","msg":"spellcheck: setting languages to: [\"en-US\",\"en\"]"}
{"level":40,"time":"2024-10-21T13:25:46.399Z","msg":"MainSQL: Database log code=283: recovered 663 frames from WAL file [REDACTED]/sql/db.sqlite-wal"}
2024-10-21 15:25:46.776: ERROR CORE sqlcipher_page_cipher: hmac check failed for pgno=1
2024-10-21 15:25:46.776: ERROR CORE sqlite3Codec: error decrypting page 1 data: 1
2024-10-21 15:25:46.776: ERROR CORE sqlcipher_codec_ctx_set_error 1
{"level":40,"time":"2024-10-21T13:25:46.776Z","msg":"MainSQL: Database log code=26: file is not a database in \"PRAGMA journal_mode = WAL\""}
{"level":30,"time":"2024-10-21T13:25:46.783Z","msg":"MainSQL: migrateDatabase: Migration without cipher change failed"}
2024-10-21 15:25:46.888: ERROR CORE sqlcipher_page_cipher: hmac check failed for pgno=1
2024-10-21 15:25:46.888: ERROR CORE sqlite3Codec: error decrypting page 1 data: 1
2024-10-21 15:25:46.888: ERROR CORE sqlcipher_codec_ctx_set_error 1
{"level":40,"time":"2024-10-21T13:25:46.888Z","msg":"MainSQL: Database log code=26: statement aborts at 2: [PRAGMA user_version] file is not a database"}
{"level":50,"time":"2024-10-21T13:25:46.889Z","msg":"MainSQL: Database startup error: SqliteError: file is not a database\n    at Database.pragma ([REDACTED]/node_modules/@signalapp/better-sqlite3/lib/methods/pragma.js:11:31)\n    at getUserVersion ([REDACTED]/ts/sql/util.js:132:13)\n    at migrateSchemaVersion ([REDACTED]/ts/sql/Server.js:409:54)\n    at openAndMigrateDatabase ([REDACTED]/ts/sql/Server.js:441:5)\n    at openAndSetUpSQLCipher ([REDACTED]/ts/sql/Server.js:463:14)\n    at initialize ([REDACTED]/ts/sql/Server.js:510:10)\n    at MessagePort.<anonymous> ([REDACTED]/ts/sql/mainWorker.js:69:41)\n    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:820:20)\n    at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28)"}
{"level":50,"time":"2024-10-21T13:25:46.890Z","msg":"Failed to get zoom factor {\"name\":\"SqliteError\"}"}
{"level":30,"time":"2024-10-21T13:25:47.730Z","msg":"got fast theme-setting value system"}
{"level":50,"time":"2024-10-21T13:25:48.936Z","msg":"sql.initialize was unsuccessful; returning early"}
{"level":30,"time":"2024-10-21T13:25:48.937Z","msg":"close event {\"readyForShutdown\":false,\"shouldQuit\":false}"}
{"level":30,"time":"2024-10-21T13:25:48.937Z","msg":"maybeRequestCloseConfirmation: Checking to see if close confirmation is needed"}
{"level":50,"time":"2024-10-21T13:26:20.194Z","msg":"onDatabaseError: Quitting application"}
{"level":30,"time":"2024-10-21T13:26:20.195Z","msg":"main window closed event"}
{"level":30,"time":"2024-10-21T13:26:20.196Z","msg":"quit event {\"hasEventBeenPrevented\":false,\"windowCount\":0,\"mainWindowExists\":false}"}
{"level":50,"time":"2024-10-21T13:26:20.197Z","msg":"maybeRequestCloseConfirmation: Response never received; continuing with close."}
{"level":50,"time":"2024-10-21T13:26:20.198Z","msg":"MainSQL close, failed: SqliteError: file is not a database\n    at Database.pragma ([REDACTED]/node_modules/@signalapp/better-sqlite3/lib/methods/pragma.js:11:31)\n    at getUserVersion ([REDACTED]/ts/sql/util.js:132:13)\n    at migrateSchemaVersion ([REDACTED]/ts/sql/Server.js:409:54)\n    at openAndMigrateDatabase ([REDACTED]/ts/sql/Server.js:441:5)\n    at openAndSetUpSQLCipher ([REDACTED]/ts/sql/Server.js:463:14)\n    at initialize ([REDACTED]/ts/sql/Server.js:510:10)\n    at MessagePort.<anonymous> ([REDACTED]/ts/sql/mainWorker.js:69:41)\n    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:820:20)\n    at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28)"}
{"level":50,"time":"2024-10-21T13:26:20.199Z","msg":"Error occurred in handler for 'sql-channel:read': {\"name\":\"SqliteError\"}"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants