Closed Bug 1243561 Opened 4 years ago Closed 4 years ago

Sources missing if Auto Prettify Minified Sources enabled

Categories

(DevTools :: Debugger, defect)

46 Branch
defect
Not set

Tracking

(firefox44 unaffected, firefox45 unaffected, firefox46+ fixed, firefox47+ fixed)

RESOLVED FIXED
Firefox 47
Tracking Status
firefox44 --- unaffected
firefox45 --- unaffected
firefox46 + fixed
firefox47 + fixed

People

(Reporter: hub, Assigned: jlong)

References

Details

(Keywords: regression)

Attachments

(2 files)

I'm trying to debug my stuff, and after some time (a few reload, not exactly sure) I get this instead of the source:

Error loading this URL: key is not a non-null object

Breakpoints are still working though.

The only way to get rid of this is to close the tab and reopen.

See screenshot.
Can you post a simplified STR online somewhere that we can use to debug it?
Go to any page (a github page worked), show the tools, make sure you have the script debugger. click on a source to view the source.

Reload the page

Now you get what I described. (see the screenshot)

I'm running revision a41dc34511b4 of inbound (was doing it on an older one too) on Linux x86_64.
I cannot reproduce. If there's any way you can come up with more specific STR, that would be great.
Updated and rebuilt.

Still happening. Occur also on any bugzilla page or hg.mozilla.org.


Here is what I get in the console when I follow the STR above:

*************************
A coding exception was thrown and uncaught in a Task.

Full message: TypeError: key is not a non-null object
Full stack: SourceUtils.isMinified@chrome://devtools/content/debugger/utils.js:105:5
loadSourceText/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/debugger/content/actions/sources.js:192:13
TaskImpl_run@resource://gre/modules/Task.jsm:319:40
resolve@resource://devtools/shared/deprecated-sync-thenables.js:40:40
resolve@resource://devtools/shared/deprecated-sync-thenables.js:40:40
then@resource://devtools/shared/deprecated-sync-thenables.js:20:43
resolve@resource://devtools/shared/deprecated-sync-thenables.js:72:11
resolve@resource://devtools/shared/deprecated-sync-thenables.js:40:11
then@resource://devtools/shared/deprecated-sync-thenables.js:20:43
resolve@resource://devtools/shared/deprecated-sync-thenables.js:72:11
listenerJson@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/client/main.js:738:9
emitOnObject@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:112:9
emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:89:38
Request.prototype.emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/client/main.js:1232:29
DebuggerClient.prototype.onPacket/emitReply@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/client/main.js:1016:29
DevTools RDP*DebuggerClient.prototype.request@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/client/main.js:722:5
DebuggerClient.requester/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/client/main.js:282:12
exports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14
SourceClient.prototype._onSourceResponse@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/client/main.js:2849:12
SourceClient.prototype.source/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/client/main.js:2795:14
resolve@resource://devtools/shared/deprecated-sync-thenables.js:40:40
then@resource://devtools/shared/deprecated-sync-thenables.js:20:43
resolve@resource://devtools/shared/deprecated-sync-thenables.js:72:11
listenerJson@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/client/main.js:738:9
emitOnObject@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:112:9
emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:89:38
Request.prototype.emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/client/main.js:1232:29
DebuggerClient.prototype.onPacket/emitReply@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/client/main.js:1016:29
DevTools RDP*DebuggerClient.prototype.request@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/client/main.js:722:5
SourceClient.prototype.source@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/client/main.js:2794:12
loadSourceText/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/debugger/content/actions/sources.js:184:32
TaskImpl_run@resource://gre/modules/Task.jsm:319:40
TaskImpl@resource://gre/modules/Task.jsm:280:3
createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:254:14
Task_spawn@resource://gre/modules/Task.jsm:168:12
loadSourceText/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/debugger/content/actions/sources.js:178:18
thunk/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/redux/middleware/thunk.js:15:9
task/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/redux/middleware/task.js:31:12
dispatch@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/vendor/redux.js:384:19
selectSource/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/debugger/content/actions/sources.js:50:5
thunk/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/redux/middleware/thunk.js:15:9
task/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/redux/middleware/task.js:31:12
bindActionCreator/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/vendor/redux.js:418:13
SourcesView.prototype<.sourcesDidUpdate@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/debugger/content/views/sources-view.js:197:9
SourcesView.prototype<.renderSource@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/debugger/content/views/sources-view.js:216:5
onReducerEvents/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/debugger/content/utils.js:40:7
makeStateBroadcaster/<.subscribeToStore/</</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/redux/non-react-subscriber.js:98:17
makeStateBroadcaster/<.subscribeToStore/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/redux/non-react-subscriber.js:97:15
makeStateBroadcaster/<.subscribeToStore/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/redux/non-react-subscriber.js:90:11
createStore/dispatch/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/vendor/redux.js:212:15
dispatch@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/vendor/redux.js:211:6
waitUntilService/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/redux/middleware/wait-service.js:60:20
promiseMiddleware/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/redux/middleware/promise.js:16:14
thunk/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/redux/middleware/thunk.js:16:9
task/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/redux/middleware/task.js:31:12
dispatch@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/vendor/redux.js:384:19
newSource/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/debugger/content/actions/sources.js:32:12
thunk/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/redux/middleware/thunk.js:15:9
task/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/redux/middleware/task.js:31:12
bindActionCreator/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/shared/vendor/redux.js:418:13
DebuggerController.connectThread/<@chrome://devtools/content/debugger/debugger-controller.js:291:7
eventSource/aProto.emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/client/main.js:131:9
DebuggerClient.prototype.onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/client/main.js:965:9
LocalDebuggerTransport.prototype.send/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/transport/transport.js:569:11
exports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14
exports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14

