4
Vote

Need better error message if no access to project.

description

If the account that the CruiseControl service is running under does not have rights to a project (it could log into TFS, and had rights to other projects). Then the following rather unhelpful error is given:-

 

Microsoft.TeamFoundation.VersionControl.Client.InvalidVersionSpecException: 0 is not a valid changeset number. Please specify a number greater than 0.
at Microsoft.TeamFoundation.VersionControl.Client.ChangesetVersionSpec.ValidateNumber(Int32 changeset)
at Microsoft.TeamFoundation.VersionControl.Client.ChangesetVersionSpec..ctor(Int32 changeset)
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Vsts.GetModifications(IIntegrationResult from, IIntegrationResult to) in C:\projects\opensource\ccnet\trunk\source\ccnet\ccnet.vsts.plugin\Vsts.cs:line 160
at ThoughtWorks.CruiseControl.Core.Sourcecontrol.QuietPeriod.GetModifications(ISourceControl sourceControl, IIntegrationResult lastBuild, IIntegrationResult thisBuild)
at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest request)
at ThoughtWorks.CruiseControl.Core.Project.Integrate(IntegrationRequest request)
at ThoughtWorks.CruiseControl.Core.ProjectIntegrator.Integrate()
at ThoughtWorks.CruiseControl.Core.ProjectIntegrator.Run()

 

 
We should give a better error message. In the meantime, the work-around is to give the CruiseControl.NET account rights to that project.

comments

OwenCarter wrote Oct 28, 2008 at 4:22 PM

This error is also seen if you try to set the <project> definition within a <sourcecontrol type="vsts" ...> block to a non-existant path;

We had <project>$/YEP/Main/</project> in our sourcecontrol block, which was a typo since this path does not exist (but $/YEP/Maint does) in the TFS Sourcecontrol. We saw the above errors (and wasted a lot of time debugging it as a access-rights issue) until noticed and corrected it to: <project>$/YEP/Maint/</project>, at which point everythign sprang into life..

So this is an error that really translates to:
You have access to the TFS server, but not to the requested source control item(s). Either due to permissions on the items, or because they do not exist..

kerbou wrote Aug 13, 2009 at 10:06 AM

For your information: I got this error as well today but in a totally different context: If you make i.e. a spelling mistake in the <project> tag under <sourcecontrol> you get the exact same errormessage... I was chasing ghosts for an hour before I realized that "$blabla\somethingServer" isn't the same as "$blabla\somethingService" ;o)

daxon wrote Sep 24, 2009 at 10:55 PM

Got the same error today with a reference to a source control location that did not exist.

wrote Sep 25, 2009 at 4:03 PM

wrote Apr 28, 2010 at 7:18 PM

wrote Feb 14, 2013 at 2:47 AM