Hi. I’m getting a 500 response when I click on the UPDATE AND COMMIT button on a project step for a project under source control.
I just updated to the latest version v2022.3 (Build 10594) just in case it has already been fixed, but to no avail. I got an error on the project screen because I’d deleted one of the branches from BitBucket that this project’s repository had - I don’t know if that’s related to this error.
2022-09-27 14:43:37.0989 2772 26 ERROR Unhandled error on request: "Stack empty."
System.InvalidOperationException: Stack empty.
at System.Collections.Generic.Stack`1.ThrowForEmptyStack()
at Octopus.Core.Features.Projects.ProjectScope.GetProjectPath() in ./source/Octopus.Core/Features/Projects/ProjectScope.cs:line 37
at Octopus.Core.Git.Schema.GitSchemaVersionProvider.LoadProject(CancellationToken cancellationToken) in ./source/Octopus.Core/Git/Schema/GitSchemaVersionProvider.cs:line 132
at Octopus.Core.Git.Schema.GitSchemaVersionProvider.GetProjectLatestSchemaVersion(CancellationToken cancellationToken) in ./source/Octopus.Core/Git/Schema/GitSchemaVersionProvider.cs:line 126
at Octopus.Core.Git.Schema.GitSchemaVersionProvider.LoadSchemaVersions(String verifiedFileNameOrNull, CancellationToken cancellationToken) in ./source/Octopus.Core/Git/Schema/GitSchemaVersionProvider.cs:line 102
at Octopus.Core.Git.Schema.GitSchemaVersionProvider.LoadSchemaVersions(CancellationToken cancellationToken) in ./source/Octopus.Core/Git/Schema/GitSchemaVersionProvider.cs:line 64
at Octopus.Core.Git.Transactions.GitDocumentTransaction.<>c__DisplayClass20_0.<<Commit>b__0>d.MoveNext() in ./source/Octopus.Core/Git/Transactions/GitDocumentTransaction.cs:line 116
--- End of stack trace from previous location ---
at Octopus.Core.Git.Transactions.GitDocumentTransaction.MigrateBeforeExecute[T](Func`1 innerOperation, CancellationToken cancellationToken) in ./source/Octopus.Core/Git/Transactions/GitDocumentTransaction.cs:line 208
at Octopus.Core.Git.Transactions.GitDocumentTransaction.Commit(String message, CommitAuthor author, CommitAuthor committer, CancellationToken cancellationToken) in ./source/Octopus.Core/Git/Transactions/GitDocumentTransaction.cs:line 107
at Octopus.Core.Infrastructure.UnitsOfWork.UnitOfWork.CommitToGit(CancellationToken cancellationToken) in ./source/Octopus.Core/Infrastructure/UnitsOfWork/UnitOfWork.cs:line 177
at Octopus.Core.Infrastructure.UnitsOfWork.UnitOfWork.Complete(CancellationToken cancellationToken) in ./source/Octopus.Core/Infrastructure/UnitsOfWork/UnitOfWork.cs:line 122
at Octopus.NancyOwin.NancyMiddleware.RequestComplete(NancyContext context, IDictionary`2 environment, CancellationToken cancellationToken) in ./source/Octopus.Server/Owin/NancyMiddleware.cs:line 174
at Octopus.NancyOwin.NancyMiddleware.RequestComplete(NancyContext context, IDictionary`2 environment, CancellationToken cancellationToken) in ./source/Octopus.Server/Owin/NancyMiddleware.cs:line 174
at Octopus.NancyOwin.NancyMiddleware.<>c__DisplayClass3_0.<<UseNancy>b__1>d.MoveNext() in ./source/Octopus.Server/Owin/NancyMiddleware.cs:line 110
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Owin.WebSocketAcceptAdapter.<>c__DisplayClass6_0.<<AdaptWebSockets>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Octopus.Server.Web.UnitOfWorkMiddleware.InvokeAsync(HttpContext httpContext, IUnitOfWork unitOfWork) in ./source/Octopus.Server/Web/UnitOfWorkMiddleware.cs:line 47
at Octopus.Server.Web.UnitOfWorkMiddleware.InvokeAsync(HttpContext httpContext, IUnitOfWork unitOfWork) in ./source/Octopus.Server/Web/UnitOfWorkMiddleware.cs:line 47
at Octopus.Server.Web.Middleware.OctopusClientOldVersionWarningMiddleware.InvokeAsync(HttpContext context, IAutomationContext automationContext) in ./source/Octopus.Server/Web/Middleware/OctopusClientOldVersionWarningMiddleware.cs:line 53
at Octopus.Server.Web.Middleware.DynamicContentHeadersMiddleware.InvokeAsync(HttpContext context) in ./source/Octopus.Server/Web/Middleware/DynamicContentHeadersMiddleware.cs:line 49
at Octopus.Server.Web.Middleware.PrivateSpaceToggleMiddleware.InvokeAsync(HttpContext context) in ./source/Octopus.Server/Web/Middleware/PrivateSpaceToggleMiddleware.cs:line 56
at Octopus.Server.Web.Middleware.MaintenanceModeMiddleware.InvokeAsync(HttpContext context) in ./source/Octopus.Server/Web/Middleware/MaintenanceModeMiddleware.cs:line 61
at Octopus.Server.Web.Middleware.OctopusAuthenticationMiddleware.InvokeAsync(HttpContext context, IUserAuthenticator userAuthenticator, IAuthCookieService authCookieService, IWebAuthCache authCache, ILogger logger) in ./source/Octopus.Server/Web/Middleware/OctopusAuthenticationMiddleware.cs:line 57
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Octopus.Server.Web.Middleware.LegacyRequestLoggerMiddleware.InvokeAsync(HttpContext context) in ./source/Octopus.Server/Web/Middleware/LegacyRequestLoggerMiddleware.cs:line 42
at Octopus.Server.Web.Middleware.TelemetryMiddleware.InvokeAsync(HttpContext context) in ./source/Octopus.Server/Web/Middleware/TelemetryMiddleware.cs:line 76
at Octopus.Server.Web.Middleware.ErrorHandlingMiddleware.InvokeAsync(HttpContext context) in ./source/Octopus.Server/Web/Middleware/ErrorHandlingMiddleware.cs:line 98
2022-09-27 14:43:37.0989 2772 26 INFO Request took 1256ms
On the user interface the button shows it’s trying to save then returns to the same as before I clicked it. Dev tools shows the 500 error from /api/Spaces-1/actiontemplates/ActionTemplates-801/actionsUpdate as
{
"ErrorMessage": "Stack empty."
}