Sailfish Secrets: "Collection X in plugin [...] is owned by a different application"

I’m getting this error when launching an application using sailfish secrets:

 "Collection nextcloudTalk in plugin org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher is owned by a different application"

… and the app (which indeed is “Nextcloud Talk”) will not prompt me with the usual popup about reading accounts/access to sqlcipher, which it previously did.
It then proceeds to run but without secrets can not log into the website API and so can’t function.

What is the meaning of this message, and how do I fix it? I found nothing obvious in the output of secrets-tool.

2 Likes

Did you start it from terminal or via app launcher?

1 Like

I did start it from terminal, but to check why the popup does not appear when started from app launcher.

There is no popup when launched properly, and that is the actual problem.

Well, a reboot solved it.

I discovered Storeman also didn’t ask for sqlcipher permissions, so it was a general problem.

Still would be interested how to resolve it without a reboot.

I believe I was once having a situation where neither app could request the secret (not even the error showed) and i restarted.

What you might try is to restart sailfish-secretsd.service (as defaultuser/nemo, not root, i.e. use --user flag with systemctl).

I have the same Problem. Trying to delete the collection bitsailor

[defaultuser@XQ-BT52 ~]$ devel-su
Password:
[root@XQ-BT52 defaultuser]# secrets-tool --delete-collection org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher bitsailor
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
Error: Sailfish::Secrets::Result::ErrorCode(PermissionsError) “Collection bitsailor is owned by a different application”
[root@XQ-BT52 defaultuser]#

Reboot didn’t solved it unfortunately…

@explit Why exactly are you trying to delete the collection? You also wrote on the BitSailor page but I’m afraid I don’t see the whole picture of what you are trying to do. Are you trying to run BitSailor from command line while previously running it from standard launcher? Can you get the app working either via command line or via the launcher? If so, you can delete all app’s data (including secrets storage) in the app’s settings.

1 Like

Thanks for pinging me back, @Rikudou_Sennin
The problem is, that some Bitsailor has stopped working. I had a normal Bitwarden account, which was secured with a normal SailfishOS Lock code / Fingerprint.
Now when i try to open Bitsailor it tells me i need confirm to open Bitsailor. When i press confirm, nothing happens, the same message appears once again and again and again…

Removing Bitsailor and cleaning all the leftovers didn’t helped. So my idea was to manually delete Bitsailor collection from the secrets Database.

Any chance you’re invoking it differently than before? It seems Sailfish Secrets are very sensitive to how the app owning them is invoked. So if you invoke the app from the launcher, this command is executed:

invoker --type=silica-qt5 --id=harbour-bitsailor --single-instance harbour-bitsailor

Which is different than running harbour-bitsailor on its own.

Is there any chance you changed anything about using invoker? Also try running ps aux | grep bitsailor while having the app open which will show you the exact command that’s used to open BitSailor. If it’s different from the one I posted, that’s most likely the problem and we may try to figure out how it happened. Let me know what you find out.

1 Like

This is, what is running, when i start the bitsailor from the icon:

[defaultuser@XQ-BT52 ~]$ ps aux | grep bitsailor
default+  9352  0.0  0.0   7804  1736 ?        S    23:53   0:00 invoker --type=silica-qt5 --id=harbour-bitsailor --single-instance harbour-bitsailor
default+ 10797  0.0  0.0   3432   892 pts/1    S+   23:54   0:00 grep bitsailor
default+ 25821  0.0  1.2 766552 70404 ?        SNsl 14:17   0:04 /usr/bin/harbour-bitsailor
[defaultuser@XQ-BT52 ~]$

And this what happens in the UI.

First message:

After i press the Confirm button couple of times:

The last message hangs forever keeping asking me to confirm the access

That seems like some bug in Sailfish Secrets. Does Storeman work for you? They use secrets as well IIRC. Anyway, I think you’re gonna have to wait for someone more qualified than I am.

1 Like

Storeman works. But the same Problem i have with Sailtrix Secret. The best solution IMHO would be just delete Sailtrix and bitsailor collections. But i didnt find how i can do it now…

Chalk me up for much the same problem.

While I have no app at the moment which uses Secrets, I started a a R&D/playground app to get familiar with it, but now I have saved some random test credentials stored and cannot get rid of them.

I have also found that Secrets seems to use something like the hash of the launch command line to identify the application, so slight differences in calling it make the credentials inaccessible. Sailjail adds complexity to this, but disabling it does not really improve the underlying issue.

For Sailtrix, have a look on this issue: Error during login: Cannot create secret collection (#26) · Issues · Sailtrix / Sailtrix · GitLab

TL;DR: Files are stored at /home/defaultuser/.local/share/system/privileged/Secrets/org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher

1 Like

Thanks @pherjung ! I could delete bitsailor files from /home/defaultuser/.local/share/system/privileged/Secrets/org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher
uninstalled bitsailor, installed again. Now it works. Thanks guys for your help!

Sorry for “necrobumping” this, but I ran into the same problem with BitSailor after the recent Sailfish OS update.

Resetting everything from within BitSailor doesn’t work, deleting the collection manually doesn’t work either. Also tried uninstalling and reinstalling, etc.

I’m kinda sad about this, because I made BitSailor work again after it refused to download the latest bitwarden-cli (installed the latest NodeJS for that) and now, it’s broken in a different way.