Closed
Bug 1303798
Opened 8 years ago
Closed 8 years ago
Beta mochitest(5) failing with test_ext_webrequest.html | Test timed out.
Categories
(WebExtensions :: General, defect, P1)
WebExtensions
General
Tracking
(firefox50 fixed, firefox51+ fixed, firefox52 fixed)
RESOLVED
FIXED
mozilla52
People
(Reporter: intermittent-bug-filer, Assigned: kmag)
References
Details
(Whiteboard: triaged)
Attachments
(2 files)
58 bytes,
text/x-review-board-request
|
kmag
:
review-
|
Details |
58 bytes,
text/x-review-board-request
|
mixedpuppy
:
review+
gchang
:
approval-mozilla-aurora+
|
Details |
status-firefox50:
--- → affected
status-firefox51:
--- → unaffected
Comment 1•8 years ago
|
||
Hi Giorgio, is this fallout from bug 1201979 / https://hg.mozilla.org/releases/mozilla-aurora/rev/3b04c5fb4e57
In the log, there is this:
09:34:47 INFO - 1249 INFO TEST-START | toolkit/components/extensions/test/mochitest/test_ext_webrequest.html
09:34:47 INFO - 1250 INFO SpawnTask.js | Entering test
09:34:47 INFO - 1251 INFO Extension loaded
09:34:47 INFO - JavaScript error: moz-extension://1c4e5c7c-2080-4473-982b-e18a11e1e29b/%7B3b09dc87-a067-4618-af24-75dda4766505%7D.js, line 351: Error: Permission denied to access property "message"
09:39:56 INFO - TEST-INFO | started process screenshot
09:39:56 INFO - TEST-INFO | screenshot: exit 0
09:39:56 INFO - 1252 INFO TEST-UNEXPECTED-FAIL | toolkit/components/extensions/test/mochitest/test_ext_webrequest.html | Test timed out.
Flags: needinfo?(g.maone)
Comment 2•8 years ago
|
||
I think this feature was only enabled in aurora and nightly, so the test needs to be skipped on beta and release.
Kris did similar checks for webextension experiments like this:
http://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/test/xpcshell/test_webextension.js#307-309
Comment 3•8 years ago
|
||
What is happening at https://dxr.mozilla.org/mozilla-central/rev/f0f15b7c6aa77a0c5750918aa0a1cb3dc82185bc/toolkit/components/extensions/test/mochitest/test_ext_webrequest.html#446 is that the exception handler triggered by the expected lack of requestBody support in release builds unexpectedly throws, because the original exception's "message" property is not accessible for some reason ("permission denied", not sure why).
However, here we just wanted to check that the exception we are about to swallow is actually caused by requestBody not being supported, rather than any other unexpected cause which, on the other hand, seems very unlikely.
Therefore I believe just removing line 446 and 447 would be an acceptable fix.
Flags: needinfo?(g.maone)
Summary: Beta mochitest(5) failing with test_ext_webrequest.html | Test timed out. | after ReferenceError: SpecialPowers is not defined → Beta mochitest(5) failing with test_ext_webrequest.html | Test timed out.
Comment hidden (Intermittent Failures Robot) |
Updated•8 years ago
|
Severity: normal → blocker
Comment hidden (mozreview-request) |
Comment 6•8 years ago
|
||
Comment on attachment 8792764 [details]
Bug 1303798 - Remove exception message check when requestBody is not supported.
Approval Request Comment
[Feature/regressing bug #]: 1201979
[User impact if declined]: tests fail
[Describe test coverage new/current, TreeHerder]: try on central (don't know how to test in beta)
[Risks and why]: it may swallow an exception revealing requestBody tests were skipped
[String/UUID change made/needed]: none
Attachment #8792764 -
Flags: approval-mozilla-beta?
Attachment #8792764 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 7•8 years ago
|
||
mozreview-review |
Comment on attachment 8792764 [details]
Bug 1303798 - Remove exception message check when requestBody is not supported.
https://reviewboard.mozilla.org/r/79668/#review78428
Hm. I think the correct fix is to emit an error that actually belongs to the calling scope. I'm worried that this change is going to lead to this test failing and no-one noticing it.
The way that we normally handle this is by throwing either a bare object, and converting that to an Error that belongs to the calling scope from the schema wrappers in ExtensionUtils.jsm[1], or throwing an Error crated in the extension's scope to begin with.
So, ideally, I think we should probably handle this by changing the other function call wrappers to handle error objects that the extension doesn't have access to[2], and create an `Error` subclass that WebRequest.jsm can throw, which `normalizeError` can check so that it knows to use the original error message, rather than replacing it with "An unexpected error occurred".
[1]: http://searchfox.org/mozilla-central/rev/dbbbafc979a8362a1c8e3e99dbea188fc832b1c5/toolkit/components/extensions/ExtensionUtils.jsm#336
[2]: http://searchfox.org/mozilla-central/rev/dbbbafc979a8362a1c8e3e99dbea188fc832b1c5/toolkit/components/extensions/ExtensionUtils.jsm#1577
Attachment #8792764 -
Flags: review?(kmaglione+bmo) → review-
Assignee | ||
Comment 8•8 years ago
|
||
In the short term, I'm just going to land a patch to beta that disables this call on non-release builds, so this stops failing. We can land a proper fix as a follow-up.
Assignee | ||
Comment 9•8 years ago
|
||
Comment on attachment 8792764 [details]
Bug 1303798 - Remove exception message check when requestBody is not supported.
Test-only changes are auto-approved for uplift.
Attachment #8792764 -
Flags: approval-mozilla-beta?
Attachment #8792764 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 10•8 years ago
|
||
Comment 11•8 years ago
|
||
thanks kris and mao
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Comment 12•8 years ago
|
||
This still needs to land on trunk and Aurora unless I'm mistaken?
Assignee: nobody → g.maone
Status: RESOLVED → REOPENED
Flags: needinfo?(cbook)
Resolution: FIXED → ---
Comment 13•8 years ago
|
||
kris, we need the same patch you checked-in on beta also on trunk and aurora or ? (could you attach the patch since its not the one the landed from this bug)
Flags: needinfo?(cbook) → needinfo?(kmaglione+bmo)
Assignee | ||
Comment 14•8 years ago
|
||
Aurora and central will need a longer term fix, as described in comment 7. The fix landed in beta is only a stopgap.
Flags: needinfo?(kmaglione+bmo)
Comment 15•8 years ago
|
||
However the "SpecialPowers is undefined" seems to be a real issue breaking requestBody file upload tests in non-release versions:
5929 07:51:31 INFO - ReferenceError: SpecialPowers is not defined
12040 08:04:19 INFO - 1538 INFO TEST-UNEXPECTED-FAIL | toolkit/components/extensions/test/mochitest/test_ext_webrequest.html | Upload http://mochi.test:8888/tests/toolkit/components/extensions/test/mochitest/file_WebRequest_page3.html?trigger=form&upload=%7B%22%5C%22special%5C%22+ch%C3%83%C2%A0rs%22%3A%5B%22sp%C3%A2%E2%80%9A%C2%ACcial%22%5D%2C%22testFile%22%3A%5B%22testFile.pdf%22%5D%2C%22emptyFile%22%3A%5B%22%22%5D%2C%22textInput1%22%3A%5B%22value1%22%5D%7D&enctype=multipart%2Fform-data #22 matc
https://treeherder.mozilla.org/logviewer.html#?job_id=27806425&repo=try#L5929
Might be anything new about SpecialPowers in mochitests causing this?
Flags: needinfo?(kmaglione+bmo)
Assignee | ||
Comment 16•8 years ago
|
||
The SpecialPowers error is a red herring. It looks like the problem is that the form data is coming through with broken encoding. Which is because of the patch for bug 1304331, which changes the encoding of the document to something unreasonable.
Flags: needinfo?(kmaglione+bmo)
Comment hidden (Intermittent Failures Robot) |
Updated•8 years ago
|
Priority: -- → P1
Whiteboard: triaged
Updated•8 years ago
|
Keywords: intermittent-failure
Assignee | ||
Updated•8 years ago
|
Assignee: g.maone → kmaglione+bmo
Comment 18•8 years ago
|
||
i guess we need to fix the problem still on aurora because when aurora becomes beta we might run into this as tree closing again
Comment 19•8 years ago
|
||
[Tracking Requested - why for this release]:
aurora as beta uplift show perma failures/timeouts - so we need to fix this before merge day
tracking-firefox51:
--- → ?
Flags: needinfo?(kmaglione+bmo)
Assignee | ||
Comment 21•8 years ago
|
||
This won't cause any problems when aurora becomes beta. The fix was for beta builds in general, not just the current beta.
Flags: needinfo?(kmaglione+bmo)
Assignee | ||
Comment 22•8 years ago
|
||
Actually, no, I guess I'm wrong, since I didn't land the fix.
Comment hidden (mozreview-request) |
Comment 24•8 years ago
|
||
(In reply to Kris Maglione [:kmag] from comment #22)
> Actually, no, I guess I'm wrong, since I didn't land the fix.
:) https://treeherder.mozilla.org/#/jobs?repo=try&revision=80b53a49a79266832c5af7cc99d6442b9e239fbf&selectedJob=30468193&filter-searchStr=mochitest%20m(5) is actually the simlation that show the failures
Comment 25•8 years ago
|
||
mozreview-review |
Comment on attachment 8808018 [details]
Bug 1303798: Correctly propagate addListener errors from WebRequest.jsm to extension.
https://reviewboard.mozilla.org/r/90938/#review90866
Attachment #8808018 -
Flags: review?(mixedpuppy) → review+
Comment 26•8 years ago
|
||
This is going to need a different patch for uplift unless we also uplift bug 1314493.
Depends on: 1314493
Assignee | ||
Comment 27•8 years ago
|
||
(In reply to Shane Caraveo (:mixedpuppy) from comment #26)
> This is going to need a different patch for uplift unless we also uplift bug
> 1314493.
Yeah. Can you request uplift for that? It's probably a good idea, anyway.
Comment 28•8 years ago
|
||
Pushed by maglione.k@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/045ce2ca1b7d
Correctly propagate addListener errors from WebRequest.jsm to extension. r=mixedpuppy
Assignee | ||
Comment 29•8 years ago
|
||
Comment on attachment 8808018 [details]
Bug 1303798: Correctly propagate addListener errors from WebRequest.jsm to extension.
Approval Request Comment
[Feature/regressing bug #]: Bug 1201979
[User impact if declined]: This bug causes extensions to receive an Error object that they do not have privileges to access, which incidentally causes tests to fail when running in a beta or release build.
[Describe test coverage new/current, TreeHerder]: Existing tests detect this issue and confirm that it's fixed when running on beta.
[Risks and why]: Very low. This change primarily ensures that extensions can access an error object that they are intended to be able to access.
[String/UUID change made/needed]: None.
Attachment #8808018 -
Flags: approval-mozilla-aurora?
I had to back this out for bustage like https://treeherder.mozilla.org/logviewer.html#?job_id=6245609&repo=autoland
https://hg.mozilla.org/integration/autoland/rev/7e604b351f4faaa1f602c02dbae5639ce4d16b47
Flags: needinfo?(kmaglione+bmo)
Assignee | ||
Comment 31•8 years ago
|
||
Turns out I tested with the RELEASE_OR_BETA flag set, but forgot to test without it...
Flags: needinfo?(kmaglione+bmo)
Assignee | ||
Comment 32•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/8c2ad6366c6be9fce02428ca22b973be8d9d295b
Bug 1303798: Correctly propagate addListener errors from WebRequest.jsm to extension. r=mixedpuppy
Comment 33•8 years ago
|
||
bugherder |
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Comment 34•8 years ago
|
||
Comment on attachment 8808018 [details]
Bug 1303798: Correctly propagate addListener errors from WebRequest.jsm to extension.
Fix a mochitest error when running on beta. Take it in 51 aurora.
Attachment #8808018 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 35•8 years ago
|
||
needs rebasing for aurora
merging toolkit/components/extensions/ExtensionUtils.jsm
merging toolkit/components/extensions/test/mochitest/test_ext_webrequest_upload.html
merging toolkit/modules/addons/WebRequest.jsm
warning: conflicts while merging toolkit/components/extensions/ExtensionUtils.jsm! (edit, then use 'hg resolve --mark')
abort: unresolved conflicts, can't continue
(use 'hg resolve' and 'hg graft --continue')
Flags: needinfo?(kmaglione+bmo)
Assignee | ||
Comment 36•8 years ago
|
||
Flags: needinfo?(kmaglione+bmo)
Updated•7 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•