eval-souce-map sourceURL does no matches page url causing cross-origin
Reported by
githonie...@gmail.com,
Dec 12 2017
|
||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36
Steps to reproduce the problem:
1. using webpack and use eval-soucemap
2. page dev url is like 'http://localhost:8078', sourceURL is like `webpack-internal:///${module.id}\n`
3. when a uncaught promise reject throw from my js, error stack is
```
at VueComponent.queryDetail (webpack-internal:///./node_modules/babel-loader/lib/index.js!./node_modules/if-loader/index.js!./node_modules/vue-loader/lib/selector.js?type=script&index=0&bustCache!./node_modules/if-loader/index.js!./helios-view/src/commonPack/biz-detail/view/page/step1.vue:229:50)
```
Chrome's native Promise global event `onunhandledrejection` not working
4. change webpack source to make sourceUrl like `http://localhost:8078/webpack-internal:///${module.id}\n`, `onunhandledrejection` is working well now.
error stack is
```
at VueComponent.queryDetail (http://localhost:8078/webpack-internal///./node_modules/babel-loader/lib/index.js!./node_modules/if-loader/index.js!./node_modules/vue-loader/lib/selector.js?type=script&index=0&bustCache!./node_modules/if-loader/index.js!./helios-view/src/commonPack/biz-detail/view/page/step1.vue:229:50)
```
What is the expected behavior?
ignore sourceURL to make `onunhandledrejection` work
What went wrong?
sourceURL must be the same domain with page url to make `onunhandledrejection` work
Did this work before? No
Chrome version: 63.0.3239.84 Channel: stable
OS Version: 10.0
Flash Version:
,
Dec 12 2017
This issue seems to be out of scope as it is related to code part, hence adding TE-NeedsTriageHelp for further investigation of the issue.
,
Dec 12 2017
,
Dec 12 2017
,
Dec 12 2017
Unfortunately we could not violate cross origin policy when report rejected promise to handler. Otherwise there is no any sense in this check - you always can add sourceURL to any script to bypass this check. |
||||
►
Sign in to add a comment |
||||
Comment 1 by sc00335...@techmahindra.com
, Dec 12 2017