Synology: Solve Bitwarden this.subtle is null Error

Synology Solve Bitwarden this.subtle is null Error

When I tried to use the Bitwarden login portal on my Synology NAS, I encountered an issue. After I typed in my credentials, I got an error message that said “An error has occurred. this.subtle is null“. After some research I discovered that it was something related to my browser (Firefox) which changed some API. This was confirmed by the web vault author.

this-subtle-error

The only way to access the vault was to switch to HTTPS. Just to be clear, I used the manager anyway through the Firefox extension which allowed me to operate normally. Synchronization between my phone and the web interface was somehow broken. So, what did I do? As always, I did some research first which can be summarized in the following steps:

  1. Access your Docker and stop the container.
  2. Login through SSH and obtain root access (sudo su -)
  3. Run this command: docker exec -it bitwarden bash – this will let you enter the docker container and explore its files.
  4. Create a folder named “ssl” (if it does not exist) in the main path of your docker container.
  5. cd to that directory and run the next command: openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes – this will create the key and cert files needed for the process.
  6. Once created, go to your Synology and in Docker – Container – bitwarden – Environment variable add a new variable called ROCKET_TLS and, on value, add this value {certs="ssl/cert.pem",key="ssl/key.pem"} as suggested on GitHub Enabling HTTPS
  7. Start your container.
  8. Go to your web vault login page using https instead of http – it should show you a warning page – go ahead.

This is all you need to do to solve the error An error has occurred. this.subtle is null on your Synology NAS. I recently discovered that these steps have to be done after every container update.

Note: Solution by Lucian Sipos

This post was updated on Thursday / February 25th, 2021 at 12:53 AM