[4.5.0.16] Jolla email, browser and calendar no longer start up

The thing you see when starting email or calendar from CLI is normal and expected.

As both of those need privileged permissions, the correct way to start them is

$ devel-su -p jolla-email
$ devel-su -p jolla-calendar

Without those privileges they can’t see their data and hence it appears as if threre were no accounts.

Be careful when installing things from OpenRepos. If they are old, like Hosts Adblock which had its last release in 2016, they might mess up things. I have looked at the package, and it should be harmless. It’s just general advice.

The successor to Hosts Adblock is Defender, which has been updated from the version developer nodevel made, and is now here: Defender II - updated for encrypted devices (originated by nodevel) | OpenRepos.net — Community Repository System

Now all native non-launching apps have the same error message.

[root@XA2Plus nemo]# sailfish-browser %U
error: XDG_RUNTIME_DIR not set in the environment.
[C] unknown:0 - Failed to create display (No such file or directory)
[root@XA2Plus nemo]# 
[root@XA2Plus nemo]# jolla-email
error: XDG_RUNTIME_DIR not set in the environment.
[C] unknown:0 - Failed to create display (No such file or directory)
[root@XA2Plus nemo]# 
[root@XA2Plus nemo]# jolla-calendar
error: XDG_RUNTIME_DIR not set in the environment.
[C] unknown:0 - Failed to create display (No such file or directory)
[root@XA2Plus nemo]# 

And three more have this error.

Here a list of all environment variables:

[root@XA2Plus nemo]# printenv
EGL_PLATFORM=wayland
USER=root
SSH_CLIENT=192.168.1.10 36158 22
EGL_DRIVER=egl_gallium
QT_GSTREAMER_CAMERABIN_FLAGS=15
HOSTNAME=
SHLVL=2
BROWSER=/usr/bin/invoker --type=browser,silica-qt5 -A -- /usr/bin/sailfish-browser
QMLSCENE_DEVICE=customcontext
QT_DF_BASE=0.5
QT_GSTREAMER_PLAYBIN_FLAGS=0
HOME=/root
SSH_TTY=/dev/pts/1
QT_DF_RANGE=0.08
PS1=[\u@\h \W]\$ 
QT_WAYLAND_RESIZE_AFTER_SWAP=1
G_BROKEN_FILENAMES=1
ENV=/usr/libexec/openssh/load_developer_profile
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/100000/dbus/user_bus_socket
QML_FIXED_ANIMATION_STEP=no
QT_WAYLAND_DISABLE_WINDOWDECORATION=1
MOZ_GMP_PATH=/usr/lib/gmp-droid/0.1/
QSG_FIXED_ANIMATION_STEP=no
WAYLAND_DISPLAY=../../display/wayland-0
LOGNAME=nemo
QT_WAYLAND_FORCE_DPI=96
LAST_LOGIN_UID=100000
QT_DF_BASEDEVIATION=0.025
TERM=xterm-256color
QT_MESSAGE_PATTERN=[%{if-debug}D%{endif}%{if-info}I%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}] %{function}:%{line} - %{message}
HISTCONTROL=ignoredups
PATH=/sbin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin
HISTSIZE=1000
LANG=de_DE.utf8
QT_DF_SCALEFORMAXDEV=0.37
QT_GSTREAMER_CAMERABIN_SRC=droidcamsrc
SHELL=/bin/bash
QT_OPENGL_NO_BGRA=1
QT_DF_SCALEFORNODEV=0.6
QT_IM_MODULE=Maliit
PWD=/home/nemo
QT_QPA_PLATFORM=wayland
SSH_CONNECTION=192.168.1.10 36158 192.168.1.12 22
[root@XA2Plus nemo]# 
...thanks for your help.

Strange, you should not be root to run applications. Did you actually use the -p option when running devel-su, as suggested by @nephros ?

devel-su “Program” is a start-up with root rights. For me, it’s the same as running everything directly in the root environment. Is there a difference? Ups, i’ve forgotten the -p Parameter. I make a new return - sorry

[nemo@XA2Plus ~]$ devel-su -p jolla-email
Password: 
Enjoy your privileges.
[D] unknown:0 - Using Wayland-EGL
greHome from GRE_HOME:/usr/bin
libxul.so is not found, in /usr/bin/libxul.so
Created LOG for EmbedLiteTrace
[D] unknown:0 - Messaging :  opening database
Created LOG for EmbedLite
Created LOG for EmbedPrefs
[nemo@XA2Plus ~]$ 

Result: My email account overview page starts on the mobile phone with all accounts.

