Hi, I recently installed Octopus Server (x64, latest) on my Windows 10 workstation, but when I open the Web Portal I get an error:
Cannot create and populate list type System.Collections.Generic.IReadOnlyList`1[Octopus.Core.Model.Spaces.Space]. Path ‘’.
I have tried to repair and uninstall/delete/re-install. I also tried going back to the LTS version, but nothing works.
The error seems to be related to JSON-deserialization, so I checked the [dbo].[Spaces] table in the database and found one (1) row with a JSON column containing {“Description”: null }.
So, what is going on here?
Windows 10 Ent (17763) + Sql Server 2017 (dev ed). Plenty of ram and disk
From the log after starting the service:
…
2019-12-30 12:13:43.2873 5020 13 INFO There are no tasks currently executing on nodes that are missing.
2019-12-30 12:13:43.3033 5020 13 INFO There are no stale worker leases.
2019-12-30 12:13:43.4593 5020 11 ERROR Error when running scheduled task: Octopus.Server.Schedules.RunOnAScheduleAdapter1[Octopus.Server.Schedules.SynchronizeExternalSecurityGroupsForUsers] Newtonsoft.Json.JsonSerializationException: Cannot create and populate list type System.Collections.Generic.IReadOnlyList
1[Octopus.Core.Model.Spaces.Space]. Path ‘’.
ved Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewList(JsonReader reader, JsonArrayContract contract, Boolean& createdFromNonDefaultCreator)
ved Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
ved Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
ved Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
ved Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
ved Octopus.Core.RelationalStorage.Caching.Cloner.Clone[T](T unclonedTable, Boolean rootIsArray) i C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Core\RelationalStorage\Caching\TableCloner.cs:linje 40
ved Octopus.Core.RelationalStorage.Caching.CloningRawFullTableCache.Get[T](IQueryExecutor trn, IEnumerable1 partitions, Func
2 filter) i C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Core\RelationalStorage\Caching\CloningRawFullTableCache.cs:linje 24
ved Octopus.Server.Spaces.SpacesCache.Initialise() i C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Spaces\SpacesCache.cs:linje 35
And after trying to open WebPortal:
…
2019-12-30 12:13:46.6793 5020 5 ERROR Unhandled error on request: http://redacted/api 295f1ef9422b4228848b49ecf7bb617b by : Cannot create and populate list type System.Collections.Generic.IReadOnlyList1[Octopus.Core.Model.Spaces.Space]. Path ''. Newtonsoft.Json.JsonSerializationException: Cannot create and populate list type System.Collections.Generic.IReadOnlyList
1[Octopus.Core.Model.Spaces.Space]. Path ‘’.
ved Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewList(JsonReader reader, JsonArrayContract contract, Boolean& createdFromNonDefaultCreator)
ved Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
ved Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) etc.