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
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
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.
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.