Improve the error message produced when a user attempts to access a property of [something that evaluated to] undefined.
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
People
(Reporter: mrrrgn, Assigned: arai, NeedInfo)
References
(Blocks 3 open bugs)
Details
(Keywords: dev-doc-complete, feature, site-compat)
Attachments
(2 files, 3 obsolete files)
Comment 1•9 years ago
|
||
Reporter | ||
Comment 2•9 years ago
|
||
Updated•6 years ago
|
Comment 3•6 years ago
|
||
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
Assignee | ||
Comment 7•6 years ago
|
||
Assignee | ||
Comment 8•6 years ago
|
||
Comment 9•6 years ago
|
||
Assignee | ||
Comment 10•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
bugherder |
Comment 13•6 years ago
|
||
Assignee | ||
Comment 14•6 years ago
|
||
Comment 15•6 years ago
|
||
Assignee | ||
Comment 16•6 years ago
|
||
Comment 17•6 years ago
|
||
Comment 19•6 years ago
|
||
Comment 21•6 years ago
|
||
Comment 22•6 years ago
|
||
Updated•6 years ago
|
Comment 23•6 years ago
|
||
Comment 24•6 years ago
|
||
Comment 25•6 years ago
|
||
Comment 26•6 years ago
|
||
Updated•6 years ago
|
Comment 27•6 years ago
|
||
Comment 28•6 years ago
|
||
Comment 29•6 years ago
|
||
Comment 30•6 years ago
|
||
Comment 31•6 years ago
|
||
Assignee | ||
Comment 32•6 years ago
|
||
Comment 33•6 years ago
|
||
Assignee | ||
Comment 34•6 years ago
|
||
Updated•6 years ago
|
Comment 35•5 years ago
|
||
Mike, Adam, not shipping this means regressing error messages for developers (like https://twitter.com/SamHulick/status/1204598663525421056/photo/1), so I wanted to re-open this discussion to at least iterate this forward.
We might get this unstuck by limiting exposure:
a) Maybe just ship this to DevEdition and let it bake there until the web catches up. This way developers can be exposed and hopefully can fix their error detection.
b) Only throw better error messages when DevTools is open
What are your thoughts?
Comment 36•5 years ago
|
||
a) Maybe just ship this to DevEdition and let it bake there until the web catches up. This way developers can be exposed and hopefully can fix their error detection.
I think this approach is good -- ship in DevEdition (maybe beta?) + Nightly and not break release.
Comment 37•5 years ago
|
||
(In reply to Mike Taylor [:miketaylr] from comment #36)
I think this approach is good -- ship in DevEdition (maybe beta?) + Nightly and not break release.
If we do this, how could we make sure to not regress a release? If we would also exclude beta it would be more safe. See eg bug 1512401, which I filed only a couple days before a release.
Comment 38•5 years ago
|
||
effectively,
if NOT_RELEASE:
do new thing
else:
do old thing
It won't ride to release, until some future point where we have confidence we can ship it (if ever).
Comment 39•5 years ago
|
||
I proposed Nightly and DevEdition (exclude Beta) to reach developers. This is the audience that we need need to make aware of the error-detection breakage in their projects. Beta should stay intact and close to behavior of release.
If we can land this behind a pref, we can also mitigate any impact we see and roll back off-train. We have other devtools prefs recently that were only enabled on Nightly/DevEdition https://searchfox.org/mozilla-central/source/modules/libpref/init/all.js#4911 : #if defined(MOZ_DEV_EDITION) || defined(NIGHTLY_BUILD)
.
Upside will hopefully be that developers have a place to discover, test and fix error parsing breakage. The trade-off would be that Nightly and DevEdition users will receive increased breakage for daily browsing and this will add overhead in web compat triage to sift out the breakage caused by the improved error messages.
Comment 40•5 years ago
|
||
Have we though about switching to error message from
win.browser.runtime is undefined, can't access property "getManifest" of it
to
can't access property "getManifest", win.browser.runtime is undefined
I think this might have a higher probability of keeping some of those regular expressions working.
Comment 41•5 years ago
|
||
I think this might have a higher probability of keeping some of those regular expressions working.
How confident would we be that this breaks scripts less?
Alternatively, we could report the better error just to the Console and the old one to content?
Comment 42•5 years ago
|
||
(In reply to :Harald Kirschner :digitarald from comment #41)
I think this might have a higher probability of keeping some of those regular expressions working.
How confident would we be that this breaks scripts less?
I looked into some of the previous failures reported here, and it would not help much. For example the problem described in bug 1490772 Comment 5 would still occur.
Alternatively, we could report the better error just to the Console and the old one to content?
I don't know, we would have to add a lot of extra machinery to make this possible.
I think we should try doing this for the Dev Edition and Nightly like you proposed.
Comment 43•5 years ago
|
||
:arai, would you be interested in re-landing this behind a pref that can be enabled for Nightly/DE?
Assignee | ||
Comment 44•5 years ago
|
||
will look into this weekend.
Assignee | ||
Comment 45•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 46•5 years ago
|
||
Depends on D58103
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 47•5 years ago
|
||
Comment 48•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/03939cd2d0ab
https://hg.mozilla.org/mozilla-central/rev/e8d220dbe029
Updated•5 years ago
|
Description
•