Unable to create release using a specific channel

HI,

I have created a channel with tag ^$, which allows to stop deploying pre-release packages to mock and prod(I left the version range blank). I am able to create releases using octopus gui for this channel without any issue but getting below error when I tried to create-release from Teamcity. We are using octopus 3.2.3 version…do we need to specify the range?..If we can create a release from gui, we should able to do it from octo.exe right?

[13:35:53]i: TeamCity server version is 9.1.3 (build 37176)
[13:35:53]E: bt1289 (1m:10s)
[13:35:54] : Skip checking for changes - there are no VCS roots defined
[13:35:54]i: Waiting for the agent to start the build
[13:35:54]i: Agent time zone: America/New_York
[13:35:51]i: Agent is running under JRE: 1.8.0_45-b14
[13:36:20] : Clearing temporary directory: D:\AGT06\temp\buildTmp
[13:36:50] : Publishing internal artifacts (2s)
[13:36:53] :	 [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[13:36:53] :	 [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[13:36:50] : Checkout directory: D:\AGT06\work\cfa0510e5399a0da
[13:36:50] : Build preparation done
[13:36:50]E: Step 1/2: Create release (OctopusDeploy: Create release) (7s)
[13:36:51]i:	 [Step 1/2] ##teamcity[buildStatisticValue key='buildStageDuration:firstStepPreparation' value='30926.0']
[13:36:51]i:	 [Step 1/2] ##teamcity[buildStatisticValue key='buildStageDuration:buildStepRUNNER_173' value='0.0']
[13:36:51] :	 [Step 1/2] Octopus Deploy (6s)
[13:36:51] :		 [Octopus Deploy] Running command:   octo.exe create-release --server http://testoctopus.org --apikey SECRET --project xxx --enableservicemessages --version 1.0.0 --channel Default
[13:36:51] :		 [Octopus Deploy] Creating Octopus Deploy release
[13:36:53] :		 [Octopus Deploy] Octopus Deploy Command Line Tool, version 3.2.0.97
[13:36:53] :		 [Octopus Deploy] 
[13:36:54] :		 [Octopus Deploy] Handshaking with Octopus server: http://testoctopus.org
[13:36:57] :		 [Octopus Deploy] Handshake successful. Octopus version: 3.2.3; API version: 3.0.0
[13:36:57] :		 [Octopus Deploy] Authenticated as: 
[13:36:57] :		 [Octopus Deploy] Finding project: xxx
[13:36:57] :		 [Octopus Deploy] Finding channel
[13:36:57] :		 [Octopus Deploy] Finding deployment process for project: xxx
[13:36:58] :		 [Octopus Deploy] Finding release template...
[13:36:58] :		 [Octopus Deploy] Resolving NuGet package versions...
[13:36:58] :		 [Octopus Deploy] Finding latest NuGet package for step: Contracts
[13:36:58] :		 [Octopus Deploy] Error from Octopus server (HTTP 400): There was a problem with your request.
[13:36:58] :		 [Octopus Deploy] 
[13:36:58] :		 [Octopus Deploy]  - The 'versionRange' parameter was not a valid NuGet version-range (see http://g.octopushq.com/NuGetVersioning)
[13:36:58] :		 [Octopus Deploy] 
[13:36:58] :		 [Octopus Deploy] Exit code: -7
[13:36:58] :		 [Octopus Deploy] Octo.exe exit code: -7
[13:36:58] :	 [Step 1/2] Unable to create or deploy release. Please check the build log for details on the error.
[13:36:58]i:	 [Step 1/2] ##teamcity[buildStatisticValue key='buildStageDuration:buildStepRUNNER_173' value='7298.0']
[13:36:58]E:	 [Step 1/2] Step Create release (OctopusDeploy: Create release) failed
[13:36:58] : Step 2/2: Deploy Release (OctopusDeploy: Deploy release)
[13:36:58] :	 [Step 2/2] Disabled build step Deploy Release (OctopusDeploy: Deploy release) is skipped
[13:36:59]i: ##teamcity[buildStatisticValue key='buildStageDuration:buildFinishing' value='246.0']
[13:36:59] : Publishing internal artifacts
[13:36:59] :	 [Publishing internal artifacts] Publishing 1 file using [ArtifactsCachePublisher]
[13:36:59] :	 [Publishing internal artifacts] Publishing 1 file using [WebPublisher]
[13:37:00]i: ##teamcity[buildStatisticValue key='buildStageDuration:artifactsPublishing' value='1927.0']
[13:37:03] : Build finished

Hi!

Thanks for getting in touch. You’re right, if you can create a Release from the GUI, it uses the same API as octo.exe, but it looks to me like there’s a bug in the way octo.exe builds its final request.

I’ll see if I can reproduce this issue tomorrow and log a bug if so. In the meantime you could take a look at the HTTP traffic in Fiddler/DevTools and see if there’s any difference between the two related requests.

Hope that helps!
Mike

Hi!

I’ve been able to reproduce this bug and have raised a GitHub Issue for it. This should ship as part of Octopus 3.2.4.

In the meantime you can omit the --channel=Default argument as a workaround.

Hope this helps.
Mike

Thank you Mike !!