measureText from webextension throws error on mail.google.com
Categories
(WebExtensions :: Untriaged, defect, P3)
Tracking
(firefox84 affected, firefox85 affected, firefox86 affected)
People
(Reporter: code, Unassigned)
Details
Attachments
(1 file)
10.00 KB,
application/x-tar
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0
Steps to reproduce:
Loaded attached webextension reproducer, which calls CanvasRenderingContext2D.measureText() and then navigated to https://mail.google.com/mail/u/0/#inbox
Actual results:
measureText throws an error, which results in the following text being logged:
TextMetrics { width: 6.133333206176758, actualBoundingBoxLeft: 0, actualBoundingBoxRight: 6, actualBoundingBoxAscent: 6, actualBoundingBoxDescent: 0 }
content.js:7:25
TextMetrics { width: 6.133333206176758, actualBoundingBoxLeft: 0, actualBoundingBoxRight: 6, actualBoundingBoxAscent: 6, actualBoundingBoxDescent: 0 }
content.js:7:25
TextMetrics { width: 6.133333206176758, actualBoundingBoxLeft: 0, actualBoundingBoxRight: 6, actualBoundingBoxAscent: 6, actualBoundingBoxDescent: 0 }
content.js:7:25
Exception { name: "NS_ERROR_FAILURE", message: "", result: 2147500037, filename: "moz-extension://0e5f199b-ab10-4230-b4ea-9cacd37963f5/content.js", lineNumber: 7, columnNumber: 0, data: null, stack: "@moz-extension://0e5f199b-ab10-4230-b4ea-9cacd37963f5/content.js:7:37\nsetTimeout handler*@moz-extension://0e5f199b-ab10-4230-b4ea-9cacd37963f5/content.js:2:11\n" }
content.js:9:25
Exception { name: "NS_ERROR_FAILURE", message: "", result: 2147500037, filename: "moz-extension://0e5f199b-ab10-4230-b4ea-9cacd37963f5/content.js", lineNumber: 7, columnNumber: 0, data: null, stack: "@moz-extension://0e5f199b-ab10-4230-b4ea-9cacd37963f5/content.js:7:37\nsetTimeout handler*@moz-extension://0e5f199b-ab10-4230-b4ea-9cacd37963f5/content.js:2:11\n" }
content.js:9:25
TextMetrics { width: 6.133333206176758, actualBoundingBoxLeft: 0, actualBoundingBoxRight: 6, actualBoundingBoxAscent: 6, actualBoundingBoxDescent: 0 }
content.js:7:25
Expected results:
No errors, resulting in the following messages being printed:
TextMetrics { width: 6.133333206176758, actualBoundingBoxLeft: 0, actualBoundingBoxRight: 6, actualBoundingBoxAscent: 6, actualBoundingBoxDescent: 0 }
content.js:7:25
TextMetrics { width: 6.133333206176758, actualBoundingBoxLeft: 0, actualBoundingBoxRight: 6, actualBoundingBoxAscent: 6, actualBoundingBoxDescent: 0 }
content.js:7:25
TextMetrics { width: 6.133333206176758, actualBoundingBoxLeft: 0, actualBoundingBoxRight: 6, actualBoundingBoxAscent: 6, actualBoundingBoxDescent: 0 }
content.js:7:25
TextMetrics { width: 6.133333206176758, actualBoundingBoxLeft: 0, actualBoundingBoxRight: 6, actualBoundingBoxAscent: 6, actualBoundingBoxDescent: 0 }
content.js:7:25
TextMetrics { width: 6.133333206176758, actualBoundingBoxLeft: 0, actualBoundingBoxRight: 6, actualBoundingBoxAscent: 6, actualBoundingBoxDescent: 0 }
content.js:7:25
TextMetrics { width: 6.133333206176758, actualBoundingBoxLeft: 0, actualBoundingBoxRight: 6, actualBoundingBoxAscent: 6, actualBoundingBoxDescent: 0 }
content.js:7:25
Comment 1•4 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•4 years ago
|
||
Hello,
I’ve managed to reproduce the issue on the latest Nightly (86.0a1/20210113213439), Beta (85.0b9/20210114193053) and Release (84.0.2/20210105180113) under Windows 10 x64 and Ubuntu 16.04 LTS.
The errors are logged in the console, as mentioned in the description of the issue.
Comment 3•4 years ago
|
||
Alex, can we get a regression range here please?
(In reply to glacambre from comment #0)
Steps to reproduce:
Loaded attached webextension reproducer, which calls CanvasRenderingContext2D.measureText() and then navigated to https://mail.google.com/mail/u/0/#inbox
Can you please confirm the source of the error, is it perhaps an iframe on google.com?
Can you please confirm the source of the error, is it perhaps an iframe on google.com?
Printing window.location when the error occurs shows a url that doesn't match that of the current page so I think that this indeed happens in an iframe.
I tried to inspect window.frames
from the console but Firefox froze each time I tried (thrice, I had to use kill -9
every time). I don't have the energy to file a bug report for this though but hopefully someone else will :).
Comment 5•4 years ago
|
||
Hello,
I’ve performed a regression range spanning from 01.01.2018 to the present day and the results show that the issue might not be a regression, as all tested builds were affected (i.e the errors were logged in the console when reaching the gmail inbox page).
I’ve also observed that the errors are logged when accessing https://www.reddit.com/.
Updated•2 years ago
|
Description
•