Unable to reimport a project "Already imported"

ALM used

Bitbucket Cloud

CI system used

Bitbucket Pipelines

Languages of the repository

Flutter (Dart)

SonarCloud project URL

(Not public)

Error observed

When trying to re-import the repository into SonarCloud, the following error appears:

This project has already been imported.

Steps to reproduce

  1. Imported a repository into SonarCloud.

  2. Deleted the project from SonarCloud.

  3. Attempted to re-import the same repository.

  4. 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?

Hi,

Welcome to the community!

Can you provide the org ID and project ID?

 
Thx,
Ann

Good day, thank you for your reply here is the org ID pointsafrica-admin and project ID pointsafrica-admin_mobile

Thank you

1 Like

Hi,

Thanks! I’ve flagged this for the team.

 
Ann

Hello @George_Nhari ,

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.

Nevermind, I found your project binding.

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?

Thanks a lot for your help

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.

Hello, have you managed to unbind it?

Hi @George_Nhari,

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.

1 Like