The document ID n doesn't have a dash!

I can’t access my dashboard anymore. I get “The document ID n doesn’t have a dash!”. This error prevents the Projects menu from loading anything other than “All”.

The only way I can access projects now is by clicking on Projects->All and finding it from that page.

I upgraded to 3.3.4 last week so I’m assuming this is related. I was previously using 3.3.3 but was unable to clone any of my projects so I upgraded to 3.3.4 and now this. One bug replaced with another.

Please fix!

Thanks,

Dave

Hi Dave,

I’ve been replying to your emails, but apparently they are not coming through (see attached image). Our email system seems to be working just fine, as i’ve been having conversations with other users for the past 2hs. Maybe a rogue spam filter?

Is this happening only in the dashboard? Could you please browse /api/dashboard and send the full JSON on a text file?

Regards,
Dalmiro

I’ll check my Spam, not sure.

Below is what I get hitting /api/dashboard

[Octoclippy is here to help!]
Sorry, something went wrong
The document ID n doesn’t have a dash!
{
“ErrorMessage”: “The document ID n doesn’t have a dash!”,
“FullException”: “Octopus.Client.Model.DocumentIdFormatException: The document ID n doesn’t have a dash!\r\n at Octopus.Client.Model.DocumentIdParser.Split(String documentId, String& groupPrefix, String& identitySuffix) in Y:\work\refs\tags\3.3.4\source\Octopus.Client\Model\DocumentIdParser.cs:line 9\r\n at Octopus.Shared.Security.Permissions.AuthorizationScopeAssertion…ctor(String scopeDocumentId) in Y:\work\refs\tags\3.3.4\source\Octopus.Shared\Security\Permissions\AuthorizationScopeAssertion.cs:line 16\r\n at Octopus.Shared.Security.Permissions.AuthorizationRequest…ctor(IEnumerable1 regardingDocumentIds) in Y:\\work\\refs\\tags\\3.3.4\\source\\Octopus.Shared\\Security\\Permissions\\AuthorizationRequest.cs:line 16\r\n at Octopus.Server.Web.Infrastructure.Security.OctopusPrincipal.CreateAuthorizationRequest(String[] documentIds) in Y:\\work\\refs\\tags\\3.3.4\\source\\Octopus.Server\\Web\\Infrastructure\\Security\\OctopusPrincipal.cs:line 147\r\n at Octopus.Server.Web.Infrastructure.Security.OctopusPrincipal.IsAuthorizedFor(Permission permission, String[] documentIds) in Y:\\work\\refs\\tags\\3.3.4\\source\\Octopus.Server\\Web\\Infrastructure\\Security\\OctopusPrincipal.cs:line 152\r\n at Octopus.Server.Web.Api.Components.DashboardBuilder.<>c__DisplayClass17_0.<RemoveThingsThisUserCannotSee>b__1(DashboardProjectResource p) in Y:\\work\\refs\\tags\\3.3.4\\source\\Octopus.Server\\Web\\Api\\Components\\DashboardBuilder.cs:line 230\r\n at Octopus.Shared.Util.ListExtensions.RemoveWhere[TElement](IList1 source, Func2 remove) in Y:\\work\\refs\\tags\\3.3.4\\source\\Octopus.Shared\\Util\\ListExtensions.cs:line 20\r\n at Octopus.Server.Web.Api.Components.DashboardBuilder.RemoveThingsThisUserCannotSee(DashboardResource dashboard, IOctopusPrincipal principal) in Y:\\work\\refs\\tags\\3.3.4\\source\\Octopus.Server\\Web\\Api\\Components\\DashboardBuilder.cs:line 230\r\n at Octopus.Server.Web.Api.Components.DashboardBuilder.BuildDashboard(DashboardConfiguration configuration, IOctopusPrincipal principal) in Y:\\work\\refs\\tags\\3.3.4\\source\\Octopus.Server\\Web\\Api\\Components\\DashboardBuilder.cs:line 60\r\n at Octopus.Server.Web.Api.Actions.DashboardViewAction.Execute() in Y:\\work\\refs\\tags\\3.3.4\\source\\Octopus.Server\\Web\\Api\\Actions\\DashboardViewAction.cs:line 28\r\n at Octopus.Server.Web.Infrastructure.Api.Responder1.Respond(TDescriptor options, NancyContext context) in Y:\work\refs\tags\3.3.4\source\Octopus.Server\Web\Infrastructure\Api\Responder.cs:line 162\r\n at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)\r\n at CallSite.Target(Closure , CallSite , Object , Object , NancyContext )\r\n at Octopus.Server.Web.Api.OctopusRestApiModule.<>c__DisplayClass0_0.<.ctor>b__0(Object o) in Y:\work\refs\tags\3.3.4\source\Octopus.Server\Web\Api\OctopusRestApiModule.cs:line 46\r\n at CallSite.Target(Closure , CallSite , Func`2 , Object )\r\n at Nancy.Routing.Route.<>c__DisplayClass4.b__3(Object parameters, CancellationToken context)”
}

image001.png

Hi Dave,

If you run the below query, do you get any documents that don’t have a dash in them?

select * from Project
where Id not like '%-%'

select * from ProjectGroup
where Id not like '%-%'

select * from DeploymentEnvironment
where Id not like '%-%'

select * from Deployment
where Id not like '%-%'

Yes, there is one record. The id is “n”

Could you send me the content of the JSON column of the record with the ‘n’ ID?

select * from Project
where Id = 'n'

select * from ProjectGroup
where Id = 'n'

select * from DeploymentEnvironment
where Id = 'n'

select * from Deployment
where Id = 'n'

I made the conversation private so only you and our staff can see its contents

{“Description”:"",“IncludedLibraryVariableSetIds”:[“LibraryVariableSets-81”],“UsedPackages”:[“ProviderMatching”],“DefaultToSkipIfAlreadyInstalled”:false,“VersioningStrategy”:{“DonorPackageStepId”:“08a92792-18e4-4927-95d0-4f6acd43a10a”,“Template”:null},“ReleaseCreationStrategy”:{“ReleaseCreationPackageStepId”:"",“ChannelId”:null}}

Can you send all the columns + data of that entry? That should be my last request to build a query to fix this.

As below, although the name and slug columns have been updated since this is being posted in a forum.

Thanks,

Dave

n XYZ XYZ 0 variableset-Projects-432 deploymentprocess-Projects-432 ProjectGroups-183 Lifecycles-81 0 {“Description”:"",“IncludedLibraryVariableSetIds”:[“LibraryVariableSets-81”],“UsedPackages”:[“ProviderMatching”],“DefaultToSkipIfAlreadyInstalled”:false,“VersioningStrategy”:{“DonorPackageStepId”:“08a92792-18e4-4927-95d0-4f6acd43a10a”,“Template”:null},“ReleaseCreationStrategy”:{“ReleaseCreationPackageStepId”:"",“ChannelId”:null}}

Please run this and let me know if that makes the dashboard work again

UPDATE [dbo].Project
   SET [Id] = 'Projects-432'      
 WHERE Id = 'n'
GO

Great—it’s fixed. Was this maybe something that happened out of the migration to 3.3.4?

Thanks for your help.

Dave

Glad to hear its working! I’m not sure what caused it, but I’m definitely gonna bring this to the team to review.

Thanks for working closely in this one with me. Your fast replies really made the difference to get this fixed quickly.

Dalmiro

Got a special request: Given that no personal info was shared on the thread (no urls, project names, anything), do you mind if I make it public so anyone else having this issue can find it and take advantage of our conversation?

Its absolutely fine If you’d rather keep it private. I’m just thinking It’ll be handy for the community to have this one public.

That’s fine, go ahead!

Dave