Closed
Bug 1434081
Opened 8 years ago
Closed 7 years ago
webpack-generated source maps have incorrect line numbers when page is force-reloaded
Categories
(DevTools :: Debugger, defect, P2)
DevTools
Debugger
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: wlach, Unassigned)
References
(Blocks 1 open bug)
Details
Here's a strange bug I've found with using source maps with a webpack application:
git clone https://github.com/wlach/react-metrics-graphics.git
cd react-metrics-graphics
git checkout source-map-failure
yarn install
yarn start
Go to http://localhost:5000
Force-reload page
Expected:
Should see a console.log statement saying "HEYA" referencing line 158
Actual:
see a console.log statement saying "HEYA" referencing line 77
If I load the page in a new tab with the web console open, most often it references the correct line number (force-reloading usually results in it having the wrong one again though). This feels like some kind of race condition. If I go into the debugger, it seems like it's referencing the webpack-internal version of the source map for the incorrect case.
Updated•8 years ago
|
Blocks: source-maps
Reporter | ||
Comment 1•8 years ago
|
||
I should add that this "just works" with Chrome.
Reporter | ||
Comment 2•8 years ago
|
||
This seems similar to bug 1400856, but I tried the proposed fix there (https://bugzilla.mozilla.org/show_bug.cgi?id=1400856#c3) and it did not help.
Reporter | ||
Comment 3•8 years ago
|
||
It seems like in the case that this works, the debugger is pointing to something called "webpack:///", whereas if it isn't, it's pointing to something called "webpack-internal:///".
Comment 4•8 years ago
|
||
(In reply to William Lachance (:wlach) (use needinfo!) from comment #2)
> This seems similar to bug 1400856, but I tried the proposed fix there
> (https://bugzilla.mozilla.org/show_bug.cgi?id=1400856#c3) and it did not
> help.
That would be my first guess, too.
Source maps in <script> elements don't really work correctly. There are a
few bugs about this.
I don't think that patch in bug 1400856 is correct - I will comment there.
Comment 6•7 years ago
|
||
I'd like to fix inline script source maps in the next couple of months.
Updated•7 years ago
|
Product: Firefox → DevTools
Comment 7•7 years ago
|
||
Hi William, i believe we've made improvements to inline source maps. Could you try re-testing this?
Reporter | ||
Comment 8•7 years ago
|
||
(In reply to Jason Laster [:jlast] from comment #7)
Hi William, i believe we've made improvements to inline source maps. Could you try re-testing this?
Yeah I've noticed this seems to be working well in general these days, happy to mark this as fixed.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Comment 9•7 years ago
|
||
Great!
You need to log in
before you can comment on or make changes to this bug.
Description
•