Exchange Service crashes immediately after starting

REPRODUCIBILITY: 0% (unknown)
OSVERSION: 4.5.0.24
HARDWARE: Sony Xperia 10 III - xqbt52 - xqbt52 - 1.0.1.23 - aarch64
UI LANGUAGE: Polski (user: pl_PL, os: pl_PL.utf8)
REGRESSION: no

DESCRIPTION:

A few days ago I noticed I no longer could sync any of my Microsoft emails. I checked systemctl --user status sailfish-eas.service, turned out it has failed, I tried restarting it or the phone multiple times, it fails immediately after starting.
I don’t think I did anything unusual to make it fail, I only have 2 emails synced. Only thing I guess could have caused a problem was Microsoft 365 Calendar multiplying where a total of 5 calendars I had got multiplied to several dozen, that could have caused a problem maybe?
After I start it manually with /usr/bin/sailfish-eas I finally get errors that could point to something:

** (process:14090): WARNING **: 12:21:14.602: Cannot create directory: /home/defaultuser/.local/share/system/privileged/Accounts/libaccounts-glib

** (process:14090): WARNING **: 12:21:14.602: Error opening accounts DB: unable to open database file

** (process:14090): WARNING **: 12:21:14.603: Cannot create directory: /home/defaultuser/.local/share/system/privileged/Accounts/libaccounts-glib

** (process:14090): WARNING **: 12:21:14.603: Error opening accounts DB: unable to open database file

** (process:14090): CRITICAL **: 12:21:14.606: ag_manager_list_enabled: assertion 'AG_IS_MANAGER (manager)' failed

(process:14090): GLib-GObject-WARNING **: 12:21:19.859: invalid (NULL) pointer instance

(process:14090): GLib-GObject-CRITICAL **: 12:21:19.859: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(process:14090): GLib-GObject-WARNING **: 12:21:19.859: invalid (NULL) pointer instance

(process:14090): GLib-GObject-CRITICAL **: 12:21:19.859: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(process:14090): GLib-GObject-WARNING **: 12:21:19.859: invalid (NULL) pointer instance

(process:14090): GLib-GObject-CRITICAL **: 12:21:19.859: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(process:14090): GLib-GObject-WARNING **: 12:21:19.859: invalid (NULL) pointer instance

(process:14090): GLib-GObject-CRITICAL **: 12:21:19.859: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(process:14090): GLib-GObject-CRITICAL **: 12:21:19.859: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(process:14090): GLib-GObject-WARNING **: 12:21:19.859: invalid (NULL) pointer instance

(process:14090): GLib-GObject-CRITICAL **: 12:21:19.859: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(process:14090): GLib-GObject-WARNING **: 12:21:19.859: invalid (NULL) pointer instance

(process:14090): GLib-GObject-CRITICAL **: 12:21:19.859: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(process:14090): GLib-GObject-WARNING **: 12:21:19.859: invalid (NULL) pointer instance

(process:14090): GLib-GObject-CRITICAL **: 12:21:19.859: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(process:14090): GLib-GObject-WARNING **: 12:21:19.859: invalid (NULL) pointer instance

(process:14090): GLib-GObject-CRITICAL **: 12:21:19.859: g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(process:14090): GLib-GObject-CRITICAL **: 12:21:19.859: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

What could I do? Deleting exchange accounts and re-adding them could help or not?

STEPS TO REPRODUCE:

  1. Create 2 Exchange accounts
  2. Use the phone for a year
  3. ???

MODIFICATIONS:

  • Patchmanager: yes
  • OpenRepos: yes
  • Chum: yes
  • Other: none specified

ADDITIONAL INFORMATION:

Device Owner User: defaultuser
Home Encryption: enabled


the initial version of this bug report was created using Bugger 0.10.5
1 Like

Or how can I delete the email/Office365 database, so I can start from scratch without the error?
Deleting all the accounts or reinstalling Exchange support does nothing, now I am stuck at “checking server settings” at the end of Office365 account setup.

Really clear bug report. I’m afraid I’m not sure what the problem here might be, but the issue you see when trying to run sailfish-eas manually looks like it could be a permissions issues.

From what you write it’s not clear whether you’re executing the command in privileged mode. If not, would you mind giving it another go like this please?

devel-su /usr/bin/sailfish-eas

(it’ll ask you to enter your credentials).

If you get the same or similar errors with this, it may be worth running the following commands at the terminal and sharing the output here in case it highlights anything strange:

devel-su -p
ls -al /home/defaultuser/.local/share/system/privileged/Accounts/
ls -al /home/defaultuser/.local/share/system/privileged/Accounts/libaccounts-glib/

For comparison, this is what I get:

[defaultuser@kolbe ~]$ ls -al /home/defaultuser/.local/share/system/privileged/Accounts/
total 12
drwxr-xr-x    3 defaultu privileg      4096 May 11  2022 .
drwxrwx---   20 privileg privileg      4096 Oct 22 02:00 ..
drwxr-xr-x    2 defaultu privileg      4096 Oct  4 18:14 libaccounts-glib
[defaultuser@kolbe ~]$ ls -al /home/defaultuser/.local/share/system/privileged/Accounts/libaccounts-glib/
total 4152
drwxr-xr-x    2 defaultu privileg      4096 Oct  4 18:14 .
drwxr-xr-x    3 defaultu privileg      4096 May 11  2022 ..
-rw-r--r--    1 defaultu privileg     81920 Oct 20 23:57 accounts.db
-rw-r--r--    1 defaultu privileg     32768 Oct 22 12:49 accounts.db-shm
-rw-r--r--    1 defaultu privileg   4120032 Oct 22 12:49 accounts.db-wal

If the permissions and ownership on any of these directories or files are different then that could be causing problems, although I’m not sure how that might happen as part of normal operation.

1 Like

Just to add, it would be nice to figure out what’s going wrong, but if you do want to just start from scratch, I’d recommend removing the accounts (Settings > Accounts > Press and hold account > Delete) and recreating it again. This should be safe as long as you don’t have anything stored locally that wasn’t already synced.

1 Like

Im seeing exactly the same issue, on xperia 10 ii,
but on microsoft 365 account.
account login etc is ok, but the local account setup never finishes (the setup vuew spins forever)

Literally and hour ago I gave up and cleared everything, as I missed afew inportant emails already because of it.
So sorry, we are probably not gonna figure out what was wrong.
When I removed Office365 account and tried readding it it didn’t work. Reinstalling Exchange support neither.
Only after I removed all accounts, last one was Exchange outlook.com one, maybe that is related, I could finally add an account successfully.
So now all works just like it used to. I wonder why that was, was it something with an outlook account, duplicated callendars exceeded some limit, or even something else?

Anyways, thanks for help, now it works. Hope it won’t be a too common issue for other users.

So apparently this is a really weird bug.
the service sailfish-eas was crashing and restarted every second; i increased the restart time in the systemd config file to 10, and after a while it eventually added the account, and synched the mails, but only AFTER i added a google account as well…
on top of that i noticed a bunch of sqlite errors in the logs flying by

1 Like

Yes, when running manually it should be like:

devel-su -p /usr/bin/sailfish-eas

Privileged folders are not accessible as a defaultuser.

More information needed.

1 Like