Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cdklocal bootstrap fails with "The repository name already exists in the registry" #87

Closed
DustyLamp opened this issue Sep 28, 2023 · 1 comment

Comments

@DustyLamp
Copy link

New to localstack and just did an install of everything. Looked fine until receiving an error during bootstrapping with cdklocal bootstrap

CDK Version: 2.96.2 (build 3edd240)
CDKLocal Version: 2.96.2 (build 3edd240)
LocalStack Version: 2.2.0

9:56:43 PM | CREATE_FAILED        | AWS::ECR::Repository    | ContainerAssetsRepository
An error occurred (RepositoryAlreadyExistsException) when calling the CreateRepository operation: The re
pository with name 'cdk-hnb659fds-container-assets-000000000000-us-east-1' already exists in the registr
y with id '000000000000'

 ❌  Environment aws://000000000000/us-east-1 failed bootstrapping: Error: The stack named CDKToolkit failed to deploy: CREATE_FAILED (An error occurred (RepositoryAlreadyExistsException) when calling the CreateRepository operation: The repository with name 'cdk-hnb659fds-container-assets-000000000000-us-east-1' already exists in the registry with id '000000000000'): An error occurred (RepositoryAlreadyExistsException) when calling the CreateRepository operation: The repository with name 'cdk-hnb659fds-container-assets-000000000000-us-east-1' already exists in the registry with id '000000000000'
    at FullCloudFormationDeployment.monitorDeployment (/Users/jeremylewis/.nvm/versions/node/v18.12.1/lib/node_modules/aws-cdk/lib/index.js:443:10232)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/jeremylewis/.nvm/versions/node/v18.12.1/lib/node_modules/aws-cdk/lib/index.js:448:2104
    at async Promise.all (index 0)
    at async CdkToolkit.bootstrap (/Users/jeremylewis/.nvm/versions/node/v18.12.1/lib/node_modules/aws-cdk/lib/index.js:448:1949)
    at async exec4 (/Users/jeremylewis/.nvm/versions/node/v18.12.1/lib/node_modules/aws-cdk/lib/index.js:521:52745)

The stack named CDKToolkit failed to deploy: CREATE_FAILED (An error occurred (RepositoryAlreadyExistsException) when calling the CreateRepository operation: The repository with name 'cdk-hnb659fds-container-assets-000000000000-us-east-1' already exists in the registry with id '000000000000'): An error occurred (RepositoryAlreadyExistsException) when calling the CreateRepository operation: The repository with name 'cdk-hnb659fds-container-assets-000000000000-us-east-1' already exists in the registry with id '000000000000'

After running cdk bootstrap again, I'm now getting:

9:59:50 PM | UPDATE_FAILED        | AWS::ECR::Repository    | ContainerAssetsRepository
'NoneType' object is not a mapping

 ❌  Environment aws://000000000000/us-east-1 failed bootstrapping: Error: The stack named CDKToolkit failed to deploy: CREATE_FAILED ('NoneType' object is not a mapping): 'NoneType' object is not a mapping
    at FullCloudFormationDeployment.monitorDeployment (/Users/jeremylewis/.nvm/versions/node/v18.12.1/lib/node_modules/aws-cdk/lib/index.js:443:10232)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/jeremylewis/.nvm/versions/node/v18.12.1/lib/node_modules/aws-cdk/lib/index.js:448:2104
    at async Promise.all (index 0)
    at async CdkToolkit.bootstrap (/Users/jeremylewis/.nvm/versions/node/v18.12.1/lib/node_modules/aws-cdk/lib/index.js:448:1949)
    at async exec4 (/Users/jeremylewis/.nvm/versions/node/v18.12.1/lib/node_modules/aws-cdk/lib/index.js:521:52745)

The stack named CDKToolkit failed to deploy: CREATE_FAILED ('NoneType' object is not a mapping): 'NoneType' object is not a mapping
@DustyLamp
Copy link
Author

After restarting the docker container, I ran cdklocal bootstrap again and it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant