Trying to upload an extension with no install.rdf

NEW
Unassigned

Status

3 years ago
3 years ago

People

(Reporter: andy+bugzilla, Unassigned)

Tracking

Details

Attachments

(1 attachment)

523 bytes, application/x-xpinstall
Details
(Reporter)

Description

3 years ago
Results in a message like this:

https://www.dropbox.com/s/5wkw3fgq3d6i1ja/Screenshot%202015-10-02%2011.34.59.png?dl=0

There was once work to make an addon work without an install.rdf, but according to IRC it never happened. I think in this case it should just say "hey you've got no install.rdf".

We'll have to make this work for web extensions which do not have an install.rdf, but that's a seperate bug.
At the moment we support extensions with either an install.rdf or a package.json manifest: https://github.com/mozilla/olympia/blob/ee69907dca4211c412c74c5649a56d21ab6ead58/apps/files/utils.py#L91

We'll need to add another case where we detect a manifest.json.

So this means we'll want a message saying something like "missing a manifest file" and maybe pointing at a MDN page?
(Reporter)

Comment 2

3 years ago
We may support that, but I think that's wrong. A Web Extension is the only add-on where an install.rdf can be missing I believe and that should be covered in the Web Extension bug 1210037.
We may support what? What is wrong?

As explained in comment 1 we currently support add-ons with package.json or install.rdf manifests. We'll add manifest.json with bug 1210037.

So if I understand this bug correctly, it's about adding a message "your extension is missing a manifest file". I'm not sure, but that might make sense to be done in the validator.

What do you think :mstriemer?
Component: Developer Pages → Add-on Validation
Flags: needinfo?(mstriemer)
We used to require an install.rdf file but I added support for a package.json file when we added some more support for jpm packages. The commit [1] that added support should probably be removed, not sure if it is revertable but I'm assuming not. 

The code to load the package.json file [2] and the code that sets an error [3] definitely needs to change.

[1] https://github.com/mozilla/amo-validator/commit/cd5ad297f85b97b56c2be05896f019fafc38407e
[2] https://github.com/mozilla/amo-validator/blob/8f725716af321c44df14ce3c81e676d418271772/validator/submain.py#L119
[3] https://github.com/mozilla/amo-validator/blob/8f725716af321c44df14ce3c81e676d418271772/validator/testcases/packagelayout.py#L187-L189
Flags: needinfo?(mstriemer)
(Reporter)

Comment 5

3 years ago
Created attachment 8675735 [details]
wat.xpi
(Reporter)

Comment 6

3 years ago
Attached a sample .xpi that generates this problem, in this case its just a zip file with package.json, but no install.rdf. 

If however you run the `jpm xpi` command, you'll get a package with the package.json file, containing install.rdf, the RDF will contain an appropriate platform.
(Assignee)

Updated

3 years ago
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.