New issue
Advanced search Search tips

Issue 861706 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Jul 13
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

source code is out of date

Reported by davidmax...@gmail.com, Jul 9

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

Steps to reproduce the problem:
1. load a web app
2. put a break point somewhere
3. do some debugging
4. edit/save the code outside the devtools (I use vim)
5. reload the app

What is the expected behavior?
the code is the same as saved by the external editor

What went wrong?
the code where the breakpoint is does not correspond to the code saved by the external editor; though stepping through it, it is clear that the debugger knows the code has change since it stops on 'empty' lines, and variable change as per new code.

Did this work before? Yes don't know

Chrome version: 67.0.3396.99  Channel: stable
OS Version: 
Flash Version: 

This seems to have been happening very often recently.
 
In this image, I can tell that the new code is being executes since the 'name' has had encodeURI() run on it (the %7Cs&f), but the source shown doesn't include that code at all (since it was just added):


          if (name) {
            name = encodeURI(name);
            this.$.asset_download.body['content_disposition'] =
              `attachment; filename=${name}`;
          }
source_out_of_date.jpg
67.5 KB View Download
Labels: Needs-Bisect Needs-Triage-M67
My guess is your sourcemaps are not being regenerated? If you're using webpack, which `devtool` option are you using?

You have 'disable cache' on in Network panel? And not using local overrides?
Cc: vamshi.kommuri@chromium.org
Labels: Triaged-ET Needs-Feedback
Thanks for filing the issue!

@Reporter: Could you please share a sample test file which helps us triage the issue in a better way and please respond back to comment #3. Any further inputs from your end may help us. Hence adding label Needs-Feedback.
I'm using 'polymer serve' so there's no explicit build step.

I don't have disable cache enabled in the network panel (note that the browser does actually have the new code, it's just displaying the wrong code).

My guess is something to do with 'polymer serve' so I'll ask on the polymer slack tools channel.
Project Member

Comment 6 by sheriffbot@chromium.org, Jul 10

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
No extra insight from the polymer tools channel on slack, but...
I've also noticed recently that even when the source code is correct (ie it matches what is being executed), the line numbers are way off what is actually in the file - which isn't a huge deal, but it is irritating.

Perhaps that is indicative of the same problem, but a lot easier to reproduce. I'll see if I can come up with a test case, or find something out trying.
OK, so I used `polymer init` to install the shop app, and it is immediately apparent that the source isn't the same as in the files and it seems to be related to the treatment of comments. EG, in the file, the first lines are:

<!--
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../bower_components/polymer/polymer-element.html">

yet in devtools, it is:

<!--
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--><link rel="import" href="../bower_components/polymer/polymer-element.html">

So, that means line 10 is different.

I noticed that if I use python -m SimpleHTTPServer 8000, then I don't see this line mis-match problem. I'll try using this for development for a while to see if I see the source code out-of-date issue. (It's possible I'm using js features that need some transpilation so we'll see :/).
Cc: paulir...@chromium.org
CC'ing   paulirish@  for help in further triaging of this issue as per Comment#8.

Thanks!
I've been using the python server for a little while, and all the problems are gone, so I'm currently blaming 'polymer serve' - I am lead to believe it does some kind of build steps on-the-fly. I did try the option '--compile never' to turn off transpiling (and there don't seem to be any problems in chrome) - but it made no difference, and I don't see any other options to make 'polymer serve' more like the python server.

I notice other changes in devtools when I switch to the python server - when I make changes to a source file in vim and save them, the changes are immediately reflected in the dev tools; almost miraculously since I don't even need to reload it. Also, all the files in the devtool's file 'navigator' now have little green dots on them. Now, I do kind of feel like I have seen this before, but it has been a while, so I wonder how long I have been working with this sort of 'out-of-date' source problem. Anyway, I guess these are clues that might be significant to someone who knows better than I do.

Perhaps it is now time to close this and open a github issue on the polymer-cli - I'll welcome any input though, from Mr Irish, or anyone else.
Labels: -Needs-Bisect
As per the reporter's recent comment(...C#10) i.e., "I've been using the python server for a little while, and all the problems are gone, so I'm currently blaming 'polymer serve'" ... it is understood that the issue seems to be with polymer server rather than with chrome, hence removing Needs-Bisect label and requesting someone from "Platform>DevTools" team to have a look into this for further inputs.

Thanks!
...and since opening that, it has been marked as a duplicate:
https://github.com/Polymer/tools/issues/389

The description there does sound quite similar, so I imagine it is indeed the same problem.

I think we can close this.

Status: WontFix (was: Unconfirmed)
As per the confirmation given in comment#13 closing this issue and marking it as Won't fix.

Thanks!
Nice job deducing this one. :)

Cheers.

Sign in to add a comment