New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 660521 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug-Regression



Sign in to add a comment

DevTools: console links not opening in 'sources'

Project Member Reported by lushnikov@chromium.org, Oct 28 2016

Issue description

As reported by user:


I'm developing an angular application using Visual Studio 2013, Windows 10, and IIS. Whenever an error occurs, the links in the stack trace do not open the source in the dev tools. Instead they act like a link to the source file, redirecting the whole page to that file. The only thing I can think of is that I disabled caching while the dev tools are up. But just now I didn't have the tools opened, but when I opened them, a stack trace was there and exhibiting the same issue.



 
I'll try to get it to work in jsFiddle or something similar, but for now, here's my stack trace (my server running on localhost and a non-standard port):

TypeError: Cannot read property 'childNodes' of undefined
    at nodeLinkFn (http://.../angular.js:9330:58)
    at compositeLinkFn (http://.../angular.js:8620:13)
    at compositeLinkFn (http://.../angular.js:8623:13)
    at compositeLinkFn (http://.../angular.js:8623:13)
    at publicLinkFn (http://.../angular.js:8500:30)
    at lazyCompilation (http://.../angular.js:8844:25)
    at boundTranscludeFn (http://.../angular.js:8637:16)
    at controllersBoundTransclude (http://.../angular.js:9377:22)
    at Object.link (http://.../my-script.js:##:##)
    at http://.../angular.js:1247:18
I'm getting normal behavior on other errors. I'll start logging stack traces for what works and what doesn't. See if there's any commonality.
Labels: Needs-Feedback
Thanks, that would help a lot.
Owner: l...@chromium.org
Eric, could you please take a look?

Comment 5 by l...@chromium.org, Oct 31 2016

Of course, I will try to reproduce the setup on a Windows computer.
Currently experiencing this with chrome 55 and not with chrome 54. Hard to add more than that. The js I'm working with is a huge blob and I don't have the opportunity to drill down to the piece of code that causes it. I also know we use some libs that 'help' with stack traces. I could report which if thats helpful. Maybe it helps find a common denominator.

Comment 7 by l...@chromium.org, Nov 3 2016

Thank you for the extra info, there are some suspicious CLs I can look into within the time frame between 54 and 55.  Unfortunately, I'm still unable to reproduce with localhost on a non-standard port.  Without a repro, it will be hard to verify a fix.  A jsfiddle or setup description would be great.

I have a few questions:

- Does this only happen when running on a local server?  Does this repro on websites in the wild, or on file:///...?
- Does the DevTools debugging functionality still work?  If you manually open the file in the Sources panel > Ctrl - O, can you still pause on breakpoints in those scripts?
- Please take a look at the screenshot.  There are black links shown always and blue links that are shown when the error is expanded.  Do the blue links also fail to open in Sources panel?
- Can you try this on Canary?  Right now Canary and Dev channels are on v56.
I'm experiencing this with 55.0.2883.35 beta and 56.0.2909.0 canary on macOS 10.12.

I can reproduce it in beta with this fiddle:
https://jsfiddle.net/e94kcLr4/

In Beta, clicking the first link in the stack trace opens a plaintext version of the file in the current tab.

In Canary, it opens in the Sources tab, however I am able to create some scenarios on localhost in Canary that will open the file in the browser tab instead.

It seems that if there is a full URL in the stack trace, it will open in the browser tab. If the stack trace includes just the file name and not the full URL, it opens in the Sources tab. I'm not familiar enough with how this works to know why it would be a url vs just a file name.
I'm also seeing this in 55.0.2883.35 connecting to a local vagrant box via a https and DNS name on port 8888. JS source files are not minified, concatenated or mapped, but the source directory IS served via a symlink from my local FS through the vagrant box &and server. The file structure appears to be correct when I look through it in 'source'.

Also, clicking the right hand link for where the error originated does properly open the file to the correct line in 'sources'. It is ONLY stack trace links that are the problem.

I am also using Rollbar which is provided via an angular plugin, and when it throws errors, stack trace links appear to always open in the 'sources' panel properly, however occasionally open in the browser. I can't seem to reproduce exactly what needs to happen to get it to open in both.

Comment 10 by l...@chromium.org, Nov 7 2016

Labels: -Type-Bug -Pri-2 -Needs-Feedback Pri-1 Type-Bug-Regression
I'm finally able to reproduce the bug with your provided jsfiddle https://jsfiddle.net/e94kcLr4/

For me, this is bad in Chrome 56.0.2906.0 and was good in 54.0.2840.71.  I have a lead on the root cause and am working on a fix.  Big thank you to you all for the feedback and help setting up a repro scenario!

Comment 11 by l...@chromium.org, Nov 7 2016

For reference, I've annotated a screenshot with what I'm seeing.  The blue links underneath the main message (visible after clicking to expand the message itself) and the anchor (top right) are fine.  It's only links like the one in black color that are not opening in sources correctly.
errorTraces2.png
717 KB View Download
Project Member

Comment 13 by bugdroid1@chromium.org, Nov 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/67fdae4bf2f450c494f76623c6810e18443067e2

commit 67fdae4bf2f450c494f76623c6810e18443067e2
Author: luoe <luoe@chromium.org>
Date: Wed Nov 09 00:38:20 2016

DevTools: clicking console messages with traces should check for links

Console messages with a trace can be clicked to toggle their expanded state.
The click handler was intercepting and consuming clicks on links that were part
of the message's text. As a result, some anchors stopped revealing in the
sources panel and navigated the target page instead.

This CL makes the handler check whether the click target was an anchor first to
allow the document's handler to follow relative links.

BUG= 660521 

Review-Url: https://codereview.chromium.org/2490433002
Cr-Commit-Position: refs/heads/master@{#430796}

[add] https://crrev.com/67fdae4bf2f450c494f76623c6810e18443067e2/third_party/WebKit/LayoutTests/http/tests/inspector/console/console-links-in-errors-with-trace-expected.txt
[add] https://crrev.com/67fdae4bf2f450c494f76623c6810e18443067e2/third_party/WebKit/LayoutTests/http/tests/inspector/console/console-links-in-errors-with-trace.html
[add] https://crrev.com/67fdae4bf2f450c494f76623c6810e18443067e2/third_party/WebKit/LayoutTests/http/tests/inspector/resources/source3.js
[modify] https://crrev.com/67fdae4bf2f450c494f76623c6810e18443067e2/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js

Comment 14 by l...@chromium.org, Nov 10 2016

Labels: Merge-Request-55
A fix has landed on all Canary channels.

Comment 15 by dimu@chromium.org, Nov 10 2016

Labels: -Merge-Request-55 Merge-Approved-55 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M55 (branch: 2883)
Project Member

Comment 16 by bugdroid1@chromium.org, Nov 10 2016

Labels: -merge-approved-55 merge-merged-2883
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e9896ed6f3fdf53d9d53ab81748cd5234df456eb

commit e9896ed6f3fdf53d9d53ab81748cd5234df456eb
Author: luoe <luoe@chromium.org>
Date: Thu Nov 10 18:53:38 2016

DevTools: clicking console messages with traces should check for links

Console messages with a trace can be clicked to toggle their expanded state.
The click handler was intercepting and consuming clicks on links that were part
of the message's text. As a result, some anchors stopped revealing in the
sources panel and navigated the target page instead.

This CL makes the handler check whether the click target was an anchor first to
allow the document's handler to follow relative links.

BUG= 660521 
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2490433002
Cr-Commit-Position: refs/heads/master@{#430796}
(cherry picked from commit 67fdae4bf2f450c494f76623c6810e18443067e2)

Review-Url: https://codereview.chromium.org/2491213003
Cr-Commit-Position: refs/branch-heads/2883@{#523}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[add] https://crrev.com/e9896ed6f3fdf53d9d53ab81748cd5234df456eb/third_party/WebKit/LayoutTests/http/tests/inspector/console/console-links-in-errors-with-trace-expected.txt
[add] https://crrev.com/e9896ed6f3fdf53d9d53ab81748cd5234df456eb/third_party/WebKit/LayoutTests/http/tests/inspector/console/console-links-in-errors-with-trace.html
[add] https://crrev.com/e9896ed6f3fdf53d9d53ab81748cd5234df456eb/third_party/WebKit/LayoutTests/http/tests/inspector/resources/source3.js
[modify] https://crrev.com/e9896ed6f3fdf53d9d53ab81748cd5234df456eb/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js

Comment 17 by l...@chromium.org, Nov 11 2016

Status: Fixed (was: Assigned)
Cc: brajkumar@chromium.org
Labels: Needs-Feedback
Tested this issue on Ubuntu 14.04 using chrome latest M55-55.0.2883.52 by following test case provided in the comment #8.

1. Navigated to https://jsfiddle.net/e94kcLr4/
2. Switched to console (Ctrl+Shift+i)
3. Clicked on the links seen in the console
4. Observed the stack trace displays in the source panel

luoe@ Could you please confirm is this the expected behavior for this issue, so that we can verify it from Chrome-TE end. Attaching screen-cast for reference.

Thanks!
660521.ogv
5.0 MB View Download

Comment 19 Deleted

Sign in to add a comment