Open
Bug 1737188
Opened 4 years ago
Updated 1 month ago
Data URL SourceMap in Data URL JavaScript Does Not Resolve.
Categories
(DevTools :: Source Editor, defect)
Tracking
(firefox-esr78 affected, firefox-esr91 affected, firefox93 affected, firefox94 affected, firefox95 affected)
People
(Reporter: snake_case, Unassigned)
Details
Attachments
(1 file)
|
1.79 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:93.0) Gecko/20100101 Firefox/93.0
Steps to reproduce:
Main Scenario:
- Generate a JavaScript file with an inline SourceMap.
- Base64 encode the JavaScript file and embed it into a HTML page using a script tag and a Data URL
- Print hello world with the js file, and expect to see the line where the console.log is generated.
I've also performed these additional tests with the same script:
- Base64 decode the data url, then paste it directly between the script tags. (Does not resolve, the error below was not emitted)
- Base64 decode the data url, put it in a separate file, and link it in the script tag. (It works as expected.)
Actual results:
SourceMap does not resolve, and just prints the location within the obfuscated script.
The following warning was emitted to console:
Source map error: Error: Invalid URL: .
Resource URL: [Data URL of the JS]
Source Map URL: [Data URL of the SourceMap, it decodes properly]
Expected results:
To see the real source location pre-transpilation. (eg. "Hello World! index.tsx:3")
(Chrome Version 95.0.4638.54 on my system resolves the source correctly, see attached demo file.)
| Reporter | ||
Updated•4 years ago
|
OS: Unspecified → macOS
Hardware: Unspecified → x86_64
| Reporter | ||
Updated•4 years ago
|
Component: Untriaged → Source Editor
Product: Firefox → DevTools
Comment 1•4 years ago
|
||
Setting this issue to NEW as I could reproduce it with the attached file. Reproduced it on macOS Big Sur 11.6 using the latest Nightly 95.0a1, Firefox 94, Firefox 93, Firefox 91.2.0 esr, and Firefox 78.15.0 esr.
Severity: -- → S3
Status: UNCONFIRMED → NEW
status-firefox93:
--- → affected
status-firefox94:
--- → affected
status-firefox95:
--- → affected
status-firefox-esr78:
--- → affected
status-firefox-esr91:
--- → affected
Ever confirmed: true
You need to log in
before you can comment on or make changes to this bug.
Description
•