Message app not working (Syncing messages)

Hi, my Message app (QKSMS) v3.7.10 is not working. When I start it, it displays a progress bar with the status “Syncing messages…” and it stays so forever.
SMS do not arrive and cannot be sent.
In the Settings page under “Sync messages” the progress is running and I can see the text “Re-sync your messages with the native Android SMS database”.

This looks like a duplicate of issue Message app not working but the solution proposed there does not work. I have checked my APN settings and they are correct.

I also compiled QKSMS v. 3.6.0 and master from the git repository. The behavior is the same.
Installing the official QKSMS from the App store also does not help - still the same behavior.

This is a deal breaker. Without SMS I cannot use /e/ on my phone. Any help is appreciated greatly.

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

Hi, and welcome :slight_smile:

You may be facing a corrupt messages database :frowning:

At first, you can try to back it up using for example SMS Backup & Restore (ads can be disabled in settings).

Could you please share your device name, Android version, /e/ version ?

Hi smu44,

Thanks for your response.
It is a plain new /e/ installation, assumingly the message database should be empty and there should be nothing to import.
Trying the message app without a SIM card does not make any difference.
Putting the SIM card, rebooting and trying again - same behavior.

Device name: oneplus2
Android: 10
/e/ version 0.19-q-20211027142973-dev-oneplus2
LineageOS API: llama (9)
Kernel version: 3.10.108-perf+, Oct 27 2021, 05:49:16
Build date: Oct 27 2021, 05:45:03

I tried SMS Backup & Restore, but the backup failed. Here is the error:

Backup failed
An error has occurred during backup: Database error - try restarting your phone or wiping your ROMCan’t downgrade database from version 69 to version 68

Do I understand correctly that my message DB is somehow too high a version and the apps do not understand it yet? Should I try /e/ Pie maybe?

Let me check that, will take some time …

OK thanks. I think it might have something to do with this issue: android - Can't downgrade database from version `n` to `n-1` on Samsung - Stack Overflow

I think this is shown by SQLite when trying to open a higher than the maximum supported version of a DB. My assumption is: system message Database is version 69 and the Message app supports up to version 68 so it can’t open the DB.
Let me know if I should test something, I have cloned the App source from here: e / apps / Message · GitLab and I can compile it with Gradle.

Let’s try something not involving a compiler :wink:

  • enable Developer mode, then root ADB
  • in a adb root shell :
    sqlite3 /data/user/0/
    PRAGMA user_version=68;
  • reboot

The file does not exist on the device:

% ~/Android/Sdk/platform-tools/adb shell
~ # ls /data/user/0/
ls: /data/user/0/ No such file or directory
~ # ls /data/user/0/
ls: /data/user/0/ No such file or directory
~ # ls /data/user/0/
cache       code_cache

Also, I have an (almost) identical device with the same /e/ version where Message app works properly. The mmssms.db file does not exist there either (output is identical as above).

Argh ! One more file which is hiding from us :frowning:

Let’s try find /data -name "*sms*db" (you can ignore the foundation.e.esmssync).

Edit : maybe just change /user/ to /user_de/ ?

BTW, reference for SQLite database version : Pragma statements supported by SQLite

I found the file and executed the sqlite3 change. Now the Message app starts successfully, but sending SMS messages fails: “Message to +49… failed to send”
I recorded the log via “logcat” at the moment of SMS sending. The relevant log lines can be found here:

Did you reboot your phone ?

If you did, one reason I can find is that your database is definitively corrupt :frowning:
In this case, better recreate it. To do that :

  • reboot to recovery (I hope you have TWRP or OrangeFox)
  • launch ADB shell, then locate your database file and delete it with it’s journal file (can also be done with TWRP integrated File Manager)
  • reboot to system

Also, I’ve seen some Russian characters in your log, let’s hope we don’t have a bug with that … :face_with_raised_eyebrow:

1 Like

Deleting the two files /data/user_de/0/ and /data/user_de/0/ resulted in fixing the problem. Thank you for your help!

I cannot explain how the database got corrupted and how to reproduce it. As written, another identical device did not have the issue.

1 Like

Good news ! :smiley_cat:

However I agree with you, it’s strange …
Maybe some third-party app has upgraded the database on your behalf ?
Or was it left behind by a previous ROM ?
The essential fact is that it works now :slight_smile:

1 Like

I have QKSMS on my phone, and 3.9.4 is the version I am running and the version recommended by F-Droid. Versions 3.7.10 was added to F-Droid on 10/12/2019 so it is nearly two years old.

Hi folks,
thank you for sharing the knowledge, I’ll try to fix this issue as well. Just to let you know, I am having the same problem one the Oneplus 2 on /e/OS 1.5-20221031230909, the message app never worked from the very beginning.

Error message is
!android.database.sqlite.SQLiteException: Can’t downgrade database from version 69 to 68.

I repeated the steps and got it working, Kudos!!

1 Like

Very nice. Good that recreating the message database is all you need!