How can I manually remove a notification that won't go away?

I logged a bug report here Unable to Delete Notification for an issue where I created a Onedrive account. The process gave me a notification that I needed to re-login - which I did successfully - but the account notification did not go away. Its still there 2 months later on the events screen and it is not possible to remove it through the Sailfish UI (see bug report).

Ok, so its not the end of the world, but it is irritating. Can I remove it manually be deleting an entry in some config or cache file somewhere? If so, how please?

1 Like

Maybe there is an easier way, but I had the same and did it like this:

$ devel-su # type the password
# prompt will be actually # but have no idea how not to make it not be a comment :)
$ sqlite3 /home/nemo/.local/share/system/privileged/Notifications/notifications.db
sqlite> select * from notifications where app_name = 'Accounts';
# see the first value (it's the <ID>). 
# Most probably you have the only one row. if not check the correct one.
# In the following statement change <ID> with the value from the result of previous statement.
sqlite> update hints set value = 1 where id = <ID> and hint='x-nemo-user-removable';
sqlite> .q

Then restart your home screen via ā€œSettings -> Utilities -> Restart home streen ā€¦ā€ (hope you have those installed)

After that I was able to delete that notification as any other (with clear all)

-Alex

4 Likes

Alex, thanks for this. I tried but didnā€™t have devel-su installed so it didnā€™t work. I tried su and that was installed but I didnā€™t have a root password, so a bit stuck. After a bit of searching I realised I had to enable developer mode (which installed both devel-su and gave me the opportunity to set a root password), but now Iā€™m stuck with sqlite3 not being found - presumably not installed either. How do I get this on the phone, or enable it if it is already there?

I think simple

$ devel-su
$ pkcon install sqlite

should get you sqlite3

maybe you need pkcon refresh before install

Ok, so got sqlite package installed and fired it up as root. Found the entry in the DB - as you said it was the only one, with an ID of 79. Only difference from your instructions above was I didnā€™t have a ā€˜nemoā€™ directory - mine appeared to be ā€˜defaultuserā€™ - maybe coz iā€™m on sf 4?.

anyway followed the rest of your instructions - made the change, quit sqlite and restarted the home screen using the SF utilities in settings. Sadly, when it came back the notification was still there and still couldnā€™t be deleted. Any ideas?

I have nemo because I was always updating my OS, never fresh install. So defaultuser should be correct.

you can run select * from hints where id = 79; in sqlite to se what is actually there for you.
To see if actually x-nemo-user-removable hint is there.

Alex, Did as you suggested and the removable hint is there and it is set to 1 (ā€˜trueā€™ I assume). Anyway, went through the whole process again just to make sure I hadnā€™t made a mistake the first time around, but sadly it didnā€™t work after the second time either after restarting the home screen. Got a bit frustrated so decided to try a reboot of the phone - and, yay, this worked - the notification could now be selected and removed. So big thanks for all your help on this. Steve.

1 Like

Thanks for the trick. Works (XA2 singleSim, 4.3 with licence).

But when I reboot, the un-deletable voicemail notification comes back and is read-only again.
Something else I could modify?

thank you Alex!
it worked like a charm on Sailfish 4.6 version (xperia 10 III)