Update of self hosted bitwarden fails

Hi

I tried to update my self hosted bitwarden (Version 2024.4.1) install as always by running:
/opt/bitwarden/bitwarden.sh updateself && /opt/bitwarden/bitwarden.sh update

Update failed with all these error messages and install was broken. Rolled back to backup.
This has never happend in the last couple of years…

Status: Downloaded newer image for bitwarden/setup:2024.4.2
docker.io/bitwarden/setup:2024.4.2

Unhandled exception. YamlDotNet.Core.YamlException: (Line: 6, Col: 1, Idx: 193) - (Line: 6, Col: 1, Idx: 193): Exception during deserialization
 ---> System.Runtime.Serialization.SerializationException: Property 'compose_version' not found on type 'Bit.Setup.Configuration'.
   at YamlDotNet.Serialization.TypeInspectors.TypeInspectorSkeleton.GetProperty(Type type, Object container, String name, Boolean ignoreUnmatched)
   at YamlDotNet.Serialization.NodeDeserializers.ObjectNodeDeserializer.YamlDotNet.Serialization.INodeDeserializer.Deserialize(IParser parser, Type expectedType, Func`3 nestedObjectDeserializer, Object& value)
   at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
   --- End of inner exception stack trace ---
   at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
   at YamlDotNet.Serialization.ValueDeserializers.AliasValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
   at YamlDotNet.Serialization.Deserializer.Deserialize(IParser parser, Type type)
   at YamlDotNet.Serialization.Deserializer.Deserialize[T](IParser parser)
   at YamlDotNet.Serialization.Deserializer.Deserialize[T](TextReader input)
   at YamlDotNet.Serialization.Deserializer.Deserialize[T](String input)
   at Bit.Setup.Context.LoadConfiguration() in /home/runner/work/server/server/util/Setup/Context.cs:line 154
   at Bit.Setup.Program.RebuildConfigs() in /home/runner/work/server/server/util/Setup/Program.cs:line 315
   at Bit.Setup.Program.Update() in /home/runner/work/server/server/util/Setup/Program.cs:line 163
   at Bit.Setup.Program.Main(String[] args) in /home/runner/work/server/server/util/Setup/Program.cs:line 57

Help appreciated!

Something is broken in the latest update.

I encountered the same error when upgrading from 2024.3.1. I assume a setup file is missing a variable, but I haven’t identified which it is.

Same exact thing for me. Old version still runs fine but get this exact error everytime I try and update.

I have exactly the same problem:

2024.4.2: Pulling from bitwarden/setup
Digest: sha256:449b99f14e9ec83f70a264dd76a61bee35e53f576361d860e6ba8dc4da367f02
Status: Image is up to date for bitwarden/setup:2024.4.2
docker.io/bitwarden/setup:2024.4.2

Unhandled exception. YamlDotNet.Core.YamlException: (Line: 6, Col: 1, Idx: 193) - (Line: 6, Col: 1, Idx: 193): Exception during deserialization
 ---> System.Runtime.Serialization.SerializationException: Property 'compose_version' not found on type 'Bit.Setup.Configuration'.
   at YamlDotNet.Serialization.TypeInspectors.TypeInspectorSkeleton.GetProperty(Type type, Object container, String name, Boolean ignoreUnmatched)
   at YamlDotNet.Serialization.NodeDeserializers.ObjectNodeDeserializer.YamlDotNet.Serialization.INodeDeserializer.Deserialize(IParser parser, Type expectedType, Func`3 nestedObjectDeserializer, Object& value)
   at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
   --- End of inner exception stack trace ---
   at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
   at YamlDotNet.Serialization.ValueDeserializers.AliasValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
   at YamlDotNet.Serialization.Deserializer.Deserialize(IParser parser, Type type)
   at YamlDotNet.Serialization.Deserializer.Deserialize[T](IParser parser)
   at YamlDotNet.Serialization.Deserializer.Deserialize[T](TextReader input)
   at YamlDotNet.Serialization.Deserializer.Deserialize[T](String input)
   at Bit.Setup.Context.LoadConfiguration() in /home/runner/work/server/server/util/Setup/Context.cs:line 154
   at Bit.Setup.Program.RebuildConfigs() in /home/runner/work/server/server/util/Setup/Program.cs:line 315
   at Bit.Setup.Program.Update() in /home/runner/work/server/server/util/Setup/Program.cs:line 163
   at Bit.Setup.Program.Main(String[] args) in /home/runner/work/server/server/util/Setup/Program.cs:line 57

