Closed Bug 617778 Opened 15 years ago Closed 15 years ago

amo-validator breaks when an xpi is really malformed

Categories

(addons.mozilla.org Graveyard :: Developer Pages, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: kumar, Assigned: basta)

Details

Attachments

(1 file)

I tried to create an xpi and I'm not sure how bad I messed it up (heh) but it broke the validator. Instead it should report "invalid package" I'd think. The xpi I created is attached. Here is the traceback using rev b3b29b88368afc8ba43a33238711ddb20562aca5 from 12/8 $ python ./addon-validator -o json ~/Documents/Mozilla/addon-with-many-errors/helloworld.xpi Traceback (most recent call last): File "./addon-validator", line 5, in <module> validator.main.main() File "/Users/kumar/dev/amo-validator/validator/main.py", line 112, in main submain.prepare_package(error_bundle, args.package, expectation) File "/Users/kumar/dev/amo-validator/validator/submain.py", line 59, in prepare_package output = test_package(err, package, path, expectation) File "/Users/kumar/dev/amo-validator/validator/submain.py", line 146, in test_package return test_inner_package(err, package_contents, package) File "/Users/kumar/dev/amo-validator/validator/submain.py", line 209, in test_inner_package test_func(err, package_contents, package) File "/Users/kumar/dev/amo-validator/validator/testcases/content.py", line 103, in test_packed_packages sub_xpi) File "/Users/kumar/dev/amo-validator/validator/submain.py", line 209, in test_inner_package test_func(err, package_contents, package) File "/Users/kumar/dev/amo-validator/validator/testcases/content.py", line 161, in test_packed_packages file_data) File "/Users/kumar/dev/amo-validator/validator/testcases/scripting.py", line 23, in test_js_file tree = _get_tree(name, data) File "/Users/kumar/dev/amo-validator/validator/testcases/scripting.py", line 124, in _get_tree parsed = json.loads(data) File "/usr/local/Cellar/python2.6/2.6.5/lib/python2.6/json/__init__.py", line 307, in loads return _default_decoder.decode(s) File "/usr/local/Cellar/python2.6/2.6.5/lib/python2.6/json/decoder.py", line 319, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/Cellar/python2.6/2.6.5/lib/python2.6/json/decoder.py", line 338, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded
Assignee: nobody → mbasta
Looks like the error was in getting the JSON tree back from Spidermonkey, and it seems to have been corrected by the patch you made for the validator earlier today. Double check that this don't fail on your end and it'll be good to close.
oh yeah, whoops, forgot to close this.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: