Skip to content

Error: Error: invalid OCI Image Index: failed to decode index file: invalid character 'm' after object key #1888

@ArghyaChakraborty

Description

@ArghyaChakraborty

What happened in your environment?

We use global oras cache.
While doing oras manifest fetch or oras pull operation, we sometime get this error:

Error: Error: invalid OCI Image Index: failed to decode index file: invalid character 'm' after object key

We found that the index.json file in the oras cache is an invalid json file. It has an entry like following:

....,{"med{"mediaType":"application/vnd.oci.image.manifest.v1+json","digest":"sha256:8acfe","size":1973},......

Which is what is resulting in the error.
We want to understand why oras cache will become corrupted like this and what we could do to avoid it.

What did you expect to happen?

We want to use global oras cache and we want every manifest fetch and pull operation to succeed.

How can we reproduce it?

It is hard to reproduce. We use AWS Lambda functions to perform oras operations and multiple lambdas can run in parallel. Lambdas have an EFS mount and the oras cache is created in EFS.

What is the version of your ORAS CLI?

Version: 1.3.0-beta.4
Go version: go1.24.5
OS/Arch: linux/amd64
Git commit: 582ae37
Git tree state: clean

What is your OS environment?

AWS Lambda Runtime Node.js 22.x (Architecture: x86_64)

Are you willing to submit PRs to fix it?

  • Yes, I am willing to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions