Closed Bug 1837370 Opened 1 year ago Closed 1 year ago

"DataCloneError: The object could not be cloned" when using the Firefox Translations addon

Categories

(Core :: DOM: Core & HTML, defect)

defect

Tracking

()

VERIFIED FIXED
116 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox114 --- unaffected
firefox115 --- unaffected
firefox116 --- verified

People

(Reporter: marco, Assigned: peterv)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

STR:

  1. Install the Firefox Translations addon
  2. Navigate to a web page, trigger a translation from the URL bar icon

The translation does not happen, and I see the following error in the browser console:

DataCloneError: The object could not be cloned. ExtensionChild.sys.mjs:180:26
emit resource://gre/modules/ExtensionChild.sys.mjs:180
recvRuntimeMessage resource://gre/modules/ExtensionChild.sys.mjs:383
_recv resource://gre/modules/ConduitsChild.sys.mjs:77
receiveMessage resource://gre/modules/ConduitsChild.sys.mjs:189

Regression range found by mozregression: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=b1ab6c750d04299011c1446b1752c2ff98a92b33&tochange=599e77c29bb65bfdeef912a39f2488128ac10943

I guess bug 1828264 is the culprit.

Set release status flags based on info from the regressing bug 1828264

:peterv, since you are the author of the regressor, bug 1828264, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Looks like the extensions code is deserializing a blob inside of a sandbox, which is problematic.

Assignee: nobody → peterv
Status: NEW → ASSIGNED
Attachment #9338173 - Attachment description: WIP: Bug 1837370 - "DataCloneError: The object could not be cloned" when using the Firefox Translations addon. r?farre! → Bug 1837370 - "DataCloneError: The object could not be cloned" when using the Firefox Translations addon. r?farre!
Pushed by pvanderbeken@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7d3fb55b4418 "DataCloneError: The object could not be cloned" when using the Firefox Translations addon. r=farre

Backed out for causing hazard bustage on StructuredCloneHolder.cpp

Backout link

Push with failures

Failure log

Unsure if other extensions are affected but this has apparently broken the clipboard2file addon.

https://github.com/vord1080/clipboard2file/issues/17

(I use it frequently so looking forward to the fix 😁 )

Pushed by pvanderbeken@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0394e1ebde86 "DataCloneError: The object could not be cloned" when using the Firefox Translations addon. r=farre
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Flags: needinfo?(peterv)

Hello! I tried to reproduce the issue with Firefox 116.0a1 (2023-06-19) on Windows 10x64 by installing Firefox Translations addon but the addon button to translate the page does not appear in the URL bar from some reason after visiting a page.

I installed the same addon on FirefoxRC2 116.0 (20230727152340) and it seems that the addon is displayed in the URL bar after visiting a page. I can not see any errors in the browser's console after translating a page and the page is correctly translated.

The addon button does not appear in the URL bar in the latest nightly either. So most probably there is some preference/settings involved. Does anyone know how to make the addon appear in the URL bar on a nightly build to correctly reproduce the issue? Thank you in advance!

Alexandru, you can temporarily set the "browser.translations.enable" pref to False to disable the built-in functionality. The addon icon is only shown when the built-in functionality is disabled.
Without the icon, you can still test other addon functionality, like selecting text and translating it (available from the context menu).

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

Alexandru, you can temporarily set the "browser.translations.enable" pref to False to disable the built-in functionality. The addon icon is only shown when the built-in functionality is disabled.
Without the icon, you can still test other addon functionality, like selecting text and translating it (available from the context menu).

Thank you very much for the detailed explanation, Marco! I could successfully reproduce the issue and the icon is displayed in the nightly build as well. Closing this as verified per previous comments.

Status: RESOLVED → VERIFIED
Has STR: --- → yes
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: