Source link in details panel opens view-source:undefined

RESOLVED FIXED in Firefox 43

Status

defect
RESOLVED FIXED
4 years ago
a year ago

People

(Reporter: xidorn, Assigned: jryans)

Tracking

Trunk
Firefox 44
Dependency tree / graph

Firefox Tracking Flags

(firefox40 unaffected, firefox41 unaffected, firefox42 unaffected, firefox43+ fixed, firefox44+ fixed)

Details

(Whiteboard: [polish-backlog])

Attachments

(2 attachments)

Reporter

Description

4 years ago
STR:
1. open Performance panel in DevTools
2. record something which invokes event handler
3. click items in records which has stack info listed
4. click any source link (the xxx.js:NN link)

Expected result:
it opens the source code in whichever way and jump to the specific line

Actuall result:
it opens a new tab with url "view-source:undefined"


I can only reproduce this on Nightly.
What's the URL displayed that goes to "view-source:undefined"? Do you have a site you can recreate this on?
Flags: needinfo?(quanxunzhen)
Reporter

Comment 2

4 years ago
I can reproduce this on any site.

The URL in the panel looks normal, but when I click it, it jumps to "view-source:undefined" and then become "view-source:http://undefined/".

Also I see this error in the browser console after loading, probably related:

ViewSourceBrowser.jsm:185:0

A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise

Date: Wed Sep 09 2015 09:36:45 GMT+1000 (AUS Eastern Standard Time)
Full Message: Error: Must supply a URL when opening view source.
Full Stack: loadViewSource@resource://gre/modules/ViewSourceBrowser.jsm:185:1
gViewSourceUtils.viewSourceInBrowser@chrome://global/content/viewSourceUtils.js:90:5
BrowserViewSourceOfDocument@chrome://browser/content/browser.js:13170:5
exports.viewSource<@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/shared/source-utils.js:128:12
TaskImpl_run@resource://gre/modules/Task.jsm:314:40
TaskImpl@resource://gre/modules/Task.jsm:275:3
createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:249:14
exports.viewSourceInDebugger<@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/shared/source-utils.js:72:3
TaskImpl_run@resource://gre/modules/Task.jsm:314:40
Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:934:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:813:7
Promise*this.PromiseWalker.scheduleWalkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:744:11
this.PromiseWalker.schedulePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:776:7
this.PromiseWalker.completePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:711:7
EventEmitter_once/handler@resource://gre/modules/devtools/event-emitter.js:94:7
EventEmitter_emit@resource://gre/modules/devtools/event-emitter.js:147:11
SourceScripts.prototype._onSourcesAdded@chrome://browser/content/devtools/debugger-controller.js:1334:5
DebuggerClient.requester/</<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/client/main.js:283:9
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:86:14
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://gre/modules/devtools/client/main.js:1157:29
DebuggerClient.prototype.onPacket/emitReply@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/client/main.js:968:29
DevTools RDP*DebuggerClient.prototype.request@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/client/main.js:674:5
DebuggerClient.requester/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/client/main.js:271:1
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:86:14
SourceScripts.prototype.handleTabNavigation@chrome://browser/content/devtools/debugger-controller.js:1237:5
SourceScripts.prototype.connect@chrome://browser/content/devtools/debugger-controller.js:1202:5
DebuggerController._startDebuggingTab/<@chrome://browser/content/devtools/debugger-controller.js:321:7
TabClient.prototype.attachThread/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/client/main.js:1216:7
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://gre/modules/devtools/client/main.js:1157:29
DebuggerClient.prototype.onPacket/emitReply@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/client/main.js:968:29
DevTools RDP*DebuggerClient.prototype.request@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/client/main.js:674:5
TabClient.prototype.attachThread@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/client/main.js:1211:5
DebuggerController._startDebuggingTab@chrome://browser/content/devtools/debugger-controller.js:312:5
DebuggerController.connect<@chrome://browser/content/devtools/debugger-controller.js:217:13
TaskImpl_run@resource://gre/modules/Task.jsm:314:40
TaskImpl@resource://gre/modules/Task.jsm:275:3
createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:249:14
DebuggerPanel.prototype.open/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/debugger/panel.js:55:19
Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:934:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:813:7
Promise*this.PromiseWalker.scheduleWalkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:744:11
this.PromiseWalker.schedulePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:776:7
this.PromiseWalker.completePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:711:7
Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:934:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:813:7
Promise*this.PromiseWalker.scheduleWalkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:744:11
this.PromiseWalker.schedulePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:776:7
this.PromiseWalker.completePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:711:7
TaskImpl_run@resource://gre/modules/Task.jsm:319:13
resolve@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/deprecated-sync-thenables.js:40:40
then@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/deprecated-sync-thenables.js:20:43
resolve@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/deprecated-sync-thenables.js:72:11
DebuggerView._onEditorLoad/<@chrome://browser/content/devtools/debugger-view.js:319:7
resolve@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/deprecated-sync-thenables.js:40:40
then@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/deprecated-sync-thenables.js:20:43
then@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/deprecated-sync-thenables.js:58:9
DebuggerView._onEditorLoad@chrome://browser/content/devtools/debugger-view.js:317:5
DebuggerView._initializeEditor/<@chrome://browser/content/devtools/debugger-view.js:288:7
Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:934:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:813:7
Promise*this.PromiseWalker.scheduleWalkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:744:11
this.PromiseWalker.schedulePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:776:7
this.PromiseWalker.completePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:711:7
Editor.prototype.appendTo/onLoad@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/sourceeditor/editor.js:412:7
EventListener.handleEvent*Editor.prototype.appendTo@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/sourceeditor/editor.js:415:5
DebuggerView._initializeEditor@chrome://browser/content/devtools/debugger-view.js:285:5
DebuggerView.initialize@chrome://browser/content/devtools/debugger-view.js:80:5
DebuggerController.startupDebugger<@chrome://browser/content/devtools/debugger-controller.js:164:11
TaskImpl_run@resource://gre/modules/Task.jsm:314:40
TaskImpl@resource://gre/modules/Task.jsm:275:3
createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:249:14
DebuggerPanel.prototype.open/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/debugger/panel.js:54:19
Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:934:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:813:7
Promise*this.PromiseWalker.scheduleWalkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:744:11
this.PromiseWalker.schedulePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:776:7
Promise.prototype.then@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:451:5
DebuggerPanel.prototype.open@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/debugger/panel.js:53:12
Toolbox.prototype.loadTool/onLoad@resource://gre/modules/commonjs/toolkit/loader.js -> resource:///modules/devtools/framework/toolbox.js:1200:19
Flags: needinfo?(quanxunzhen)
I can't seem to reproduce on nightly -- can you save and upload a recording where this occurs, or a website and frame name that reproduces this?
Reporter

