Closed Bug 1867034 Opened 1 year ago Closed 1 year ago

Perma TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_webNavigation_urlbar_transitions.js | Got the expected url - Expected: http://example.com/?q=typed, Actual: https:/ when Gecko 122 merges to Beta on 2023-12-18

Categories

(WebExtensions :: Untriaged, defect)

defect

Tracking

(firefox-esr115 unaffected, firefox120 unaffected, firefox121 unaffected, firefox122+ verified)

VERIFIED FIXED
122 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox120 --- unaffected
firefox121 --- unaffected
firefox122 + verified

People

(Reporter: NarcisB, Assigned: rpl)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [addons-jira])

Attachments

(1 file)

[Tracking Requested - why for this release]:

Central-as-beta simulation:
How to run these simulations:
Failure log
Log snippet:

[task 2023-11-28T12:48:40.354Z] 12:48:40     INFO - TEST-START | browser/components/extensions/test/browser/browser_ext_webNavigation_urlbar_transitions.js
[task 2023-11-28T12:48:44.408Z] 12:48:44     INFO - TEST-INFO | started process screentopng
[task 2023-11-28T12:48:44.689Z] 12:48:44     INFO - TEST-INFO | screentopng: exit 0
[task 2023-11-28T12:48:44.690Z] 12:48:44     INFO - Buffered messages logged at 12:48:40
[task 2023-11-28T12:48:44.691Z] 12:48:44     INFO - Entering test bound test_webnavigation_urlbar_typed_transitions
[task 2023-11-28T12:48:44.692Z] 12:48:44     INFO - Extension loaded
[task 2023-11-28T12:48:44.693Z] 12:48:44     INFO - Buffered messages logged at 12:48:41
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - Console message: Warning: attempting to write 46809 bytes to preference extensions.webextensions.uuids. This is bad for general performance and memory usage. Such an amount of data should rather be written to an external file.
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - Buffered messages logged at 12:48:43
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - Console message: [JavaScript Warning: "HTTPS-First Mode: Upgrading URL loaded in the address bar without explicit protocol scheme to use HTTPS."]
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - Buffered messages finished
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_webNavigation_urlbar_transitions.js | Got the expected url - Expected: http://example.com/?q=typed, Actual: https://example.com/?q=typed - 
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - Stack trace:
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - chrome://mochikit/content/browser-test.js:test_ok:1587
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js:testHandler:83
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js:testResult:97
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - resource://testing-common/SpecialPowersChild.sys.mjs:listener:2045
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - resource://testing-common/SpecialPowersChild.sys.mjs:loadExtension/<:1975
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - resource://testing-common/SpecialPowersChild.sys.mjs:receiveMessage:214
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - JSActor query*resource://testing-common/SpecialPowersParent.sys.mjs:resultListener:1240
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - resource://gre/modules/ExtensionCommon.sys.mjs:emit:326
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - resource://gre/modules/Extension.sys.mjs:receiveMessage:3020
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - MessageListener.receiveMessage*resource://gre/modules/Extension.sys.mjs:Extension:2815
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - resource://testing-common/ExtensionTestCommon.sys.mjs:generate:663
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - resource://testing-common/SpecialPowersParent.sys.mjs:receiveMessage:1237
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - JSActor query*resource://testing-common/SpecialPowersChild.sys.mjs:loadExtension:2037
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js:ExtensionTestUtils.loadExtension:128
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - chrome://mochitests/content/browser/browser/components/extensions/test/browser/browser_ext_webNavigation_urlbar_transitions.js:test_webnavigation_urlbar_typed_transitions:88
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - chrome://mochikit/content/browser-test.js:handleTask:1138
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1210
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1352
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1127
[task 2023-11-28T12:48:44.699Z] 12:48:44     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1058

The following logs seems to suggest the http test url is being implicitly changed to https and triggered the assertion failure:

Console message: [JavaScript Warning: "HTTPS-First Mode: Upgrading URL loaded in the address bar without explicit protocol scheme to use HTTPS."]
INFO - TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_webNavigation_urlbar_transitions.js | Got the expected url - Expected: http://example.com/?q=typed, Actual: https://example.com/?q=typed - 

