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

Issue 765909 link

Starred by 7 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

sourceURLs with webpack:/// interfere with window.onerror reporting

Reported by savvopou...@gmail.com, Sep 16 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36

Steps to reproduce the problem:
See also: https://github.com/webpack/webpack/issues/5681#issuecomment-329957675

https://github.com/savvopoulos/webpack-on-error
Note that you need an HTTP server in order to properly repro the issue; file:/// seems to come with its own rules; http server included, needs python3.

Build:
./build.sh (this will run, among other things, webpack, which generates sourceURLs)
Run:
./serve.py
Go to:
http://localhost:8000/index.html - error looks good
Now go to:
http://localhost:8000/dist/index.html - Script Error. :-(

What is the expected behavior?
Since the script comes from the same host, I would have expected error reporting to work.

What went wrong?
I think Chrome gets confused about the ownership of the script, because of the webpack:/// scheme in the sourceURLs. But the originally script came from the same host, and Chrome should arguably know better.

Did this work before? N/A 

Chrome version: 60.0.3112.113  Channel: n/a
OS Version: OS X 10.12.6
Flash Version:
 
One more thing, removing all instances of "webpack:///" from dist/index.js fixes this issue.
I pushed a branch that includes the dist/ folder, here:
https://github.com/savvopoulos/webpack-on-error/tree/with_dist

Comment 3 by kochi@chromium.org, Sep 19 2017

Labels: Needs-Feedback
I'd guess this is an issue of webpack itself, for transforming any internal
URLs.  What Blink or Chrome can help here?
Components: -Blink Blink>JavaScript
I can repro this however I don't know why the Error being thrown is a script error. Works correctly in Safari. Perhaps someone from the V8 team can have a look.
@kochi It seems to me that window.error should be receiving full errors, of
a script is from the same origin, regardless of sourceURL "origins".
Project Member

Comment 6 by sheriffbot@chromium.org, Sep 19 2017

Cc: kochi@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "kochi@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: keerthan...@techmahindra.com
Labels: Needs-Milestone Triaged-ET TE-Needs-TriageHelp
Requesting some one from the V8 team for help in further triaging of this issue.
Cc: bmeu...@chromium.org
Owner: yangguo@chromium.org
Status: Assigned (was: Unconfirmed)
Yang, can you please evaluate that?
The issue and reproduction case described above no longer occurs in Chrome Canary 71.0.3567.0

Can someone from the Chrome team confirm that this issue has been resolved and what version it was fixed in?

Sign in to add a comment