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

Issue 676302 link

Starred by 4 users

Issue metadata

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



Sign in to add a comment

SourceMapping shows source-files as empty.

Reported by f...@trablo.net, Dec 21 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36

Steps to reproduce the problem:
1. sourcefile (let's call it main.ts) is only available in mapped workspace-folder
2. SourceMaps are enabled in DevTools-Settings
3. Set a breakpoint in main.js

What is the expected behavior?
main.ts opens in a new tab and the file-content is shown to the user.

What went wrong?
DevTools open a new source-tab "main.ts", but the file seems to be empty.

Did this work before? N/A 

Chrome version: 55.0.2883.87  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 24.0 r0

If you change main.ts outside of Chrome (in the linked workspace folder), Chrome recognizes the change and shows the file content. If you refresh the webapp, the file-content is gone again.
 
Cc: lushnikov@chromium.org
Owner: dgozman@chromium.org
Status: Assigned (was: Unconfirmed)
Could you please tell me more about your setup, since I cannot repro locally?

As far as I understand:
- main.js is served from localhost;
- it points to main.js.map served from localhost;
- source map includes main.ts served from localhost;
- part of the sources including main.ts is in workspaces;
- main.ts shows up blank.

If something is different (e.g. file:/// url vs localhost, main.js.map or main.ts being in different places, anything else) - please tell.
@flo: could you please also open devtools-on-devtools (like described here: https://coderwall.com/p/0m4hqa/chrome-devtools-inception) and check if there are any errors?

Comment 3 by f...@trablo.net, Dec 22 2016

Maybe I've chosen a too simplistic example.
Let's do it in more detail:

I have the following files in my workspace:
module1.ts
module2.ts

They are transpiled and concatenated into main.js (a sourcemap is available as main.js.map).

main.js & main.js.map are served to the client.
module1.ts & module2.ts are not available for the application server.

I disabled all Chrome-extensions.
In my Chrome-devtools I've configured the workspace to link to my dev-folder.
Furthermore main.js on the app-server is mapped to main.js in my workspace.

The workspace-folder contains:
module1.ts
module2.ts
main.js
main.js.map

How to reproduce:
1) Within Chrome-devtools I create a breakpoint in main.js.
2) Chrome opens a new source-tab with the title module1.ts, but it is empty. It shows a gray "1" as the only line-number and it seems that this file is empty.
3) If I hover over the source-tab it shows file://C:/path/to/my/workspace/module1.ts
4) The console of the devtools-on-devtools tell me that it tries to open module1.ts at http://localhost (HTTP status code:404).

Further explorations:
5) If the app breaks at the breakpoint it presents an empty file "module1.ts".
6) If I open module1.ts in an editor the DevTools recognize the file-change and the correct file content is presented.
7) If I reload the page the file-content is gone again (empty file).
8) If I copy module1.ts to the app-server-directory the devtools work as expected -> correct file content is shown.

Thank you for detailed report! There seems to be a race between establishing workspace mapping and loading content, which sometimes leads to empty content.

So far I haven't managed to reproduce, but we are working on a potential fix.
I think I'm hitting this, as well. Let me know if I can help provide more details.
Everyone affected: could you please check if Chrome Canary has this issue as well?
I just updated to Chrome 56 and it does not appear to fix the issue for me. The files still open as empty.
@Dan: Any chance you can check Chrome Canary?
@lushnikov: Just installed Canary, and it seems to be loading the files properly.

Comment 10 by f...@trablo.net, Jan 30 2017

Tried with Canary: Work like a charm! Thx!
 Issue 696843  has been merged into this issue.
 Issue 696841  has been merged into this issue.
Status: Fixed (was: Assigned)

Sign in to add a comment