Closed
Bug 1360957
Opened 8 years ago
Closed 8 years ago
Loading failed for the <script> with source “resource://devtools/client/shared/vendor/react-dev.js”
Categories
(DevTools :: JSON Viewer, defect)
DevTools
JSON Viewer
Tracking
(firefox56 fixed)
RESOLVED
FIXED
Firefox 56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: Oriol, Assigned: Oriol)
References
Details
Attachments
(1 file)
14.15 KB,
patch
|
Honza
:
review+
|
Details | Diff | Splinter Review |
1. Open the browser console and clean it.
2. Load some JSON document, e.g. go to
data:application/json,{"foo":["bar","baz"]}
3. The console shows this warning:
Loading failed for the <script> with source “resource://devtools/client/shared/vendor/react-dev.js”
The problem is that the script failed, not the warning itself (introduced by bug 247996).
Assignee | ||
Comment 1•8 years ago
|
||
OK, I think the problem is https://dxr.mozilla.org/mozilla-central/rev/5278e2a35fc8f2be390243db1e62858bf0982055/devtools/client/jsonview/viewer-config.js#32
A comment says
> ReactJS library is shared among DevTools. Both, the minified (production)
> version and developer versions of the library are available.
But this is not true, the dev version is only available in debug mode.
https://dxr.mozilla.org/mozilla-central/rev/5278e2a35fc8f2be390243db1e62858bf0982055/devtools/client/shared/vendor/moz.build#16-17
> if CONFIG['DEBUG_JS_MODULES'] or CONFIG['MOZ_DEBUG']:
> modules += ['react-dev.js']
https://dxr.mozilla.org/mozilla-central/rev/5278e2a35fc8f2be390243db1e62858bf0982055/devtools/client/shared/browser-loader.js#105-108
> if (AppConstants.DEBUG || AppConstants.DEBUG_JS_MODULES) {
> dynamicPaths["devtools/client/shared/vendor/react"] =
> "resource://devtools/client/shared/vendor/react-dev";
> }
Blocks: 1132203
Assignee | ||
Comment 2•8 years ago
|
||
The idea is exporting a boolean to the unprivileged page which says whether react-dev.js exists or not, and only attempt to load it if it exists.
But we were already exporting Locale and headers, and I don't like polluting the global scope too much. So I moved all the exported data to a JSONView object.
Then, JsonViewUtils.exportIntoContentScope was no longer needed, and JsonViewUtils was left with only a single-line getCurrentTheme method. So I thought it was better to remove JsonViewUtils entirely.
Assignee: nobody → oriol-bugzilla
Status: NEW → ASSIGNED
Attachment #8874164 -
Flags: review?(odvarko)
Comment 3•8 years ago
|
||
@Oriol: I can't reproduce the original issue on my machine. I don't see any warnings in the browser console. Is there anything special I should do?
Honza
Flags: needinfo?(oriol-bugzilla)
Assignee | ||
Comment 4•8 years ago
|
||
(In reply to Jan Honza Odvarko [:Honza] from comment #3)
> Is there anything special I should do?
I didn't do anything special. Make sure these apply:
- It's a Firefox compiled without --enable-debug-js-modules nor --enable-debug
- Loading resource://devtools/client/shared/vendor/react-dev.js produces a "File not found" error.
- JS Warnings are enabled in the console (either the web one or the browser one)
Flags: needinfo?(oriol-bugzilla)
Comment 5•8 years ago
|
||
Comment on attachment 8874164 [details] [diff] [review]
json-debug.patch
Review of attachment 8874164 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks for the patch, looks reasonable!
And it fixes the problem for me.
R+ assuming try is green.
Honza
Attachment #8874164 -
Flags: review?(odvarko) → review+
Comment 6•8 years ago
|
||
(In reply to Oriol [:Oriol] from comment #4)
> (In reply to Jan Honza Odvarko [:Honza] from comment #3)
> > Is there anything special I should do?
>
> I didn't do anything special. Make sure these apply:
Thanks, it was the `--enable-debug-js-modules` I had to remove.
Honza
Assignee | ||
Comment 7•8 years ago
|
||
> R+ assuming try is green.
I can't push to try
Comment 8•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d50b261645c0
Only attempt to load react-dev.js if it exists. r=Honza
Keywords: checkin-needed
Comment 10•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
Comment 11•8 years ago
|
||
I have reproduced this Bug with Nightly 55.0a1 (2017-04-30) on Windows 10, 64 Bit!
The bug's fix is now verified on latest Nightly 56.0a1
Build ID 20170628030206
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
QA Whiteboard: [bugday-20170628]
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•