Closed Bug 1400566 Opened 3 years ago Closed 3 years ago

JSDcov code coverage busted: ([Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [IJSDebugger.addClass]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"


(Testing :: Code Coverage, defect)

Not set


(firefox-esr52 unaffected, firefox55 unaffected, firefox56 unaffected, firefox57 fixed)

Tracking Status
firefox-esr52 --- unaffected
firefox55 --- unaffected
firefox56 --- unaffected
firefox57 --- fixed


(Reporter: aryx, Assigned: mccr8)



(Keywords: regression, Whiteboard: [stockwell fixed:other])


(1 file)

See bug 1381961 and bug 1400489 a shared global for JSMs.

First run with failures:

Example log:

[task 2017-09-16T10:56:13.244Z] 10:56:13    ERROR -  GECKO(1296) | TEST-UNEXPECTED-FAIL: setup.js | error parsing http://mochi.test:8888/tests.json ([Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [IJSDebugger.addClass]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: resource://gre/modules/jsdebugger.jsm :: addDebuggerToGlobal :: line 23"  data: no])
[task 2017-09-16T10:56:13.246Z] 10:56:13     INFO -  GECKO(1296) | JavaScript error: resource://gre/modules/jsdebugger.jsm, line 23: NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [IJSDebugger.addClass]
[task 2017-09-16T11:12:53.277Z] 11:12:53     INFO - Automation Error: mozprocess timed out after 1000 seconds running ['/builds/worker/workspace/build/venv/bin/python', '-u', '/builds/worker/workspace/build/tests/mochitest/', '--disable-e10s', '--total-chunks', '10', '--this-chunk', '8', '--jscov-dir-prefix=/builds/worker/workspace/build/blobber_upload_dir', '--appname=/builds/worker/workspace/build/application/firefox/firefox', '--utility-path=tests/bin', '--extra-profile-file=tests/bin/plugins', '--symbols-path=', '--certificate-path=tests/certs', '--setpref=webgl.force-enabled=true', '--quiet', '--log-raw=/builds/worker/workspace/build/blobber_upload_dir/plain-chunked-coverage_raw.log', '--log-errorsummary=/builds/worker/workspace/build/blobber_upload_dir/plain-chunked-coverage_errorsummary.log', '--use-test-media-devices', '--screenshot-on-fail', '--cleanup-crashes', '--marionette-startup-timeout=180', '--work-path=/builds/worker/workspace/build', '--chunk-by-dir=4', '--timeout=1200']

> this.addDebuggerToGlobal = function addDebuggerToGlobal(global) {
>   init.addClass(global);
>   initPromiseDebugging(global);
> };
Flags: needinfo?(kmaglione+bmo)
Summary: Ccov code coverage busted: ([Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [IJSDebugger.addClass]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" → JSDcov code coverage busted: ([Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [IJSDebugger.addClass]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"
Looks like it needs to be updated to use getGlobalForObject
Flags: needinfo?(kmaglione+bmo) → needinfo?(continuation)
Assignee: nobody → continuation
Component: Developer Tools: Debugger → Code Coverage
Flags: needinfo?(continuation)
Product: Firefox → Testing
Are there any unit tests for CoverageUtils.jsm that I can run locally?
I haven't tested this, but it looks reasonable to me...
Oh, I see, this isn't run by default, which is why my -p all -u all runs didn't find this.

Here's a try run to try to confirm that it works:
This patch is pretty trivial, so if somebody gets impatient, feel free to land this with r=bustage...
Comment on attachment 8909023 [details]
Bug 1400566 - Explicitly get the global of |this| in CoverageUtils.jsm.
Attachment #8909023 - Flags: review?(kmaglione+bmo) → review+
I guess I didn't set up the try run correctly, so we'll just see what happens when I land this.
Pushed by
Explicitly get the global of |this| in CoverageUtils.jsm. r=kmag
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Thank you for taking care of this! :)

:mccr8, jsdcov and ccov only work with |mach try fuzzy -q 'linux64-jsdcov ...'| now after some changes from the windows taskcluster migration, IIRC. The documents haven't been updated to reflect this change yet, sorry about that.
Whiteboard: [stockwell fixed:other]
You need to log in before you can comment on or make changes to this bug.