Octo deploy-release: System.NullReferenceException

Trying to facilitate deployment of project releases via the CLI, and getting the following:

Any help/advice here would be appreciated!

Hi @austin.kranz,

Welcome to the community, and thanks for getting in touch over your issue.

I hope you don’t mind, but I was wondering if you could provide us with a little more context around what command you’re running via the CLI, what end goal you’re aiming for, and if you have a task log associated with an attempted release?

The more information you can provide to me, the better I can help address the issue. You can direct message me any logs or other information if you like.

I’m looking forward to hearing back from you!

Best,
Patrick

Hi Patrick,

Thank you for your prompt reply!

I am trying to use octo deply-release to deploy release of a project to an environment. Here is the command I am using:

octo deploy-release --project=“MyProject” --version=latest --deployto=“QA” --progress --space=“Default” --server=“MyOctopusServer” --apiKey=“MyKey

I also exported my project to a JSON file. I have been reviewing the null entries there but nothing sticks out to me.

Thank you,
-Austin K.

Hi Austin,

Thanks for getting back to me and providing those details.

From the error you provided, it looks like the CLI may be timing out while waiting for the deployment to complete, and possibly it’s due to guided failure?

I was wondering what you see in the Octopus web portal if you go to Projects > MyProject > Tasks > (last deployment) > Task Log and review the deployment log there?

You can click ‘Raw’ for more detailed information and ‘Download’ if you’d like to then share this with me via direct message. Let me know what you find.

Best,
Patrick

Hi Patrick,

Thank you for the info! Unfortunately, my attempts to deploy a release via the CLI are not even registering under the Tasks menu.
I don’t think it’s timing out - I get the angry red text almost immediately after running the command.
Here is the output after running the command (server name hidden for privacy):

I exported the project into a JSON file which allows me to see all of the “null” entries. I think Octopus is trying to point to one of these, resulting in the “null-reference” exception…however I am not sure which one as there are a handful of null entries. What do you think?

Thank you,
-Austin K.

Hi Austin,

Thanks for providing those further details, and sorry the suggestion to look in Tasks wasn’t helpful.

Forgive me for asking a few basic questions, but I’d just like to make sure of the following before we dive deeper into troubleshooting:

Does the “MyProject” project create releases and deploy to the QA environment without issue via the Octopus web portal? I’m just wanting to make sure there’s not an issue outside the CLI here.

Given what the CLI is returning, it’s worth checking the specific “Stripe-API Container Image Promotion” version “0.0.47” release. Does this 0.0.47 release successfully deploy to the QA environment via the web portal?

If the release is successful, it might be worth sending me the deployment task log so I can review it as well.

Kind regards,
Patrick

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