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

Issue 595347 link

Starred by 18 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

After upgrading to Chrome v.49 disappeared links to local source files

Reported by freetit...@gmail.com, Mar 16 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36

Steps to reproduce the problem:
1. Devtools -> "Resource" -> "Add folder to workspace" -> "Map to network resource" (link to local files and accept)
2. Go to "Elements" -> "Styles" -> in right side no more links to local files and selector number line

What is the expected behavior?
Links to local files and selector number line

What went wrong?
After upgrading to Chrome 49 disappeared links to local source files. See image in Attach file.

Did this work before? Yes no more or downgrade to older version Chrome

Chrome version: 49.0.2623.87  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 21.0 r0

Maybe it's new feature for Chrome >= v.49? But then how to work with it?
 
now.png
37.1 KB View Download

Comment 1 by caseq@chromium.org, Mar 16 2016

Cc: dgozman@chromium.org pfeldman@chromium.org
Labels: Needs-Feedback
I can't reproduce this so far -- can you try on a canary or dev channel, i.e. m51? Also, does it happen always or is it specific to particular page and/or sources?

Comment 2 by leo07v...@gmail.com, Mar 16 2016

It happens to me too, when I map the files to work on devtools
Happening on Mac OS as well. Disappears as soon as I use "Map to local resource" on a file. Any changes made to source are not preserved to a file-system.
Screenshot of canary (64-bit) 51.0.2680.0 . (Perhaps there is another problem with this: don't work "Auto-reload generated CSS" and don't auto-saved styles, changed in "Elements->Styles" (and in Canary too). Maybe it's about the same? Sorry if a lot of points in one issue - I have collapsed my workflow.)
canary.png
51.1 KB View Download
and it is not specific to particular page or sources.

Comment 6 by caseq@chromium.org, Mar 17 2016

Cc: -pfeldman@chromium.org
Labels: -Needs-Feedback
Owner: pfeldman@chromium.org
Status: Assigned (was: Unconfirmed)
I think I know what is wrong, but I need your help verifying it:

Could you go into the Settings -> Workspace and look at the mappings that were created for you. the way it should work:

- Lets say source file is here: "file://root/project1/main.css"
- You serve it as http://localhost:8000/project1/main.css
- You added "file://root/project1" as a workspace folder

the mapping under "file://root/project1" should be:

http://localhost:8000/project1/ -> /

for me it was

http://localhost:8000/ -> /project1/

which is the other way around and is wrong. I'm fixing it right away, but you should be able to fix things via manually adjusting your mapping settings.

Please tell me it if that helps.
Oh my God - it works (all the features returned)! Thank you! You are Great! (like "Emmet-LiveStyle" is very hell for me, and this feature is very important for Chromium like IDE).
good.jpg
45.3 KB View Download
Labels: Merge-Request-50 M-50
Status: Started (was: Assigned)

Comment 11 by tin...@google.com, Mar 21 2016

Labels: -Merge-Request-50 Merge-Approved-50 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M50 (branch: 2661)
Project Member

Comment 12 by bugdroid1@chromium.org, Mar 21 2016

Labels: -merge-approved-50 merge-merged-2661
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3477dc0704cd415cfb2a5f19353042a390bfa458

commit 3477dc0704cd415cfb2a5f19353042a390bfa458
Author: Pavel Feldman <pfeldman@chromium.org>
Date: Mon Mar 21 17:31:09 2016

DevTools: automatic mapping detection is broken for cases with specific file paths.

BUG= 595347 

Review URL: https://codereview.chromium.org/1813943003

Cr-Commit-Position: refs/heads/master@{#382092}
(cherry picked from commit ca1179ee182e37f4b70d0cce280a46ffa62ce98d)

Review URL: https://codereview.chromium.org/1822723002 .

Cr-Commit-Position: refs/branch-heads/2661@{#310}
Cr-Branched-From: ef6f6ae5e4c96622286b563658d5cd62a6cf1197-refs/heads/master@{#378081}

[modify] https://crrev.com/3477dc0704cd415cfb2a5f19353042a390bfa458/third_party/WebKit/LayoutTests/inspector/file-system-mapping-expected.txt
[modify] https://crrev.com/3477dc0704cd415cfb2a5f19353042a390bfa458/third_party/WebKit/LayoutTests/inspector/file-system-mapping.html
[modify] https://crrev.com/3477dc0704cd415cfb2a5f19353042a390bfa458/third_party/WebKit/Source/devtools/front_end/workspace/FileSystemMapping.js

Comment 13 by ajha@chromium.org, Mar 22 2016

Labels: TE-Verified-M50 TE-Verified-50.0.2661.48
Verified the merge on the latest M-50(50.0.2661.48) on Windows-7 and this is working as intended. Attached is the screen-shot of the same.


595347.png
36.5 KB View Download
Labels: Merge-Request-49
This regression affected all the DevTools Workspaces users in M49 stable. It is now fixed on ToT and in M50 branch, but the bug is still in the wild.

The fix is very local and only affects the code paths starting with the "Map to local..."  user action. This action is currently broken in M49 due to the bug this CL fixes. I'm suggesting this gets merged into stable provided there is a matching update pending.

Comment 15 by tin...@google.com, Mar 22 2016

Labels: -Merge-Request-49 Merge-Review-49 Hotlist-Merge-Review
[Automated comment] Request affecting a post-stable build (M49), manual review required.
Labels: -Merge-Review-49 Merge-Approved-49
Based on comment #14, this seems to be a safe merge and already verified by TE on M50 branch. So approving merge for M49 (branch 2623). Please merge your change in ASAP, we are planning to cut a stable candidate at 5PM PST today.
Project Member

Comment 17 by bugdroid1@chromium.org, Mar 22 2016

Labels: -merge-approved-49 merge-merged-2623
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cca63001063b46c0bf57636f8cb1aab56c0ffcbb

commit cca63001063b46c0bf57636f8cb1aab56c0ffcbb
Author: Pavel Feldman <pfeldman@chromium.org>
Date: Tue Mar 22 19:17:22 2016

DevTools: automatic mapping detection is broken for cases with specific file paths.

BUG= 595347 

Review URL: https://codereview.chromium.org/1813943003

Cr-Commit-Position: refs/heads/master@{#382092}
(cherry picked from commit ca1179ee182e37f4b70d0cce280a46ffa62ce98d)

Review URL: https://codereview.chromium.org/1825573002 .

Cr-Commit-Position: refs/branch-heads/2623@{#648}
Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907}

[modify] https://crrev.com/cca63001063b46c0bf57636f8cb1aab56c0ffcbb/third_party/WebKit/LayoutTests/inspector/file-system-mapping-expected.txt
[modify] https://crrev.com/cca63001063b46c0bf57636f8cb1aab56c0ffcbb/third_party/WebKit/LayoutTests/inspector/file-system-mapping.html
[modify] https://crrev.com/cca63001063b46c0bf57636f8cb1aab56c0ffcbb/third_party/WebKit/Source/devtools/front_end/workspace/FileSystemMapping.js

Cc: lushnikov@chromium.org
 Issue 592433  has been merged into this issue.

Comment 19 by kayce@google.com, Mar 25 2016

FYI another user reported similar problem here (18 days ago): 

https://github.com/google/WebFundamentals/issues/2631
I'm still seeing this issue on Version 51.0.2693.2 canary and Version 49.0.2623.110 m.  Steps to replicate:

Add a workspace - local resource mapping.
Within the Mappings section - add the web path to the resource - compliment this with the path to the local resource.  The changes to the file are persisted from being edited within the sources tab - but the elements tab now shows no line numbers - and there is no connection between the styles - and the line numbers have disappeared.

In Chrome 48, you can map a local javascript file via right-click "Map to network resource" (e.g. map the local resource Foo.js to localhost:8080/Foo.js?compile=false).  LiveEdit and debugger breakpoints then refer to the local javascript file.

I'm unable to get this to work in post 48 versions (i.e. tried 49 / 50).  I noticed in the Settings->Workspaces that 48 uses "C:\..." whereas latest versions are using "file:///C:/..."



@wayn..., @cavem...: could you respond to me privately with exact paths on your filesystem and the contents of the Settings -> workspace?


Comment 23 Deleted

There seem to be two distinct bugs, one of them producing the larger impact, was fixed. The smaller one is described below:

It turned out that we've never supported mapping for URLs with query params well. When establishing mapping, it was creating mapping with the file (not folder) granularity. As a result, mapping worked with the selected files, the ones explicitly mapped. That worked in M48 and we removed the support without realizing it in M49.

The mapping itself was designed to operate broader terms, folders, and in order to restore the functionality, we need to teach DevTools to map

c:\foo\bar.js <==> foo/bar.js?ts=1234

Unfortunately, this is not trivial since DevTools needs to know how to convert 
c:\foo\bar.js to foo/bar.js?ts=1234 with just mapping in hand, while ts=1234 could be dynamic and volatile. So it will time to fix.
I'm glad that a fix is in the works. This causes an issue with Wordpress setups as well.

For an example, in Wordpress when a style is enqueued:

wp_enqueue_style ( 'customstyle', get_template_directory_uri () . '/css/custom.css', false, '1.1, 'all' );

... a version number is sent to the browser to ensure consistency. Chrome reads this file as custom.css?v=1.1. When trying to map this file to your local resource that of course doesn't have a version number, nothing happens. For persistence to work for me, I have to remove the version control on my local during development, then add it back when syncing to production. An extra step that leaves room for error.
Status: Fixed (was: Started)
The remaining part from comment #24 is being tracked by  crbug.com/596422 .

Sign in to add a comment