After upgrading from 2018.5.7 to 2019.12.8, I see this error on the Dashboard.
Cannot query the permissions system with null ids
I also see this error on the “Overview” page for individual projects, and the “Deploy release” page.
Everything else seems to work OK (so far)
Any ideas?
edit: There is a detailed error in the log:
Unhandled error on request: http://{redacted}:8051/api/Spaces-1/dashboard?highestLatestVersionPerProjectAndEnvironment=true 627c0f8e03a544f9adf67b045548169a by <anonymous> : Cannot query the permissions system with null ids. System.InvalidOperationException: Cannot query the permissions system with null ids.
at Octopus.Core.Model.Users.PermissionsQueryScopesDefinition.ScopeDefinition`1.AddDocumentIds(String[] newDocumentIds) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Core\Model\Users\PermissionsQueryBuilder.cs:line 243
at Octopus.Core.Model.Users.PermissionsQueryScopesDefinition.SetTenantScope(Func`2 getNewScopeDefinition) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Core\Model\Users\PermissionsQueryBuilder.cs:line 180
at Octopus.Core.Model.Users.PermissionsQueryBuilderWithScope.WithScope(Func`2 getNewScopeDefinition) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Core\Model\Users\PermissionsQueryBuilder.cs:line 126
at Octopus.Server.Web.Infrastructure.Security.DocumentRestrictions.RestrictionValidation.<>c__DisplayClass5_2.<CheckPermission>g__ApplyScope|8(PermissionsScopeQueryBuilder builder, PermissionScopeType scopeType) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Server\Web\Infrastructure\Security\DocumentRestrictions\RestrictionValidation.cs:line 99
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
at Octopus.Server.Web.Infrastructure.Security.DocumentRestrictions.RestrictionValidation.CheckPermission(Boolean anyPermutation, ISpacePartitionPrincipal principal, IValidatePermission validatePermission, ScopedValue`1[] multiValues, ScopedValue`1[] singleValues) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Server\Web\Infrastructure\Security\DocumentRestrictions\RestrictionValidation.cs:line 74
at Octopus.Server.Web.Infrastructure.Security.DocumentRestrictions.ModelAuthorizer.<>c__DisplayClass3_0.<IsAuthorisedForRead>b__0(RestrictionValidation v) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Server\Web\Infrastructure\Security\DocumentRestrictions\ModelAuthorizer.cs:line 26
at Octopus.Server.Web.Infrastructure.Security.DocumentRestrictions.ModelAuthorizer.<>c__DisplayClass8_0.<ValidateAuthorizedForModel>b__0(Permission p) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Server\Web\Infrastructure\Security\DocumentRestrictions\ModelAuthorizer.cs:line 69
at Octopus.Core.Resources.PermissionValidator.MatchType[T](Func`1 noneHandler, Func`1 runSystemHandler, Func`2 permissionHandler) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Core\Resources\PermissionValidator.cs:line 80
at Octopus.Server.Web.Infrastructure.Security.DocumentRestrictions.SpacePartitionConventionalRestriction`1.ScopeRestrictionCanViewFilters.ShouldInclude(TModel model, ISpacePartitionPrincipal principal, IOctopusQueryExecutor queryExecutor) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Server\Web\Infrastructure\Security\DocumentRestrictions\SpacePartitionConventionalRestriction.cs:line 90
at Octopus.Server.Web.Infrastructure.Security.AccessChecker`1.<>c__DisplayClass20_0.<CanViewInternal>b__0() in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Server\Web\Infrastructure\Security\AccessChecker.cs:line 197
at Octopus.Server.Web.Api.Components.DashboardBuilder.<>c__DisplayClass23_0.<FilterBasedOnPermissions>b__5(DashboardItem i) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Server\Web\Api\Components\DashboardBuilder.cs:line 354
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Octopus.Server.Web.Api.Components.DashboardBuilder.CreateDashboard(DashboardData filteredDashboardData) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Server\Web\Api\Components\DashboardBuilder.cs:line 202
at Octopus.Server.Web.Api.Components.DashboardBuilder.BuildDashboard(DashboardConfiguration configuration, IOctopusQueryExecutor queryExecutor, TenantTagMatcher tenantTagMatcher, Boolean highestLatestVersionPerProjectAndEnvironment) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Server\Web\Api\Components\DashboardBuilder.cs:line 82
at Octopus.Server.Web.Api.Actions.DashboardViewAction.<>c__DisplayClass7_0.<BuildDashboard>b__0() in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Server\Web\Api\Actions\DashboardViewAction.cs:line 76
at Octopus.Server.Web.Api.Rules.DataVersionCacheRule.Execute(Request request, IOctopusQueryExecutor queryExecutor, Func`1 doExecute) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Server\Web\Api\Rules\DataVersionCacheRule.cs:line 40
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at Octopus.Server.Web.Api.Actions.DashboardViewAction.ExecuteRegistered() in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Server\Web\Api\Actions\DashboardViewAction.cs:line 41
at Octopus.Server.Web.Infrastructure.Api.CustomResponder`1.Respond(TDescriptor options, NancyContext context) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Server\Web\Infrastructure\Api\CustomResponder.cs:line 297
at Octopus.Server.Web.Infrastructure.OctopusNancyModule.<>c__DisplayClass14_0.<get_Routes>b__1(Object o, CancellationToken x) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Server\Web\Infrastructure\OctopusNancyModule.cs:line 125
at Nancy.Routing.Route`1.<Invoke>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.<Invoke>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.<Dispatch>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.<InvokeRequestLifeCycle>d__22.MoveNext()