Comment 4

4 years ago
Posted video screen record
Reporter

Comment 5

4 years ago
Sorry that I somehow ignored this bug. This is now reproducible in aurora, although it opens a blank page instead of view-source:undefined now.

Please see the record in comment 4. I can reproduce this on both Windows and Mac.
Flags: needinfo?(jsantell)
Assignee

Updated

4 years ago
Assignee: nobody → jryans
Status: NEW → ASSIGNED
Flags: needinfo?(jsantell)
Whiteboard: [devtools-polish]
Assignee

Updated

4 years ago
Blocks: de-44-polish
Reporter

Comment 6

4 years ago
[Tracking Requested - why for this release]: Seems to be a regression
Attachment #8674860 - Flags: review?(jsantell) → review+
Assignee

Updated

4 years ago
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/712becb16698
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 44
Assignee

Comment 10

4 years ago
Comment on attachment 8674860 [details] [diff] [review]
perf-view-source

Approval Request Comment
[Feature/regressing bug #]: Unclear, some change to the perf tools in 43.
[User impact if declined]: Source links in perf waterfall sidebar would open a blank tab, instead of the source.
[Describe test coverage new/current, TreeHerder]: On m-c, no new tests.
[Risks and why]: Low, affects perf. tools UI only
[String/UUID change made/needed]: None
Attachment #8674860 - Flags: approval-mozilla-aurora?
Assignee

Updated

4 years ago
Whiteboard: [devtools-polish] → [polish-backlog]
Tracking since this seems to be a recent regression. It's a mystery!  (view source in tab, maybe?)
Comment on attachment 8674860 [details] [diff] [review]
perf-view-source

OK to uplift to aurora. Fix for recent regression.
Attachment #8674860 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+

Updated

a year ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.