Could not find a project named: XXX

Hi support,

We’re using Octopus Deploy 2.6.3.886 and TeamCity 9.0.2 (32195).

We are building projects in TeamCity that then create a release in Octopus Deploy. This was working fine initially but as I’ve added a new build configuration to TeamCity and a new Project in Octopus Deploy, I’m now getting “Could not find a project named: XXX” when I try to create a release for the new build configuration.
The original build configuration can still create releases to the original Octopus project. I just can’t make new build configurations create releases in new Octopus projects.

I’ve tried:

  • renaming the Octopus project
  • creating a new Octopus project
  • creating a new Team City build configuration pointing to the new Octopus project
  • had a look at /api/projects to ensure that my project exists in the list (it does) with no leading or trailing spaces
  • I can navigate to the project using /app#/projects/myprojectname

I see in the support forum that someone else had the same issue as this back on Feb 26th, but I don’t see a resolution there (and the discussion is now private).

Can you assist please?

Hi Tristan,

Thanks for getting in touch! That particular ticket ended up being: the API key that was used by TeamCity did not have the correct permissions to access that project.
So this is the first place I would start.

Let me know what you find.
Vanessa

Hi Tristan,

Just a second follow up to give a secondary way to troubleshoot this. If you RDP to the TeamCity server, install and run Fiddler2 and watch the HTTP calls while running the build agent. You will see Octo.exe make a call to /api/projects. You can then inspect the results to see if your project is being returned to Octo.exe.

Thanks
Vanessa

Thanks Vanessa. I’ll give that a go.

It’s possible that it’s permissions, however I did think that the account I’m using is an administrator in octopus.

But the project was created after I added the account to the admin group.

I’ll take a closer look and let you know. I’ll try the fiddler option if it’s not permissions.

One other piece of information that may be critical (and may be the cause)…

I also had the user that I added to the administrator role in another team with project access only to the original project that I created. I had done this as an attempt to get it working without having administrator privileges. So this extra team membership may have been the issue.

[cid:image002.png@01D05788.968FA730]

From: Tristan Bates
Sent: Thursday, March 05, 2015 9:05 PM
To: ‘Vanessa Love’
Subject: RE: Could not find a project named: XXX [Problems #31090]

Thanks for your assistance.

It was indeed permissions. But not how I thought it would work.

And this may be something you want to consider to fix in the product.

Sequence went like this:

  •      Created a project
    
  •      Tried creating a release but didn’t have enough permissions for the account we were using to integrate
    
  •      Added the account to the System Administrators team which had “All Projects” permission
    

[cid:image003.png@01D05788.968FA730]

  •      Created a new project
    
  •      Tried creating a release but it failed due to lack of permissions (this is the point where I raised my concern)
    
  •      Removed the account from the administrators team
    
  •      Added the account back to the administrators team
    
  •      Release now creates successfully
    

So it seems that “All Projects” is behaving as “All projects at the time that the user was added to the team” – and not actually all projects as it suggests.

Ultimately we shouldn’t be using the system administrator role for this integration account and I’ll switch to something more appropriate as my next step. But at least I now have a work around.

Thanks for helping me find the issue.

Tristan.

image002.png

image003.png

Hi Tristan,

Thanks for the feedback. I’ll take some time to try to replicate this. Having all projects should include those added after and we haven’t had any other reports that it is not behaving correctly, so maybe the second team as the cause. If I can replicate it Ill put in a ticket, but it sounds like your sorted for now!

Vanessa

Thanks for your assistance.

It was indeed permissions. But not how I thought it would work.

And this may be something you want to consider to fix in the product.

Sequence went like this:

  •      Created a project
    
  •      Tried creating a release but didn’t have enough permissions for the account we were using to integrate
    
  •      Added the account to the System Administrators team which had “All Projects” permission
    

[cid:image001.png@01D05787.BED7CE80]

  •      Created a new project
    
  •      Tried creating a release but it failed due to lack of permissions (this is the point where I raised my concern)
    
  •      Removed the account from the administrators team
    
  •      Added the account back to the administrators team
    
  •      Release now creates successfully
    

So it seems that “All Projects” is behaving as “All projects at the time that the user was added to the team” – and not actually all projects as it suggests.

Ultimately we shouldn’t be using the system administrator role for this integration account and I’ll switch to something more appropriate as my next step. But at least I now have a work around.

Thanks for helping me find the issue.

Tristan.

image003.png