That seems to suggest it may be triggered by some prefs being set differently between Nightly and Beta.

Needinfo-ing myself to take a deeper look into this.

Flags: needinfo?(lgreco)

The pref controlling that behavios dom.security.https_first_schemeless which is set to IS_EARLY_BETA_OR_EARLIER in StaticPrefList.yaml here and that would definitely change the expected url we would get on that assertion in beta vs early beta and nightly.

I'll double-check that is the case as it seems by just reading the code, and then prepare a patch to account for the value set on dom.security.https_first_schemeless to determine which url to expect, which I'd expect it to be enough to prevent the permafail to be hit by the central-as-beta simulations (as well as for the actual beta builds once reached).

Flags: needinfo?(lgreco)

The pref alone doesn't seem to be making me hit the test failure as I was originally hoping (that was too easy :-P), will look more deeply into this asap.

Flags: needinfo?(lgreco)

With the pref change to have it enabled for early beta, these test changes landed. Should similar changes be done for this test?

Keywords: regression
Regressed by: 1863281
Whiteboard: [addons-jira]
Assignee: nobody → lgreco
Status: NEW → ASSIGNED

(In reply to Luca Greco [:rpl] [:luca] [:lgreco] from comment #3)

The pref alone doesn't seem to be making me hit the test failure as I was originally hoping (that was too easy :-P), will look more deeply into this asap.

actually my first hunch was the right one, the pref was definitely related to the permafailure (I'm pretty sure I mistyped the pref name, schemaless instead of schemeless, when I tried to just set the pref to force a failure).

(In reply to Sebastian Hengst [:aryx] (needinfo me if it's about an intermittent or backout) from comment #4)

With the pref change to have it enabled for early beta, these test changes landed. Should similar changes be done for this test?

that or conditioning the assertion based on the value of the pref, personally I prefer to assert the expected behavior is hit based on the current value of the pref, but I also asked Freddy to review the patch to agree on that.

In the meantime I confirmed that I was able to hit the failure (by using export MOZ_ARTIFACT_REVISION=014286f80c7230b37f492d3f368fd131fe7e2adc and artifact builds) and that the attached patch makes the test to pass.

Flags: needinfo?(lgreco)
Attachment #9365955 - Attachment description: Bug 1867034 - Fix webNavigation central-as-beta test failure hit by tweak the assertion based on dom.security.https_fist_schemeless pref. r?freddyb! → Bug 1867034 - Fix webNavigation central-as-beta test failure by fixing non-schemeless typed url wrongly detected as schemeless. r?freddyb!

(In reply to Cristian Tuns from comment #7)

The patch does not work in today's beta-simulation: https://treeherder.mozilla.org/jobs?repo=try&group_state=expanded&revision=c5a0b1f5c6e1dd5a7919368632c0874ce6bd755c&searchStr=linux%2C18.04%2Cx64%2Cwebrender%2Cdebug%2Cmochitests%2Cwith%2Csoftware%2Cwebrender%2Cenabled%2Ctest-linux1804-64-qr%2Fdebug-mochitest-browser-chrome-swr%2Cbc9&selectedTaskRun=NmVwoypIR6qtEL_42f35IQ.0 Can you please take another look?

Hi Cristian, would you mind to give a try to run the beta-simulation on the last updated version of the patch? (I changed again this morning after we noticed another detail that was definitely worth some more digging)

Flags: needinfo?(ctuns)

Hi, the next beta-simulation will run tomorrow after the merge.

Flags: needinfo?(ctuns)

(In reply to Cristian Tuns from comment #9)

Hi, the next beta-simulation will run tomorrow after the merge.

sounds good, we will be pushing the new patch to nightly in the meantime, because in the end the new version of the attached patch actually fixes a mistake in the test, but I'm adding the leave-open keyword to that we can close the ticket after verifying his behavior in the beta sim.

Keywords: leave-open
Pushed by luca.greco@alcacoop.it: https://hg.mozilla.org/integration/autoland/rev/948f4696d631 Fix webNavigation central-as-beta test failure by fixing non-schemeless typed url wrongly detected as schemeless. r=freddyb

Verified fixed in today's beta-simulation

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Keywords: leave-open
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Target Milestone: --- → 122 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: