Reverted Improved JavaScript error message breaks code relying on the legacy format

Published: | Categories: JavaScript


In an effort to make console outputs easier to understand for web developers, Firefox 63 and 64 have improved a JavaScript error message that will be produced when attempting to access a property of undefined. For example,

// Firefox 62:
//// TypeError: window.x is undefined
// Firefox 63:
//// TypeError: window.x is undefined, can't access property "y" of it
// Firefox 64:
//// TypeError: window.x is undefined; can't access its "y" property

While these changes look harmless, there’s a report of a broken site where the page becomes completely blank. Mozilla developers have figured out the cause was the site’s code parsing JavaScript error messages with a regular expression for their own error handling. The notified webmaster has fixed the issue before the final release of Firefox 63.

Given that the format of error messages is not standardized in the ECMAScript spec, web developers are discouraged to use them programmatically.

Update: Flipkart is known to be affected by this change.

Updated 2 This change has been backed out from Firefox 63 Release Candidate 2.