Open kalkih opened 2 years ago
@kalkih can you clarify what the bug is? Is the error popup supposed to show at a different time?
@kalkih I think the link to the source code is wrong. Should most likely be this: https://github.com/kalkih/firefox-script-error-ios/blob/main/index.html
@dnarcese The bug is that the alert is shown at all. It shouldn't be. It should only be shown on an error. And no error should be emitted by just loading the page.
I think it's also related to this one:
I wrote a reproducible demo (more complex)
We're still running into this bug. I managed to get some more info out of the error message
{
"message": "Syntax Error: No identifiers allowed directly after numeric literal",
"filename": "http://192.168.68.109:8080/",
"lineno": 1,
"colno": 0,
"error": null
}
This is the source of the page
<html>
<body>
<script>
var errStringified = (err) =>
JSON.stringify(
Object.getOwnPropertyNames(Object.getPrototypeOf(err)).reduce((acc, cur) => {
acc[cur] = err[cur];
return acc;
}, {})
);
window.addEventListener('error', e => {
document.body.innerText = errStringified(e)
})
</script>
</body>
</html>
This issue has been automatically marked as stale. Has the issue been fixed, or does it still require the community's attention? Please leave any comment to keep this issue opened. It will be closed automatically if no further update occurs in the next 30 days. Thank you for your contributions!
Well, nobody cared or tested the bug, just a "stale bot" tried to close the pending issues? Also see my example: Nonsense script error when inserting new elements into DOM #11191
Steps to reproduce
The example to reproduce the issue consists of a window.addEventListener("error") which fires on the error and displays it in an alert Source code for the example: https://github.com/kalkih/firefox-script-error-ios/blob/main/index.html
Expected behavior
No error should be thrown on page load
Actual behavior
An error is thrown on page load which fires the
window.addEventListener("error")
Device & build information
Notes
With "Enhanced Tracking Protection" switched to on, the error doesn't seem to be thrown when accessing a root page. Can be reproduced by serving the
index.html
page in the example locally on "/"┆Issue is synchronized with this Jira Task