BitSailor support thread

I suppose, it’s because of this:

[W] unknown:0 - "Collection bitsailor in plugin org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher is owned by a different application"

In the past, this could be resolved by removing the collection from /home/defaultuser/.local/share/system/privileged/Secrets/org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher, but not any more.

i tried the API login too but i also get a “incorrect credentials”. Did you succeed with the bitwarden cli ?

Well, I got it to work again. What I did, was to clean up all installations of bitwarden-cli (there were more than 1, as I fiddled around with it a couple days ago):

devel-su npm uninstall @bitwarden/cli -g

Omit the “-g” flag, if you have an instance installed underneath “defaultuser”. Doesn’t hurt to run the command with and without the -g flag.

Then, I went ahead and installed it again:

devel-su npm install @bitwarden/cli -g

Just to be sure, I linked the “bw” binary from bitwarden-cli to the locations /usr/bin and /usr/local/bin again:

ln -sf /usr/local/bin/node-22.3.0/bin/bw /usr/bin/bw
ln -sf /usr/local/bin/node-22.3.0/bin/bw /usr/local/bin/bw

Afterwards, I was able to log back in using API credentials. It’s all working again. I hope, it’ll stay this way. :sweat_smile:

1 Like

BitSailor had trouble in showing the correct OTP codes here. Xperia 10 III SFOS 4.6.0.15

At first, I wasn’t able to install the app because of npm and node.js are too old for installing bitwarden-cli. Now it works but if I select a TOTP Code the numbers did not refresh and at the most websites the codes did not work. It seems that there is a huge delay in receiving the TOTP code from the servers.

Can anyone confirm that issue?

You don’t receive TOTP codes from servers, part of TOTP is that it gets it’s uniqueness from the current time, but it gets calculated locally on your device.
If most of your TOTP codes don’t work, it’s very likely that your device date or clock is skewed.

1 Like

Date and time, looking good. So the time step value seems not be the issue. I will check this too, if the C2 arrived here. Did anyone use TOTP with BitSailor?

And sorry for the misleading “code from server”.

Have you checked with other clients/webinterface if codes from those match codes generated by BitSailor? Could also be caused by something being wrong with the TOPT secret or settings.

I can’t replicate this on my Xperia 10 III, the codes work.

I also cannot replicate the node.js issues, I’ve got a fresh install of SailfishOS, simply installed BitSailor, went through the setup and all seems to work well.

I found out what seems to be the problem with the TOTP codes, as I faced it too. Indeed it was about the secret. BitSailor only generates a correct code if just the secret is stored in the field. As an example the entry for my Google account, for which the generated verification code works:
████████████████████████████████

And for my Z account, for which BitSailor doesn’t give a correct verification code:
otpauth://totp/Z:█████████████████████?secret=████████████████████████████████&issuer=Z

It can be fixed on the user side @playforvoices by checking your non-working entries and removing that part before and after the secret.

On the developer side @Rikudou_Sennin the problem could be avoided by implementing a parser for otpauth:// URIs, maybe similar to the Android client.

The only case that remains are Steam Guard codes, as they use a different format and are represented in Bitwarden by steam:// followed by the secret. @Rikudou_Sennin you could maybe look at SailOTP or Foil Auth for their implementation, if you plan to have them properly generate in BitSailor.

Thanks for the info! I’ll check it out.

@sourcrowd @avhakola I’ve released an update which correctly parses the TOTP url (thanks again @sourcrowd!).

1 Like

Just a FYI for everyone interested: The new versions have experimental support for local api which speeds BitSailor up a lot. Getting item detail is down from seconds to milliseconds, same with generating a password.

Thank you for this interesting update.

Unfortunately I face an issue when activating the local api : a patch is proposed to maintain the security of bitwarden-cli, but and error states that it is not found when I accept the patch. I believe that is because I followed @NettoHikari’s tips to get BitSailor working by installing bitwarden-cli from terminal (BitSailor support thread - #44 by NettoHikari).

I tried uninstalling bitwarden-cli from terminal, then uninstalling and reinstalling BitSailor, but I get (as I expected) the “There was an error installing the Bitwarden-cli” message when launching the app. Launching from the terminal does not display much more info.

I think about reflashing my phone (10 II) directly to the last version of SFOS as there were several version since I did it, and something might prevent the proper installation of BitSailor (but I did not tweak the phone except to get it working).

Is there anything I can do to get more verbose outputs to help troubleshoot before or instead of reflashing ?

You can try installing it manually in the directory /home/defaultuser/.local/share/harbour-bitsailor/harbour-bitsailor. If there’s any content feel free to remove it (rm -rf *, be careful with this command, make sure you’re in the correct directory).

Then install it using npm install @bitwarden/cli.

That way BitSailor it can modify the installation as it sees fit and it should think it was installed there by BitSailor.

Thanks a lot for the tips!

Running npm install without devel-su did return an error at first because of a needed permission to edit ~/package-lock.json. After deleting this file, the command ran properly and I can now launch BitSailor. I also tested after doing a npm uninstall @bitwarden/cli, and the installation process through the app also works. The culprit was the lock file.

Now I am stuck at the “Authenticating…” step, as it seems old credentials are still set, and the app spins indefinitely without going back to the login page. I tried deleting the harbour-bitsailor directories under ~/.config/ and ~/.cache/, without success. I believe I am missing the location where credentials are stored. Could you please provide any guidance?

You can also try removing harbour-bitsailor under the ~/.local dir.

You might also need to delete these three files:

  • ~/.local/share/system/privileged/Secrets/org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher/bitsailor.db
  • ~/.local/share/system/privileged/Secrets/org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher/bitsailor.db-wal
  • ~/.local/share/system/privileged/Secrets/org.sailfishos.secrets.plugin.encryptedstorage.sqlcipher/bitsailor.db-shm

Note that you need to be root (devel-su) to delete or even list those.

Note that the db-wal and db-shm files might not exist, it’s fine if they don’t.

Argh, thank you again, and sorry.
Thank you for the three databases you mentioned, but they did not exist on my filesystem, I removed the bitsailor dir in ~/.local and I was still stuck.

And sorry for my misunderstanding of your first answer. I first believed running the npm install command while being in the ~/.local/share/harbour-bitsailor/harbour-bitsailor did install bitwarden-cli in the folder, but seeing the node-modules dir, the package-lock.json and package.json files under /home/defaultuser/ seemed that was not the case.

After learning a little on npm, I found the proper way to install bitwarden-cli, I put it here for further reference (for noobs like me) :

# Create a `/node-modules` dir in the `harbour-bitsailor` dir :
mkdir ~/.local/share/harbour-bitsailor/harbour-bitsailor/node-modules

# Then install bitwarden-cli :
npm install --prefix ~/.local/share/harbour-bitsailor/harbour-bitsailor @bitwarden/cli

I could finally start the app properly, connect to my instance, activate the new api, update the cli… and wow that’s way faster than usual !!

Many, many thanks for your fast support !

No problem!

Though that’s not the ideal way to install it, IMO, that way you’re tied to a package.json in your home folder, you should do:

  • cd ~/.local/share/harbour-bitsailor/harbour-bitsailor
  • npm install @bitwarden/cli

Anyway, glad you got it working!