*************************
Seems like a regression with the "Auto Prettify Minified Sources" option.  :hub, does disabling this from the gear menu in the Debugger make sources come back?
Flags: needinfo?(hub)
Yes it does fix the issue. I can live without that option for now.
Flags: needinfo?(hub)
Summary: Devtool debugger no longer want to show source → Sources missing if Auto Prettify Minified Sources enabled
Thanks for narrowing it down! That's very helpful. I'll take a look; we definitely have tests for this so I wonder what's going on.
Assignee: nobody → jlong
Wow, that was super helpful, thanks!

Looks like that bug sets it to a new WeakMap, when it really was just a Map. Easy to fix. Will also look at why tests didn't expose this.
[Tracking Requested - why for this release]: Debugger broken when "Auto Prettify" option is enabled.
Attached patch 1243561.patchSplinter Review
Fixed, also updated one of the tests to mimick a more real-word scenario (which would have exposed this bug).
Attachment #8714466 - Flags: review?(jryans)
My apologies for this regression, not sure how that happened :(
It's ok, our test should have been a more real-life scenario which would have caught this.
https://hg.mozilla.org/mozilla-central/rev/6282ac4733cc
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Comment on attachment 8714466 [details] [diff] [review]
1243561.patch

Approval Request Comment
[Feature/regressing bug #]: 1101817
[User impact if declined]: Auto-pretty printing in debugger is broken
[Describe test coverage new/current, TreeHerder]: Improved existing test to cover regression
[Risks and why]: Very little risk, only a 1-line change 
[String/UUID change made/needed]:
Attachment #8714466 - Flags: approval-mozilla-aurora?
Comment on attachment 8714466 [details] [diff] [review]
1243561.patch

Fix for recent regression, includes new test coverage. 
OK to uplift to aurora.
Attachment #8714466 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Tracking for 46+ since this was a regression from 46.
See Also: → 1260042
[bugday-20160323]

Status: RESOLVED,FIXED -> UNVERIFIED

Comments:
STR: Not clear.
Developer specific testing

Component: 
Name			Firefox
Version			46.0b9
Build ID		20160322075646
Update Channel          beta
User Agent		Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
OS			Windows 7 SP1 x86_64

Expected Results: 
Developer specific testing

Actual Results: 
As expected
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.