The issue is tracked at 2024.4.2: System.Runtime.Serialization.SerializationException: Property 'compose_version' not found on type 'Bit.Setup.Configuration'. · Issue #4059 · bitwarden/server · GitHub

Same here, I had to restore a backup and I disabled my automatic update cronjob. I will never auto update again, even though mistakes can happen, this is a rather critical one at that.

You can edit bitwarden.sh and change the version number from 24.4.2 to 24.4.1 to pull the previous version.

Confirmed, changing as had been said in bitwarden github, is working again, with version 24.4.1 but working at least

Thanks

I want a cronjob that updates me only if the release is a week old.

1 Like

Same error here. Now I have to figure out exactly how I am going to roll it back. I have options but what a pain in the butt.

Same error, same resolution, downgraded to 24.4.1 to get it back to work.

The issue has been resolved.

With a ./bitwarden.sh update it is working in the lattest version.

If you changed firts the version in bitwarden.sh you will need to launch ./bitwarden.sh updateself first to update the file again to lattest version.

Just tried to update, but there is still something not right.

b0a0cf830b12: Pull complete 
1919504653f5: Pull complete 
1045f08c42c1: Pull complete 
f5bf012875da: Pull complete 
5f678ea9f2e2: Pull complete 
ed17c50184b1: Pull complete 
857034bf1882: Pull complete 
84a7a4d4c8f6: Pull complete 
a8a07cfff5a2: Pull complete 
986f5e8a9717: Pull complete 
ea1134b602b2: Pull complete 
Digest: sha256:96f9299860ccc5ef9d16ccf59794a55a412cbaeacfbf09c188958e8d37764432
Status: Downloaded newer image for bitwarden/setup:2024.4.2
docker.io/bitwarden/setup:2024.4.2

Building docker environment files.
Building docker environment override files.
Building nginx config.
Building FIDO U2F app id.
Building docker-compose.yml.

ERROR: The Compose file '/xxxxx/bwdata/docker/docker-compose.yml' is invalid because:
Unsupported config option for networks: 'default'
Unsupported config option for services: 'mssql'
ERROR: The Compose file '/xxxxx/bwdata/docker/docker-compose.yml' is invalid because:
Unsupported config option for services: 'admin'
Unsupported config option for networks: 'default'

Reverted to my snapshot, install all linux patches, rebooted, retried, same error.

Edit: I solved the issue by updating docker-compose (Install Compose standalone | Docker Docs)

1 Like

This also was my solution. I thought a standard apt dist-upgrade would do it, but for some reason I had to follow the instructions to curl the new docker-compose and then the bitwarden update worked properly. Thank you!

I was running 2.4.1 on Ubuntu 22.04.4 LTS. I tried doing a ./bitwarden.sh updateself and then ./bitwarden.sh update to upgrade to 2.5.0 which resulted in this error: Unhandled exception. YamlDotNet.Core.YamlException: (Line: 6, Col: 1, Idx: 193)

I noted that on my server the following version were in use:

bitwarden.sh version 2024.5.0
Docker version 26.1.3, build b72abbb
docker-compose version 1.29.2, build unknown

There was talk in another post about the docker-compose version needing to be 2.27.

What ended up working for me was to uninstall docker-compose so that the system relied on docker compose instead.

$ docker-compose version
docker-compose version 1.29.2, ...
$ docker compose version
Docker Compose version v2.27.0
$ sudo apt remove docker-compose
...
Removing docker-compose (1.29.2-1) ...
$ docker-compose version
-bash: /usr/bin/docker-compose: No such file or directory

AND then commenting out compose_version in bwdata/config.yml file

Once I’d removed docker-compose and commented out compose-version, doing a ./bitwarden.sh updateself and then ./bitwarden.sh update allowed the upgrade to 2.5.0 to occur.

On my server the versions are now listed as:

bitwarden.sh version 2024.5.0
Docker version 26.1.3, build b72abbb
Docker Compose version v2.27.0

One thing I noticed was the way Docker Compose v2.27 displays the starting and downloading of the containers differently to Docker-Compose v1.29. They now have timings next to them which never used to be there.

One more quick note:
The reason I deleted docker-compose is because on this post about a related problem, LufoX11 said:

docker-compose-plugin is the replacement for docker-compose binary so, from now on, ./docker-compose will be invoked as docker compose

~# apt remove docker-compose
~# apt install docker-compose-plugin

(My system already had docker-compose-plugin installed.)
So I figured it would be easiest to remove docker-compose altogether and this worked for me.