Saving emergency info fails if ~/.config/phosh/ doesn't exist
What problem did you encounter
I tried to enter emergency info in phosh-mobile-settings, and found it was lost as soon as I pressed the "Fertig" (German "done/finished") button. The information showed up neither when entering the dialog again, nor on the lock screen. Looking at the log (relevant excerpt below) I found the issue was that ~/.config/phosh/
didn't exist. After creating the directory saving the emergency info works perfectly, and it shows up on the lock screen.
How to reproduce
- Ensure
~/.config/phosh/
does not exist (delete after backup if necessary). - In phosh-mobile-settings open the lock screen settings enable the "emergency info" widget, and open its settings.
- Enter any data you like (e.g. name), and (try to) save & close.
- Open the "emergency info" settings again. Alternatively lock the screen and look up the emergency info widget.
What is the (wrong) result?
The entered emergency info is gone.
What is the expected behaviour?
Emergency info should be saved and displayed as configured. ~/.config/phosh/
should be created before writing the emergency info file if necessary.
Which version did you encounter the bug in?
Phosh Version: 0.28.0-r0 (Alpine package)
How are you running phosh?
-
PureOS amd64 qemu image -
Mobile phone (model: Pinephone 1.2b, operating system version: pmOS edge) -
Librem5 devkit -
nested compositor. If so please give the full command you start phosh with. -
other (please elaborate)
Releveant logfiles
From ~/.local/state/tinydm.log
:
(phosh-mobile-settings:12180): phosh-plugin-prefs-emergency-info-prefs-WARNING **: 14:37:15.558: Error Saving Keyfile at /home/user/.config/phosh/EmergencyInfo.keyfile
(phosh-mobile-settings:12180): ms-toplevel-tracker-WARNING **: 14:37:15.622: Failed to find 0xffffb298bda0 handle in toplevel tracker
(phosh:10349): phosh-plugin-emergency-info-WARNING **: 14:37:17.413: Failed to load keyfile at '/home/user/.config/phosh/EmergencyInfo.keyfile': No such file or directory