Getting Releasing package lock for MyProject_ArtifactsStore was unsuccessful

Hi team,

I’m getting the error below - I’ve renamed the text of project to “MyProject”.

We’re using Calamari deploys as part of the process (as there are limitations on our server deployments)

Can you please advise what’s happening. It’s only been occurring recently since version 2022.2.x onwards
Current version is Download: 2022.2.7462 - Octopus Deploy. It was working prior to this version (no errors or warnings).

Note: It doesn’t seem to be affecting the actual deployment of the projects (it still deploys to the target environments), but the issue is with the clean up of the package lock / artifacts

Releasing package lock for MyProject_ArtifactsStore. 
July 19th 2022 16:14:41Error
Failed to release package lock for MyProject_ArtifactsStore Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Octopus.Core.Packages.FileNameEscaper.Escape(String input) in ./source/Octopus.Core/Packages/FileNameEscaper.cs:line 27
   at Octopus.Server.Orchestration.Targets.OfflineDrop.OfflineDropBatch.ExecutionDirectory(String tenantName, String environmentName, String projectName, String snapshotIdentifier) in ./source/Octopus.Server/Orchestration/Targets/OfflineDrop/OfflineDropBatch.cs:line 267
   at Octopus.Server.Orchestration.Targets.OfflineDrop.OfflineDropBatch.ExecutionDirectory(IImmutableVariableDictionary variables) in ./source/Octopus.Server/Orchestration/Targets/OfflineDrop/OfflineDropBatch.cs:line 261
   at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionExecution.Deferred.DeferredExecutor.ExecuteCalamari(CalamariFlavour flavour, String calamariCommand, IReadOnlyList`1 calamariArguments, IReadOnlyList`1 files, IReadOnlyList`1 deploymentTools, VariableCollection extraVariables, TargetManifest targetManifest, CalamariPlatformConstraint calamariPlatformConstraint, Nullable`1 mutexTimeout, String mutexName, ITaskLog taskLog) in ./source/Octopus.Server/Orchestration/ServerTasks/Deploy/ActionExecution/Deferred/DeferredExecutor.cs:line 107
   at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionExecution.CommandBuilders.CalamariCommandBuilder.Execute(ITaskLog taskLog) in ./source/Octopus.Server/Orchestration/ServerTasks/Deploy/ActionExecution/CommandBuilders/CalamariCommandBuilder.cs:line 172
   at Octopus.Server.Orchestration.ServerTasks.Deploy.PackageLockReleaser.<>c__DisplayClass3_0.<ReleasePackageLock>b__0(IActionHandlerContext handler) in ./source/Octopus.Server/Orchestration/ServerTasks/Deploy/PackageLockReleaser.cs:line 31
   at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.AdHocActionDispatcher.InvokeActionHandler(Machine target, ActionHandlerInvocation actionHandler, ActionAndTargetScopedVariables actionAndTargetScopedVariables, IExecutor executor, TargetManifest targetManifest, ITaskLog taskLog) in ./source/Octopus.Server/Orchestration/ServerTasks/Deploy/ActionDispatch/AdHocActionDispatcher.cs:line 210
   at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.AdHocActionDispatcher.ExecuteOnDeploymentTarget(DeploymentTarget deploymentTarget, ActionHandlerInvocation actionHandler, TargetManifest targetManifest, ITaskLog taskLog) in ./source/Octopus.Server/Orchestration/ServerTasks/Deploy/ActionDispatch/AdHocActionDispatcher.cs:line 170
   at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.AdHocActionDispatcher.Dispatch(Machine machine, ActionHandlerInvocation actionHandler, ITaskLog taskLog, VariableCollection variables) in ./source/Octopus.Server/Orchestration/ServerTasks/Deploy/ActionDispatch/AdHocActionDispatcher.cs:line 57
   at Octopus.Server.Orchestration.ServerTasks.Deploy.PackageLockReleaser.ReleasePackageLock(Machine machine, String taskId, ITaskLog taskLog) in ./source/Octopus.Server/Orchestration/ServerTasks/Deploy/PackageLockReleaser.cs:line 29
   at Octopus.Server.Orchestration.ServerTasks.Deploy.PackageLockReleaser.TryReleasePackageLock(Machine machine, String taskId, ITaskLog taskLog) in ./source/Octopus.Server/Orchestration/ServerTasks/Deploy/PackageLockReleaser.cs:line 43
Octopus.Server version 2022.2.7336 (2022.2.7336)
July 19th 2022 16:14:41Warning
Releasing package lock for MyProject_ArtifactsStore was unsuccessful 

Hi @kvrampage,

Thanks for getting in touch, and for your report. I’m sorry to see you’re hitting this unexpected issue, but good to hear it’s not affecting the actual deployment. Just a couple days ago we had another report of what looks so far to be the exact same issue with an offline drop deployment. We raised this internally and is currently being investigated. I’ll reach out with any and all updates, and please don’t hesitate to follow up with any questions in the meantime.

Best regards,

Kenny

1 Like

Hi @kvrampage,

Just resurrecting this thread again (my apologies for the delay from my end!) to let you know we have identified and fixed this bug and you can reference the report here.

The fix was included in version 2022.2.7802 and the other reports have stated the issue is fixed after upgrading.

I hope this helps, and please let us know if you are hitting any issues going forward!

Best regards,

Kenny

Thank you, we’ll schedule our Octopus server upgrade soon.
thanks for fixing the bug

1 Like

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