Unhandled exception at release creation

I am using CircleCI to build my packages, then upload to Octopus and create a release using the Octo CLI. Each build will create a variable number of packages based on the CircleCI workflow, so I am using the --packagesFolder option to base the release off the packages that exist and then have Octopus auto-resolve to existing packages for those that do not exist at release creation time. I see from my CircleCI logs that Octopus is auto-resolving to existing packages for those not present in my packages folder, but then it’s throwing this error:

2020-09-25 10:27:16.1748 1636 155 ERROR Unhandled error on request: http://(server name redacted)/api/Spaces-1/releases?ignoreChannelRules=False 9c972cc8e8bb46ccbf46e26c6f67e8cf by : Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
** at Octopus.Server.Communications.Packages.ReleaseCreation.ReleaseNotesEvaluator.BuildReleaseNotes(IOctopusQueryExecutor queryExecutor, Release release, VariableCollection variables) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Communications\Packages\ReleaseCreation\ReleaseNotesEvaluator.cs:line 22**
** at Octopus.Server.Web.Api.Actions.Releases.EvaluateVariablesInReleaseNotesRule.Apply(Release model, ReleaseResource resource, IOctopusQueryExecutor queryExecutor) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Web\Api\Actions\Releases\EvaluateVariablesInReleaseNotesRule.cs:line 40**
** at Octopus.Server.Web.Api.Actions.Releases.ReleaseCreateResponder.AfterCreateBeforeStore(Release model, ReleaseResource resource, IOctopusRelationalTransaction transaction) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Web\Api\Actions\Releases\ReleaseCreateResponder.cs:line 71**
** at Octopus.Server.Web.Infrastructure.Api.CustomCreateResponder3.ExecuteRegistered() in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Web\Infrastructure\Api\CustomCreateResponder.cs:line 59** ** at Octopus.Server.Web.Infrastructure.Api.Responder1.Respond(TDescriptor options, NancyContext context) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Web\Infrastructure\Api\Responder.cs:line 40**
** at Octopus.Server.Web.Infrastructure.OctopusNancyModule.<>c__DisplayClass14_0.<get_Routes>b__1(Object o, CancellationToken x) in C:\buildAgent\work\abb2fbfce959a439\source\Octopus.Server\Web\Infrastructure\OctopusNancyModule.cs:line 125**
** at Nancy.Routing.Route`1.d__7.MoveNext()**
— End of stack trace from previous location where exception was thrown —
** at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()**
** at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)**
** at Nancy.Routing.DefaultRouteInvoker.d__2.MoveNext()**
— End of stack trace from previous location where exception was thrown —
** at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()**
** at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)**
** at Nancy.Routing.DefaultRequestDispatcher.d__5.MoveNext()**
— End of stack trace from previous location where exception was thrown —
** at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()**
** at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)**
** at Nancy.NancyEngine.d__22.MoveNext()**

My Octopus server is running 2019.13.7. Any advice on how to work around this would be appreciated.

In looking at the nature of the error, it looks like it might have something to do with release notes? If it helps, I am pushing build information for newly created packages that doesn’t exist in the packages which were previously uploaded to Octopus. Is it possible that Octopus doesn’t like that?

Hi @drambo1,

Thanks for reaching out.

Would you be able to send me all of the octo commands youre running in your pipeline as well as the context around the commands? If necessary please send it through private message on the forums here.

Pushing build information shouldn’t be a problem, even if its for an existing package. Would you also be able to send a full output of your build?

Please let me know.

Thanks,
Jeremy

Update for the resolution that was found in private messages for anyone searching on this at a later date:

There was a typo in the build information file: In the commits array, a key was named Comments instead of Comment.

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