Octo.exe list-latestdeployments throws Argumentnullexception

Hello team!
I want to receive deployment status to start automated tests after the deployment is complete. But I get an error:

Set-Alias Octo “c:\repos\octo\Octo.exe” -scope Script
Octo list-latestdeployments --server https:// --apikey --project= --environment=

Octopus Deploy Command Line Tool, version 4.31.1

Handshaking with Octopus server: https://myocto
Handshake successful. Octopus version: 3.2.4; API version: 3.0.0
Authenticated as: Bamboo Octopus Service Link
Loading projects…
Loading environments…
Loading dashboard…

System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer)
at Octopus.Cli.Commands.Deployment.ListLatestDeploymentsCommand.d__13.MoveNext()

For example - I can successfully get releases ( to check that credentials work):

Set-Alias Octo “c:\repos\octo\Octo.exe” -scope Script
Octo list-releases --server https:// --apikey --project=

Hi,

Thanks for reaching out!

I noticed that you are using a pretty old version of Octopus (3.2.4) and a very recent version of Octo.exe (4.31.1). While we try to maintain a very high level of retrocompatibility with our API, those 2 versions are almost 2 years of development apart from each other, so It makes sense that some things might stop working because of underlying API changes.

The version of the Octopus server you are running was released in July 2015. The closest release of Octo.exe to that date was 3.0.18.71. Perhaps you can try to download that version of Octo.exe and see if that command works against your Octopus server. If it does, at least we’d know the cause of your current issue.

Download link: https://www.nuget.org/packages/OctopusTools/3.0.18.71

Best regards,
Dalmiro

Thank you Dalmiro!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.