Closed Bug 1840705 Opened 11 months ago Closed 7 months ago

Translation task queue stops running on Twitter

Categories

(Firefox :: Translations, defect, P2)

defect

Tracking

()

VERIFIED FIXED
120 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox118 --- wontfix
firefox119 --- verified
firefox120 --- verified

People

(Reporter: anatal, Assigned: saschanaz)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

DOM mutations on Twitter are not being captured.

STR:

1 - Go to https://twitter.com/home
2 - Start a translation from a language that your tweets are usually displayed
3 - Start scrolling and note that new tweets are not translated after a while

Expected result:

All new DOM elements added to the page should be translated, in this case, new tweets.

Severity: -- → S3
Blocks: 1838721
See Also: → 1651969
See Also: → 1842820
Blocks: 1845772
No longer blocks: 1838721
Blocks: 1846555
Depends on: 1852337
See Also: → 1853217
See Also: → 1846555
Severity: S3 → S2
Priority: -- → P2

I briefly checked what happens, but I'm not sure what's going on. Looks like that the MutationObserver receives the notification of the added nodes correctly. Then, they will be queued. Then, they'll be submitted as "out-of-view" nodes. Finally, they reach here and finally added a message listener and waited for the end. However, the message listener seems never kicked. So, I guess that this is caused by a bug in the module.

See Also: → 1845776
See Also: → 1850988
No longer depends on: 1852337
See Also: → 1852337

My investigation showed that comment #1 is very correct, and the task queue in translations-engine-worker.js is growing forever. And then I found that there's a typo that causes a task queue to never finish: https://searchfox.org/mozilla-central/rev/e9b338c2d597067f99e96d5f20769f41f312fa8f/toolkit/components/translations/content/translations-engine-worker.js#771 (It's now .isRunning = false but it should be .#isRunning = false). I'll submit a patch.

Assignee: nobody → krosylight
Status: NEW → ASSIGNED

(I'm sure we'll want to uplift this)

Summary: Mutation not being captured on Twitter → Translation task queue stops running on Twitter
Pushed by krosylight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/be3fab03251c
Fix isRunning typo in translations-engine-worker.js r=gregtatum

Donal, just putting this on your radar: it'd be really nice to uplift to 119 given it is fixing an important bug in a new feature and the fix is really simple.

Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch

(In reply to Marco Castelluccio [:marco] from comment #6)

Donal, just putting this on your radar: it'd be really nice to uplift to 119 given it is fixing an important bug in a new feature and the fix is really simple.

Can I get an uplift request on this and I can include it for RC

Flags: needinfo?(krosylight)

Comment on attachment 9358114 [details]
Bug 1840705 - Fix isRunning typo in translations-engine-worker.js r=marco

Beta/Release Uplift Approval Request

  • User impact if declined: Users won't be able to get the translated content when the page changes.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: See https://phabricator.services.mozilla.com/D190827#6321716
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): It's just a typo fix.
  • String changes made/needed:
  • Is Android affected?: No
Flags: needinfo?(krosylight)
Attachment #9358114 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9358114 [details]
Bug 1840705 - Fix isRunning typo in translations-engine-worker.js r=marco

Approved for 119.0 RC1

Attachment #9358114 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Duplicate of this bug: 1651969
See Also: 1651969
No longer blocks: 1846555
Duplicate of this bug: 1846555
See Also: 1846555
Duplicate of this bug: 1845776
See Also: 1845776
Duplicate of this bug: 1852337
See Also: 1852337
Duplicate of this bug: 1853217
See Also: 1853217
See Also: 1850988
Duplicate of this bug: 1856302
Duplicate of this bug: 1849975
QA Whiteboard: [qa-triaged]

(In reply to Kagami [:saschanaz] (they/them) from comment #9)

Comment on attachment 9358114 [details]
Bug 1840705 - Fix isRunning typo in translations-engine-worker.js r=marco

Hello and thank you for the detailed steps. I want to confirm that what I'm seeing is correct by following the next steps:

  1. Open Reddit and log in.
  2. Activate and open the multiprocess browser toolbox and select Debugger.
  3. Go back to the Reddit page and manually translate the page (App Menu> Translate page) once to German then click Show original (this is how the translations-ending-worker.js is displayed for me in the toolbox)
  4. Set the following log points: line714 on line 714, line731 on line 731 and line771 on line 771 and enable split console.
  5. Manually translate the page to German and wait for the line771 message to be displayed.
  6. Scroll down to the bottom of the page and observe the results
    Actual result: line714, line731 and line771 are displayed again (I get multiple messages for this).
    Note: with Firefox 118.0.2 I can only see the line714 message displayed by following the same steps.

I have also made a screen recording. Can you please confirm that the steps and expected results are accurate?

Also following the below steps will not translate the newly loaded content for me if I'm not logged in, but it seems that it is working if I'm logged in, is this expected?

  1. Go to reddit.com
  2. Manually translate from English to Spanish.
  3. Wait until the page is fully translated.
  4. Scroll down to the bottom to load in new Reddit posts.

Testing was performed with Firefox 120.0a1 (2023-10-16). Thank you in advance!

Flags: needinfo?(krosylight)
Attached image reddit_18407005.gif

Screen recording...

(In reply to Alexandru Trif, Desktop QA [:atrif] from comment #19)

I have also made a screen recording. Can you please confirm that the steps and expected results are accurate?

The GIF looks good, thanks! The point is that you get the line 771, scroll down, and you get line 731 again, which is definitely happening on your screen recording 👍

Also following the below steps will not translate the newly loaded content for me if I'm not logged in, but it seems that it is working if I'm logged in, is this expected?

That's bug 1842820, because somehow Reddit renders things differently when you are not logged in.

Flags: needinfo?(krosylight)

(In reply to Kagami [:saschanaz] (they/them) from comment #21)

(In reply to Alexandru Trif, Desktop QA [:atrif] from comment #19)

I have also made a screen recording. Can you please confirm that the steps and expected results are accurate?

The GIF looks good, thanks! The point is that you get the line 771, scroll down, and you get line 731 again, which is definitely happening on your screen recording 👍

Also following the below steps will not translate the newly loaded content for me if I'm not logged in, but it seems that it is working if I'm logged in, is this expected?

That's bug 1842820, because somehow Reddit renders things differently when you are not logged in.

Thank you for the response!

The issue is verified fixed with Firefox 120.0a1 (2023-10-16) on Windows 10x64, macOS 12 and Ubuntu 20.04 by using steps from comment 19. After line 771 is displayed on the first page translate, scrolling down the Reddit page will display again lines 714, 731, and 771 when new Reddit content is loaded.

I will verify this again with Firefox 119.0RC1 when the official build is available. Thank you!

Verified fixed with Firefox 119.0RC1 on Windows 10x64, macOS 12 and Ubuntu 20.04 by using steps from comment 19. Lines 714, 731, and 771 are displayed again when loading new content on Reddit while the user is logged in.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
No longer duplicate of this bug: 1845776
Duplicate of this bug: 1845776
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: