When trying to re-import the repository into SonarCloud, the following error appears:
This project has already been imported.
Steps to reproduce
Imported a repository into SonarCloud.
Deleted the project from SonarCloud.
Attempted to re-import the same repository.
SonarCloud now shows:
This project has already been imported.
Potential workaround
Checked if the project still exists under another organization.
Checked ALM Integrations for an existing binding.
Attempted to use a different project key.
Issue Description
I deleted a SonarCloud project because I wanted to re-import and set it up again from scratch. However, when I try to import it now, SonarCloud says it has already been imported and does not allow me to proceed.
May you please assist with resolving this so I can re-import the repository?
It looks like there’s an orphaned row on our project bindings table that prevents you from reimporting, I checked on production database and I cannot find your orgID or projID.
Can you please confirm that:
Your project ID is pointsafrica-admin_mobile
Your organization ID is pointsafrica-admin
Also, can you please check your SC instance? I’m wondering if it’s US or EU. I checked EU but it might very well be that you are on US instance.
However the configuration is quite weird.
There is still a project (created on 2023) with pointsafrica-admin_mobile project key, so it means that it was not deleted in the first place. That project also appears to be bound.
The first issue is that the organization with pointsafrica key is the organization under which this project lives, and not pointsafrica-admin.
The weird configuration is that pointsafrica is not bound, while the project under it is. pointsafrica-admin organization is bound but does not contain that project ID.
Can you please confirm that you can see the pointsafrica-admin_mobile project under pointsafrica organization?
Also, I’m wondering how we ended up with a bound project in an unbound organization. What steps did you take?
I believe it was part of an old organization that was later unbound I think, I cant see it under projects but when I got to reimport it shows up and says “Already Imported”. Are you able to unbind it for me so that I can import it again.
We investigated the problem and found that it is more general than we initially thought. We plan to implement a generic fix and allow users to bind these projects even when their configuration is considered stale. We would like to do this soon, but I cannot provide an ETA yet.