[nemo@XA2Plus ~]$ devel-su -p jolla-calendar
Password: 
Enjoy your privileges.
[D] unknown:0 - Using Wayland-EGL
[D] unknown:0 - Messaging :  opening database
[D] unknown:0 - Default plugin: account "44" do not have a valid email address
[W] unknown:0 - Default account was not found!
[W] unknown:0 - not loading "NBUID:91f5f94e-2cb8-452e-a0cd-dadfb305afc7:77f5523c-0674-4a49-b1a6-1026d40117e2" "91f5f94e-2cb8-452e-a0cd-dadfb305afc7" (invalidated notebook)
[W] unknown:0 - not loading "NBUID:91f5f94e-2cb8-452e-a0cd-dadfb305afc7:7084d304-7196-457a-a159-7a4e0c7ec177" "91f5f94e-2cb8-452e-a0cd-dadfb305afc7" (invalidated notebook)
[W] unknown:0 - not loading "NBUID:91f5f94e-2cb8-452e-a0cd-dadfb305afc7:41c82fab-9693-4f33-ad32-047e0a943982" "91f5f94e-2cb8-452e-a0cd-dadfb305afc7" (invalidated notebook)
[W] unknown:0 - not loading "NBUID:91f5f94e-2cb8-452e-a0cd-dadfb305afc7:77f5523c-0674-4a49-b1a6-1026d40117e2" "91f5f94e-2cb8-452e-a0cd-dadfb305afc7" (invalidated notebook)
[W] unknown:0 - not loading "NBUID:91f5f94e-2cb8-452e-a0cd-dadfb305afc7:7084d304-7196-457a-a159-7a4e0c7ec177" "91f5f94e-2cb8-452e-a0cd-dadfb305afc7" (invalidated notebook)
[W] unknown:0 - not loading "NBUID:91f5f94e-2cb8-452e-a0cd-dadfb305afc7:41c82fab-9693-4f33-ad32-047e0a943982" "91f5f94e-2cb8-452e-a0cd-dadfb305afc7" (invalidated notebook)
[W] unknown:0 - not loading "NBUID:91f5f94e-2cb8-452e-a0cd-dadfb305afc7:77f5523c-0674-4a49-b1a6-1026d40117e2" "91f5f94e-2cb8-452e-a0cd-dadfb305afc7" (invalidated notebook)
[W] unknown:0 - not loading "NBUID:91f5f94e-2cb8-452e-a0cd-dadfb305afc7:7084d304-7196-457a-a159-7a4e0c7ec177" "91f5f94e-2cb8-452e-a0cd-dadfb305afc7" (invalidated notebook)
[W] unknown:0 - not loading "NBUID:91f5f94e-2cb8-452e-a0cd-dadfb305afc7:41c82fab-9693-4f33-ad32-047e0a943982" "91f5f94e-2cb8-452e-a0cd-dadfb305afc7" (invalidated notebook)
[nemo@XA2Plus ~]$ 

Result: My calendar starts with all its CalDav appointments on the mobile phone

No.

devel-su serves to switch user ID or groups of the user calling it.

Without arguments, it switches to root. With -p, it switches only the groups of the current user, adding the privileged group. This enables the current session to access things like the contacts or accounts databases.

Which is why I wrote privileged, not root permissions.

Soo, your apps do work as expected when run this way, but still do not work when lauched normally (by tapping the icon)?

The first thing I’d try is:

As user:

$ ssu re
$ cat /etc/os-release
$ cat /etc/sailfish-release

And confirm that you’re actually on the correct release.
If any of the versions do not match up do NOT do the below, and do not install or upgrade any packages from anywhere.

If yes, then as root (through plain devel-su :wink: )

# pkcon refresh
# pkcon update

Thanks for the info on the -p argument. Learned something again. And no - they don’t start via gui. I will try your suggestion

Everything looked fine on the first block:

[nemo@XA2Plus ~]$ ssu re
WARNING: ssu.ini does not seem to be writable. Setting values might not work.
Device release is currently: 4.5.0.16
[nemo@XA2Plus ~]$ cat /etc/os-release
NAME="Sailfish OS"
ID=sailfishos
VERSION="4.5.0.16 (Struven ketju)"
VERSION_ID=4.5.0.16
PRETTY_NAME="Sailfish OS 4.5.0.16 (Struven ketju)"
SAILFISH_BUILD=16
SAILFISH_FLAVOUR=release
HOME_URL="https://sailfishos.org/"
[nemo@XA2Plus ~]$ cat /etc/sailfish-release
NAME="Sailfish OS"
ID=sailfishos
VERSION="4.5.0.16 (Struven ketju)"
VERSION_ID=4.5.0.16
PRETTY_NAME="Sailfish OS 4.5.0.16 (Struven ketju)"
SAILFISH_BUILD=16
SAILFISH_FLAVOUR=release
HOME_URL="https://sailfishos.org/"

