Closed Bug 1675506 Opened 4 years ago Closed 4 years ago

tb perma TEST-UNEXPECTED-TIMEOUT | toolkit/components/search/tests/xpcshell/test_webextensions_startup_remove.js | Test timed out - port bug 1643858

Categories

(Thunderbird :: Search, defect, P5)

defect

Tracking

(thunderbird_esr78 unaffected, thunderbird83 unaffected)

RESOLVED FIXED
84 Branch
Tracking Status
thunderbird_esr78 --- unaffected
thunderbird83 --- unaffected

People

(Reporter: intermittent-bug-filer, Assigned: mkmelin)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

See Also: → 1643858
Summary: Intermittent TEST-UNEXPECTED-TIMEOUT | toolkit/components/search/tests/xpcshell/test_webextensions_startup_remove.js | Test timed out → tb perma TEST-UNEXPECTED-TIMEOUT | toolkit/components/search/tests/xpcshell/test_webextensions_startup_remove.js | Test timed out

Not sure if this is the cause or harmless:
:10.63 INFO "CONSOLE_MESSAGE: (error) [JavaScript Error: "can't access property "arm", this._batchTask is null" {file: "resource://gre/modules/SearchSettings.jsm" line: 145}]
task@resource://gre/modules/SearchSettings.jsm:145:11
_runTask@resource://gre/modules/DeferredTask.jsm:333:18
_timerCallback/<@resource://gre/modules/DeferredTask.jsm:305:20
_timerCallback@resource://gre/modules/DeferredTask.jsm:324:9
finalize@resource://gre/modules/DeferredTask.jsm:276:12
_ensurePendingWritesCompleted@resource://gre/modules/SearchSettings.jsm:180:18
get@resource://gre/modules/SearchSettings.jsm:97:16
_init@resource://gre/modules/SearchService.jsm:258:43
init@resource://gre/modules/SearchService.jsm:1273:18
test_removeAddonOnStartup@/home/magnus/Code/tb/mozilla/obj-x86_64-pc-linux-gnu/_tests/xpcshell/toolkit/components/search/tests/xpcshell/test_webextensions_startup_remove.js:67:25
_do_main@/home/magnus/Code/tb/mozilla/testing/xpcshell/head.js:239:6
_execute_test@/home/magnus/Code/tb/mozilla/testing/xpcshell/head.js:568:5
@-e:1:1

Just making it this._batchTask?.arm(); doesn't change anything.

That error is present for Firefox as well so I'll assume harmless.

The issue is that this promise never resolves: https://searchfox.org/mozilla-central/rev/96e2c6e14998f38e419850d55d8a3d32a3fc244a/toolkit/components/search/tests/xpcshell/test_webextensions_startup_remove.js#61,68

No "engine-removed" is ever triggered. I don't quite see where that's triggered in Firefox either.
Mark, any ideas?

Flags: needinfo?(standard8)

I've had a look and the only thing I can really see is that the add-on manager sees the uninstall of the add-on, but for some reason with the Thunderbird build it never gets through to the search service.

Unfortunately I couldn't get the debugger working to try and see what was happening in ext-chrome-settings-overrides.js.

Passing needinfo over to Shane as he might have some ideas.

(Also, the error in comment 3 is harmless, though I'll do a patch for that, as I meant to avoid it, but a later change brought it back again).

Flags: needinfo?(standard8) → needinfo?(mixedpuppy)
See Also: → 1676117

I don't see any obvious problem here, my guess is a difference in prefs set for the addon manager is changing some timing between the scan that catches removed addons, and something in the search service. Can you enable extensions.logging.enabled for a test run and see what the logging from the addon manager looks like?

Flags: needinfo?(mixedpuppy) → needinfo?(mkmelin+mozilla)

Thanks for the tip, ./mach test --setpref=extensions.logging.enabled=true toolkit/components/search/tests/xpcshell/test_webextensions_startup_remove.js gave me some clues

I didn't realize Thunderbird has its own ext-chrome-settings-overrides.js file. This chunk needs to be ported: https://hg.mozilla.org/mozilla-central/rev/d18224bb657a#l1.23

Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Flags: needinfo?(mkmelin+mozilla)
Summary: tb perma TEST-UNEXPECTED-TIMEOUT | toolkit/components/search/tests/xpcshell/test_webextensions_startup_remove.js | Test timed out → tb perma TEST-UNEXPECTED-TIMEOUT | toolkit/components/search/tests/xpcshell/test_webextensions_startup_remove.js | Test timed out - port 1643858
Summary: tb perma TEST-UNEXPECTED-TIMEOUT | toolkit/components/search/tests/xpcshell/test_webextensions_startup_remove.js | Test timed out - port 1643858 → tb perma TEST-UNEXPECTED-TIMEOUT | toolkit/components/search/tests/xpcshell/test_webextensions_startup_remove.js | Test timed out - port bug 1643858

Syncing up our copy of the file with Firefox's (which likely fixes some other thing not working correctly as well.)

Try: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=333bffb780f30a3f1d880b0451bb234f9d880ed6

Attachment #9186888 - Flags: review?(john)
Target Milestone: --- → 84 Branch

Comment on attachment 9186888 [details] [diff] [review]
bug1675506_test_webextensions_startup_remove.patch

I compared the patched version to the m-c counterpart and it looks good, everything related to homepage is excluded.

The only thing which might be off is the first comment, as it states to be a copy of browser/components/extensions/ExtensionControlledPopup.jsm but it is a copy of browser/components/extensions/parent/ext-chrome-settings-overrides.js.

Attachment #9186888 - Flags: review?(john) → review+

Is there any reason to keep a separate implementation? This file is likely to continue changing in some small ways, such as in https://phabricator.services.mozilla.com/D93584

If there are specific needs for TB, perhaps we should look at what that is and whether it makes sense to merge it back to m-c

Flags: needinfo?(mkmelin+mozilla)

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/a733bfe5d1af
port bug 1643858 - sync up with Firefox's copy of ext-chrome-settings-overrides.js. r=TbSync

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED

(In reply to Shane Caraveo (:mixedpuppy) from comment #13)

Is there any reason to keep a separate implementation?

For this case, Thunderbird doesn't have a HomePage.jsm which lives in browser/ (and functionality of it is likely irrelevant). We only use code that is under toolkit/.

If there are specific needs for TB, perhaps we should look at what that is and whether it makes sense to merge it back to m-c

In general we of course like to as much as possible use toolkit files directly, and not have these kind of semi forks. I don't know how feasible it is in this case though. It would at least require refactoring out the homepage parts of it. If there's interest in taking a patch for something like that, maybe we should go for it.

Flags: needinfo?(mkmelin+mozilla)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: