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

manifest.json was not found #5577

Closed
Hiruto1337 opened this issue Feb 18, 2025 · 6 comments
Closed

manifest.json was not found #5577

Hiruto1337 opened this issue Feb 18, 2025 · 6 comments

Comments

@Hiruto1337
Copy link

Hiruto1337 commented Feb 18, 2025

I am told by the linter that my decompressed .zip file doesn't contain a manifest.json file. But it does.

Image Image
@Rob--W
Copy link
Member

Rob--W commented Feb 18, 2025

The manifest.json file must be at the top level, not in a subdirectory.

@wagnerand
Copy link
Member

@abyrne-moz Perhaps we should improve the error message to explicitly call this out, like:

"manifest.json was not found at the top-level of the submitted file".

@willdurand
Copy link
Member

"manifest.json was not found at the top-level of the submitted file".

FWIW this is already described in the full message (each linter notice/warning/error has a short message and a long description) -

export const TYPE_NO_MANIFEST_JSON = {
code: 'TYPE_NO_MANIFEST_JSON',
message: i18n._('manifest.json was not found'),
description: i18n._(`No manifest.json was found at the root of the extension.
The package file must be a ZIP of the extension's files themselves, not of the
containing directory. See: https://mzl.la/2r2McKv for more on packaging.`),
};

@wagnerand
Copy link
Member

Yes, and not everyone might click into the full report.

@Hiruto1337
Copy link
Author

It didn't help that on MacOS, you have to zip your files via the Terminal in order for the .zip file not to automatically create a new parent directory

@abyrne-moz
Copy link

I would prefer to see this issue resolved by detecting if there was a single directory within the ZIP file with a valid manifest.json file and we just handle it correctly internally.

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

5 participants