With the second block (devel-su pkcon refresh performed), I preferred to stop here - should I continue there?

[nemo@XA2Plus ~]$ devel-su pkcon update
Password: 
Updates are retrieved                                              
Ready                                                                         
Software list is updated    
Changes are tested                                                    
Done [ ] (0%)  
The following packages need to be installed:
 sfos-upgrade-3.9.17-release9.noarch Scripts for fail-safe upgrading of SailfishOS at the command line with logging
Continue with changes? [N/y] n

You can go ahead with that update, it should be fine.

BTW, did you use sfos-upgrade to update the system, or did you go via the GUI?

First I renewed the system via GUI 4 days ago (4.4.0.72 → 4.5.0.16).
And yesterday I did an sfos-upgrade --verify, which also installed something (harbour-audio-output 0.3.0+master.20220103211640.1.gd0d5845-1), but did not fix the error.

Now, i have updated the system - but the error is still there.

By the way, there are several native apps that do not start. I’ll list a few (no guarantee of completeness):
sailfish-browser, jolla-email, jolla-gallery, harbour-nofono, harbour-fernschreiber (german native Telegram client), jolla-calendar, harbour-tooter and harbour-filecat.

Can you do a ssu lr and post the output please?

Do all those applicarions start from terminal? If yes, have you checked their coresponding .desktop files?

Here it comes :slight_smile:

[nemo@XA2Plus ~]$ ssu lr
WARNING: ssu.ini does not seem to be writable. Setting values might not work.
Enabled repositories (global): 
 - adaptation-common ... https://releases.jolla.com/releases/4.5.0.16/jolla-hw/adaptation-common/armv7hl/
 - adaptation0       ... https://store-repository.jolla.com/releases/4.5.0.16/jolla-hw/adaptation-qualcomm-sony-nile/armv7hl/
 - aliendalvik       ... https://store-repository.jolla.com/features/4.5.0.16/appsupport/armv7hl/
 - apps              ... https://releases.jolla.com/jolla-apps/4.5.0.16/armv7hl/
 - customer-jolla    ... https://releases.jolla.com/features/4.5.0.16/customers/jolla/armv7hl/
 - hotfixes          ... https://releases.jolla.com/releases/4.5.0.16/hotfixes/armv7hl/
 - jolla             ... https://releases.jolla.com/releases/4.5.0.16/jolla/armv7hl/
 - sailfish-eas      ... https://store-repository.jolla.com/features/4.5.0.16/sailfish-eas/armv7hl/
 - xt9               ... https://store-repository.jolla.com/features/4.5.0.16/xt9/armv7hl/

Enabled repositories (user): 
 - harbour-storeman-obs      ... https://repo.sailfishos.org/obs/home:/olf:/harbour-storeman/4.5.0.16_armv7hl/
 - openrepos-Almindor        ... https://sailfish.openrepos.net/Almindor/personal/main
 - openrepos-BlackSailer     ... https://sailfish.openrepos.net/BlackSailer/personal/main
 - openrepos-Buschtrommel    ... https://sailfish.openrepos.net/Buschtrommel/personal/main
 - openrepos-CoanTeen        ... https://sailfish.openrepos.net/CoanTeen/personal/main
 - openrepos-Karry           ... https://sailfish.openrepos.net/Karry/personal/main
 - openrepos-Mister_Magister ... https://sailfish.openrepos.net/Mister_Magister/personal/main
 - openrepos-NielDK          ... https://sailfish.openrepos.net/NielDK/personal/main
 - openrepos-R1tschY         ... https://sailfish.openrepos.net/R1tschY/personal/main
 - openrepos-Rikudou_Sennin  ... https://sailfish.openrepos.net/Rikudou_Sennin/personal/main
 - openrepos-Schturman       ... https://sailfish.openrepos.net/Schturman/personal/main
 - openrepos-WerkWolf        ... https://sailfish.openrepos.net/WerkWolf/personal/main
 - openrepos-ade             ... https://sailfish.openrepos.net/ade/personal/main
 - openrepos-ahappyhuman     ... https://sailfish.openrepos.net/ahappyhuman/personal/main
 - openrepos-arustg          ... https://sailfish.openrepos.net/arustg/personal/main
 - openrepos-black_sheep_dev ... https://sailfish.openrepos.net/black_sheep_dev/personal/main
 - openrepos-cfr34k          ... https://sailfish.openrepos.net/cfr34k/personal/main
 - openrepos-coderus         ... https://sailfish.openrepos.net/coderus/personal/main
 - openrepos-cy8aer          ... https://sailfish.openrepos.net/cy8aer/personal/main
 - openrepos-direc85         ... https://sailfish.openrepos.net/direc85/personal/main
 - openrepos-dseight         ... https://sailfish.openrepos.net/dseight/personal/main
 - openrepos-eekkelund       ... https://sailfish.openrepos.net/eekkelund/personal/main
 - openrepos-fifr            ... https://sailfish.openrepos.net/fifr/personal/main
 - openrepos-ichthyosaurus   ... https://sailfish.openrepos.net/ichthyosaurus/personal/main
 - openrepos-jobe            ... https://sailfish.openrepos.net/jobe/personal/main
 - openrepos-lal883          ... https://sailfish.openrepos.net/lal883/personal/main
 - openrepos-leppa           ... https://sailfish.openrepos.net/leppa/personal/main
 - openrepos-llelectronics   ... https://sailfish.openrepos.net/llelectronics/personal/main
 - openrepos-lpr             ... https://sailfish.openrepos.net/lpr/personal/main
 - openrepos-miska           ... https://sailfish.openrepos.net/miska/personal/main
 - openrepos-mkiol           ... https://sailfish.openrepos.net/mkiol/personal/main
 - openrepos-molan           ... https://sailfish.openrepos.net/molan/personal/main
 - openrepos-nephros         ... https://sailfish.openrepos.net/nephros/personal/main
 - openrepos-olf             ... https://sailfish.openrepos.net/olf/personal/main
 - openrepos-osetr           ... https://sailfish.openrepos.net/osetr/personal/main
 - openrepos-ovekaaven       ... https://sailfish.openrepos.net/ovekaaven/personal/main
 - openrepos-piggz           ... https://sailfish.openrepos.net/piggz/personal/main
 - openrepos-planetos_store  ... https://sailfish.openrepos.net/planetos_store/personal/main
 - openrepos-rinigus         ... https://sailfish.openrepos.net/rinigus/personal/main
 - openrepos-rubdos          ... https://sailfish.openrepos.net/rubdos/personal/main
 - openrepos-seiichiro0185   ... https://sailfish.openrepos.net/seiichiro0185/personal/main
 - openrepos-soulsource      ... https://sailfish.openrepos.net/soulsource/personal/main
 - openrepos-steffen_f       ... https://sailfish.openrepos.net/steffen_f/personal/main
 - openrepos-szopin          ... https://sailfish.openrepos.net/szopin/personal/main
 - openrepos-tpLabs          ... https://sailfish.openrepos.net/tpLabs/personal/main
 - openrepos-velox           ... https://sailfish.openrepos.net/velox/personal/main
 - sailfishos-chum           ... https://repo.sailfishos.org/obs/sailfishos:/chum/4.5.0.16_armv7hl/
 - store                     ... https://store-repository.jolla.com/h4413/armv7hl/?version=4.5.0.16

Disabled repositories (user): 
 - home ... https://download.jollamobile.com/home:/honeybadger/latest_armv7hl/
[nemo@XA2Plus ~]$ 

So far, I have only been able to start these two apps ([4.5.0.16] Jolla email, browser and calendar no longer start up - #7 by Volker_S) with privileged rights (devel-su -p) using the terminal. I have not tried any others.
The .desktop files actually look good.

I think I have found the error. I just ran the .desktop command in the terminal. And in the output you can see the error:

[nemo@XA2Plus ~]$ /usr/bin/sailjail -p jolla-calendar.desktop /usr/bin/jolla-cal
endar
constructing /run/firejail/mnt/privileged: Accounts,Keys,msyncd,Calendar,Contacts,Images,eas-sailfish ...
mounting /run/firejail/mnt/privileged @ /home/nemo/.local/share/system/privileged
hiding /run/firejail/mnt/privileged
Error fcopy: invalid ownership for file /etc/hosts
Error: failed to run /run/firejail/lib/fcopy, exiting...
Error: proc 18346 cannot sync with peer: unexpected EOF
Peer 18351 unexpectedly exited with status 1

What kind of owner needs the hosts?

devel-su chown -c root:root /etc/hosts

Is it enough like this?

Running the same command as you on my XA2Plus (SFOS 4.5), there is no call to fcopy.
Besides, on my phone, /etc/hotst belongs to root.

Ah, nice, that would explain lots of the failures and matches with the installation and deinstallation of Hosts Adblock which copies around /etc/hosts.

The correct permissions are 0644 root:root /etc/hosts, what is it on your system?

The owner on my system was nemo:nemo. Just changed it to root:root. Now the calendar works again, and I think everything else too. Maybe I’ll have a look at the hosts in the Android directory. Because a few Android apps start a bit slower than usual. Thanks for your help.