Closed Bug 1624422 Opened 5 months ago Closed 4 months ago

Intermittent comm/mail/base/test/webextensions/*.js | A promise chain failed to handle a rejection: can't access property "replace", placeholder is null - stack: @chrome://messenger/content/aboutAddonsExtra.js:40:5

Categories

(Thunderbird :: Add-Ons: General, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 76.0

People

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

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Waiting for requestAnimationFrame seems to fix the problem. I'm not certain that this will work 100% of the time, but it makes sense that layout of the search custom element and fetching the fluent string need to happen before the next frame is drawn.

Assignee: nobody → geoff
Status: NEW → ASSIGNED
Attachment #9135903 - Flags: review?(mkmelin+mozilla)

I don't suppose there's an event one can listen to do make sure the document fluent localization took place? If there isn't, should there be one?

Flags: needinfo?(gandalf)
Attachment #9135903 - Flags: review?(mkmelin+mozilla) → review+

I've tried waiting for document.l10n.ready but it's not sufficient to fix this. I suspect that, in combination with a setTimeout would work, but what I've suggested is tidier.

I don't understand why document.l10n.ready is not sufficient?

Flags: needinfo?(gandalf)

Also, generally speaking, tests should test for data-l10n-id/data-l10n-args to be set, not for values to be applied.
Just like tests test for css classes to be set, not for colors or font weights to be applied.

I think it's because the element doesn't initially exist in the document, it's added by a custom element connectedCallback.

This code isn't actually part of the test, it's part of the product, which is failing and causing the test to blow up.

Summary: Intermittent comm/mail/base/test/webextensions/browser_update_checkForUpdates.js | A promise chain failed to handle a rejection: can't access property "replace", placeholder is null - stack: @chrome://messenger/content/aboutAddonsExtra.js:40:5 → Intermittent comm/mail/base/test/webextensions/*.js | A promise chain failed to handle a rejection: can't access property "replace", placeholder is null - stack: @chrome://messenger/content/aboutAddonsExtra.js:40:5

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/14fc66cf01c9
Wait for loading to complete before changing Add-On Manager search box placeholder. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 76.0
You need to log in before you can comment on or make changes to this bug.