'Nancy.Responses.JsonResponse` error

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

Also, not sure if this makes a difference, but running the latest version of Calamari on the tentacles

From Task Log of tentacle upgrade:
Running latest version of Calamari: 3.7.91


Thanks for getting in touch, and I’m sorry to hear you are having these issues.

If you could provide a few more bits of information for me that’d be excellent:

  1. Can you go the Configuration->License and see if you see a message about hitting your license limits?
  2. Could you turn on trace logging on your Octopus server https://octopus.com/docs/reference/log-files#Logfiles-Changingloglevels and send us your server logs once you’ve hit the error again.
  3. Can you check the network traffic in your browser developer tools and check if there are any calls that have failed?

Thank you and best regards,

  1. Unlimited users
  2. Attached last log file
  3. Cannot check at this time

I had to revert back to v. 3.15.2 so I do not have all the info you might want but here is what I have


OctopusServer.txt (178 KB)

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?

Thank you and kind regards,

Sorry , I can do neither due to NDA and limited resources


No problem, thanks for letting us know.

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.

Thank you and best regards,