https://progress.opensuse.org/https://progress.opensuse.org/themes/openSUSE/favicon/favicon.ico?15829177842022-05-24T18:15:26ZopenSUSE Project Management ToolopenQA Project - action #111545: openQA-in-openQA test fails in search due to new Firefox pop-ups. Can Firefox be asked to not create any pop-ups? auto_review:"(?s)openQA/login.pm:6 called testapi::assert_and_click.*match=openqa-login timed out" size:Mhttps://progress.opensuse.org/issues/111545?journal_id=5225782022-05-24T18:15:26Zokurzokurz@suse.com
<ul><li><strong>Project</strong> changed from <i>openQA Tests</i> to <i>openQA Project</i></li><li><strong>Category</strong> changed from <i>Bugs in existing tests</i> to <i>Feature requests</i></li></ul> openQA Project - action #111545: openQA-in-openQA test fails in search due to new Firefox pop-ups. Can Firefox be asked to not create any pop-ups? auto_review:"(?s)openQA/login.pm:6 called testapi::assert_and_click.*match=openqa-login timed out" size:Mhttps://progress.opensuse.org/issues/111545?journal_id=5227222022-05-25T07:33:51Zokurzokurz@suse.com
<ul><li><strong>Subject</strong> changed from <i>openQA-in-openQA test fails in search due to new Firefox pop-ups. Can Firefox be asked to not create any pop-ups?</i> to <i>openQA-in-openQA test fails in search due to new Firefox pop-ups. Can Firefox be asked to not create any pop-ups? auto_review:"(?s)openQA/login.pm:6 called testapi::assert_and_click.*match=openqa-login timed out":retry</i></li></ul> openQA Project - action #111545: openQA-in-openQA test fails in search due to new Firefox pop-ups. Can Firefox be asked to not create any pop-ups? auto_review:"(?s)openQA/login.pm:6 called testapi::assert_and_click.*match=openqa-login timed out" size:Mhttps://progress.opensuse.org/issues/111545?journal_id=5228272022-05-25T08:58:33Zokurzokurz@suse.com
<ul></ul><p>We found out that most likely we can prevent the dialog by writing a custom preference file which even does not interfer with normal settings. So I suggest within os-autoinst-distri-openQA to add a line</p>
<pre><code>assert_script_run(q{echo 'user_pref("browser.startup.upgradeDialog.enabled", false);' > user.js});
</code></pre>
<p>before the first call to firefox.</p>
<p>If this works I am sure os-autoinst-distri-opensuse users would be happy to receive that patch as well :)</p>
openQA Project - action #111545: openQA-in-openQA test fails in search due to new Firefox pop-ups. Can Firefox be asked to not create any pop-ups? auto_review:"(?s)openQA/login.pm:6 called testapi::assert_and_click.*match=openqa-login timed out" size:Mhttps://progress.opensuse.org/issues/111545?journal_id=5229172022-05-25T09:53:14Zmkittlermarius.kittler@suse.com
<ul><li><strong>Subject</strong> changed from <i>openQA-in-openQA test fails in search due to new Firefox pop-ups. Can Firefox be asked to not create any pop-ups? auto_review:"(?s)openQA/login.pm:6 called testapi::assert_and_click.*match=openqa-login timed out":retry</i> to <i>openQA-in-openQA test fails in search due to new Firefox pop-ups. Can Firefox be asked to not create any pop-ups? auto_review:"(?s)openQA/login.pm:6 called testapi::assert_and_click.*match=openqa-login timed out" size:M</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Workable</i></li></ul> openQA Project - action #111545: openQA-in-openQA test fails in search due to new Firefox pop-ups. Can Firefox be asked to not create any pop-ups? auto_review:"(?s)openQA/login.pm:6 called testapi::assert_and_click.*match=openqa-login timed out" size:Mhttps://progress.opensuse.org/issues/111545?journal_id=5231392022-05-25T20:56:52ZAdamWill
<ul></ul><p>oh boy, have I had fun with this kinda thing:</p>
<p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1703903">https://bugzilla.mozilla.org/show_bug.cgi?id=1703903</a></p>
<p>this is what I'm doing to try and deal with idiotic popups at present:</p>
<pre><code>sub disable_firefox_studies {
# create a config file that disables Firefox's dumb 'shield
# studies' so they don't break tests:
# https://bugzilla.mozilla.org/show_bug.cgi?id=1529626
# and also disables the password manager stuff so that doesn't
# break password entry:
# https://bugzilla.mozilla.org/show_bug.cgi?id=1635833
# and *also* tries to disable "first run pages", though this
# doesn't seem to be working yet:
# https://bugzilla.mozilla.org/show_bug.cgi?id=1703903
assert_script_run 'mkdir -p $(rpm --eval %_libdir)/firefox/distribution';
assert_script_run 'printf \'{"policies": {"DisableFirefoxStudies": true, "OfferToSaveLogins": false, "OverrideFirstRunPage": "", "OverridePostUpdatePage": ""}}\' > $(rpm --eval %_libdir)/firefox/distribution/policies.json';
# Now create a preferences override file that disables the
# quicksuggest and total cookie protection onboarding screens
# see https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig
# for why this wacky pair of files with required values is needed
# and https://bugzilla.mozilla.org/show_bug.cgi?id=1703903 again
# for the actual values
assert_script_run 'mkdir -p $(rpm --eval %_libdir)/firefox/browser/defaults/preferences';
assert_script_run 'printf "// required comment\npref(\'general.config.filename\', \'openqa-overrides.cfg\');\npref(\'general.config.obscure_value\', 0);\n" > $(rpm --eval %_libdir)/firefox/browser/defaults/preferences/openqa-overrides.js';
assert_script_run 'printf "// required comment\npref(\'browser.urlbar.quicksuggest.shouldShowOnboardingDialog\', false);\npref(\'privacy.restrict3rdpartystorage.rollout.enabledByDefault\', false);\n" > $(rpm --eval %_libdir)/firefox/openqa-overrides.cfg';
}
</code></pre>
<p>The problem I see with trying to use a <code>user.js</code> is, it's supposed to go in the Firefox profile directory...which doesn't exist until you've run Firefox. So you'd have to run it, quit, write the file (using wildcards or something to find the right path as it gets random elements in its name), then run it again.</p>
<p>My approach is using a mechanism Firefox calls "autoconfig" to set prefs: <a href="https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig">https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig</a></p>
<p>It's weirdly baroque (I have no idea why they thought this "you have to make one file that points to another file and has a weird magic setting in it" mechanism was a good idea), but it does work if you do it right.</p>
<p>Setting <code>privacy.restrict3rdpartystorage.rollout.enabledByDefault</code> false gets rid of that Total Cookie Protection thing (per Ed Lee on the upstream bug), setting <code>browser.urlbar.quicksuggest.shouldShowOnboardingDialog</code> false deals with a 'quicksuggest' one I was seeing a few weeks ago. Upstream (Mike Kaply) suggested just <code>browser.aboutwelcome.enabled</code> might deal with both, but I haven't tried that yet.</p>
<p>There is also the Policies mechanism - <a href="https://support.mozilla.org/en-US/kb/customizing-firefox-using-policiesjson">https://support.mozilla.org/en-US/kb/customizing-firefox-using-policiesjson</a> - which is easier to use, but only has a limited range of policies. Upstream thought that setting the <code>OverrideFirstRunPage</code> policy to <code>""</code> should get rid of both the total cookie protection and quicksuggest popups, but in my testing it does not seem to, I don't know why not.</p>
openQA Project - action #111545: openQA-in-openQA test fails in search due to new Firefox pop-ups. Can Firefox be asked to not create any pop-ups? auto_review:"(?s)openQA/login.pm:6 called testapi::assert_and_click.*match=openqa-login timed out" size:Mhttps://progress.opensuse.org/issues/111545?journal_id=5231452022-05-25T22:33:12Ztinitatina.mueller+trick-redmine@suse.com
<ul></ul><p>Thanks <a class="user active user-mention" href="https://progress.opensuse.org/users/20072">@AdamWill</a> !</p>
openQA Project - action #111545: openQA-in-openQA test fails in search due to new Firefox pop-ups. Can Firefox be asked to not create any pop-ups? auto_review:"(?s)openQA/login.pm:6 called testapi::assert_and_click.*match=openqa-login timed out" size:Mhttps://progress.opensuse.org/issues/111545?journal_id=5232472022-05-26T08:26:19Zjbaier_czjbaier@suse.cz
<ul><li><strong>Status</strong> changed from <i>Workable</i> to <i>In Progress</i></li><li><strong>Assignee</strong> set to <i>jbaier_cz</i></li></ul> openQA Project - action #111545: openQA-in-openQA test fails in search due to new Firefox pop-ups. Can Firefox be asked to not create any pop-ups? auto_review:"(?s)openQA/login.pm:6 called testapi::assert_and_click.*match=openqa-login timed out" size:Mhttps://progress.opensuse.org/issues/111545?journal_id=5233702022-05-26T18:35:20Zjbaier_czjbaier@suse.cz
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Feedback</i></li></ul><p>Based on suggestions in this ticket, I created a <a href="https://github.com/os-autoinst/os-autoinst-distri-openQA/pull/87" class="external">PR</a> with a fix.</p>
openQA Project - action #111545: openQA-in-openQA test fails in search due to new Firefox pop-ups. Can Firefox be asked to not create any pop-ups? auto_review:"(?s)openQA/login.pm:6 called testapi::assert_and_click.*match=openqa-login timed out" size:Mhttps://progress.opensuse.org/issues/111545?journal_id=5238592022-05-30T08:29:21Zokurzokurz@suse.com
<ul><li><strong>Related to</strong> <i><a class="issue tracker-4 status-3 priority-4 priority-default closed" href="/issues/111416">action #111416</a>: [tools] Firefox: new screen for total cookie protection</i> added</li></ul> openQA Project - action #111545: openQA-in-openQA test fails in search due to new Firefox pop-ups. Can Firefox be asked to not create any pop-ups? auto_review:"(?s)openQA/login.pm:6 called testapi::assert_and_click.*match=openqa-login timed out" size:Mhttps://progress.opensuse.org/issues/111545?journal_id=5238652022-05-30T08:36:22Zokurzokurz@suse.com
<ul></ul><p>merged <a href="https://github.com/os-autoinst/os-autoinst-distri-openQA/pull/87" class="external">https://github.com/os-autoinst/os-autoinst-distri-openQA/pull/87</a></p>
openQA Project - action #111545: openQA-in-openQA test fails in search due to new Firefox pop-ups. Can Firefox be asked to not create any pop-ups? auto_review:"(?s)openQA/login.pm:6 called testapi::assert_and_click.*match=openqa-login timed out" size:Mhttps://progress.opensuse.org/issues/111545?journal_id=5250532022-06-02T12:26:29Zjbaier_czjbaier@suse.cz
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li></ul><p>I saw no more pop-ups since the merge, so let's assume it is fixed.</p>