Unable to create ArgoCD application, Error: manifest does not contain a layer with mediatype application/tar+gzip

We are utilizing ArgoCD for Gitops and everything works fine and the application is getting created with docker images stored in the ECR repository. But when we create an application using OCI enabled helm ecr repository in ArgoCD we face issues. The version of ArgoCD is v2.0.5.

This is the command that I use to create an application in the ArgoCD using a helm chart stored in the OCI registry as a source.

argocd repo add oci://accountid.dkr.ecr.us-east-1.amazonaws.com --type helm --name mychart --enable-oci --username AWS --password $(aws ecr get-login-password --region us-west-5h)
Unable to create application: application spec is invalid: InvalidSpecError: Unable to get app details: rpc error: code = Unknown desc = helm chart pull accountid.dkr.ecr.us-west-1.amazonaws.com/mychart:1.1.1 failed exit status 1: Error: manifest does not contain a layer with mediatype application/tar+gzip

This has forced me to update ArgoCD version 2.0.5 to 2.2.2, On how to upgrade the ArgoCD version – please visit my another blog here

So let’s confirm what is the ArgoCD version we have now after upgrade

I am seeing other errors below but all of them are related to the roles and permissions within ArgoCD getting resolved after proper mapping of the objects.

Unable to create application: application spec for testingOCI is invalid: InvalidSpecError: application destination {https://xxxxxx.sk1.us-east-1.eks.amazonaws.com pgadmin} is not permitted in project 'default'
Unable to create application: application spec for testingOCIHelm is invalid: InvalidSpecError: application repo xxx.dkr.ecr.us-east-1.amazonaws.com is not permitted in project 'development'
Unable to create application: application spec for testingOCIHelm is invalid: InvalidSpecError: repository not accessible: rpc error: code = Unknown desc = error testing repository connectivity: Get "oci://xxxx.dkr.ecr.us-east-5h.amazonaws.com/index.yaml": unsupported protocol scheme "oci"

Once the permission issue resolved we have the application get created successfully:-

After waiting for a few minutes we have a healthy application state. And the time it took is almost the same as getting a Let’s Encrypt free certificate.

Happy Helming…

Leave a Comment