Closed Bug 625440 Opened 15 years ago Closed 15 years ago

Error: Validation task could not complete or completed with errors

Categories

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

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: krupa.mozbugs, Assigned: basta)

References

()

Details

(Whiteboard: [validator])

Attachments

(2 files)

Attached image screenshot
Check the validation results @ https://addons.allizom.org/z/en-US/developers/addon/sort-tabs/file/98660/validation All the tests failed validation with "Error: Validation task could not complete or completed with errors" But the status message at the top says "Add-on passed validation."
This is an interesting one. The Add-on is somehow triggering JSReflectException: u'InternalError: too much recursion' Traceback: http://pastebin.mozilla.org/940835 Matt, any ideas for how to work around this? As a *last resort* the JS code could catch this exception but it would be nicer if we could discover the root cause first.
Assignee: nobody → mbasta
I'll need to identify exactly which part of the JS is causing this problem. Krupa: can you attach the add-on for me to inspect?
Attached file test file
It looks like this error is being thrown by Spidermonkey in the JSON.stringify or Reflect.parse function. There's really nothing we can do, short of either writing our own non-recursive version of JSON.stringify or skipping Spiermonkey altogether and writing a Python version of the tokenizer. I've even considered porting the JS testcases from Python to JS and running them there to avoid using JSON.stringify, but that still wouldn't solve the problem because the JS tests use between two and three layers of recursion for every nested token in the input code, which means that the tests themselves would throw a recursion error. Perhaps there's a way to eliminate the recursion cap? Otherwise, I'd say the best solution is to throw some kind of warning for the editors and skip the file.
What about just catching 'InternalError: too much recursion' and displaying an informative error to the developer? Currently, all they see is "could not complete validation" which doesn't give them a chance to fix the problem. I'm not sure *how* they would fix it but maybe by splitting up their JS into separate files.
I would imagine that the solution wouldn't be to split up their JS, but rather to decrease the depth of which they nest their code. It'd be a whole restructuring task. For now, I'll make this into a notice. At least then it can be used as an indicator to the editors that a file wasn't validated.
Making it an informational notice is good for now.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
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: