I am getting the following error when I try to deploy
Unable to cast object of type ‘Nancy.Responses.JsonResponse1[Octopus.Core.Resources.DeploymentPreviewResource]' to type 'Nancy.Responses.JsonResponse1[Octopus.Core.Resources.LicenseResource]’.
System.InvalidCastException
at CallSite.Target(Closure , CallSite , TaskCompletionSource`1 , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)
at Nancy.Routing.Route.<>c__DisplayClass4.b__3(Object parameters, CancellationToken context)
This is now happening after I just upgraded to version 3.15.8.
Thanks for the additional information and good to hear you are back up and running. I had a look at the code and can’t see why that error would be shown but I’ll do some more investigations and see if I can determine what is causing it.
Would you be able to take a backup of your DB and share that with us? This way we can troubleshoot the issue easier (as I can’t replicate the issue locally). (We have a secure site for uploading customer files and also a secure way of encrypting your master key so that only we can decrypt it, using PKI).
If not, can you setup a test server with your DB and turn on tracing and send through the logs after you’ve encountered the JsonReader exception for us to investigate?
If you’re in a position to attempt the upgrade again (preferably within the same major.minor version to ensure rollback is easier, i.e. no db backup/restore required) and you experience the same issue again, could you enable trace logging (as per our docs) while getting the error and send us the server logs? This should hopefully give us some idea of what is happening.
My sincere apologies you did have these issues with your upgrade.