Closed
Bug 1188697
Opened 9 years ago
Closed 9 years ago
loadSourceError with gulp and babel
Categories
(DevTools :: Debugger, defect)
DevTools
Debugger
Tracking
(firefox39 affected, firefox40 affected, firefox41 affected, firefox42 fixed)
RESOLVED
FIXED
Firefox 42
People
(Reporter: fitzgen, Assigned: fitzgen)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
fitzgen
:
review+
|
Details | Diff | Splinter Review |
Assignee | ||
Updated•9 years ago
|
Blocks: dbg-sourcemap
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(brian.feister)
This is not fixed for me in Firefox 39.0. Given the following file, called "content.js.map", I get the error:
Error loading source:
loadSourceError
Here is the file content:
{"version":3,"sources":["app/content/content.js"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAC,WAAW,oBAAoB,uCAAuC,wBAAwB,iBAAiB,mBAAmB,UAAU,SAAS;EACpK,IACK,SAEA,UAKD;EAPJ,OAAO;IACL,SAAS,CAAC,UAAU,UAAU;MAD3B,UAAO,SAAA;OAGP,UAAU,kBAAkB,IAAI,UAAU,mCAAmC;MAD7E,WAAQ,kCAAA;OAGR,UAAU,oBAAoB,IAAI,UAAU,aAAa,IAAI,UAAU,aAAa;IACvF,SAAS,YAAY;MARzB;;MASM,gBAAgB,QAAQ,OAAO,WAAW,CAC9C,SAAS,MACT,gCACA;;MAGF,cAAc,0BAAO,UAAS,gBAAe;QAC3C,eAAe,MAAM,WAAW;UAC9B,KAAK;UACL,aAAa;UACb,YAAY;UACZ,cAAc;UACd,cAAc;;;;MAEZ,QAAQ,WAEC;;;GACZ","file":"app/content/content.js","sourcesContent":["'use strict';\n\nimport angular from 'angular';\nimport 'angular-material';\nimport mainwrap from 'common/directives/mainwrap/mainwrap';\nimport './content.controller';\nimport './content.tpl';\nimport './content.css!';\n\nconst contentModule = angular.module('content', [\n mainwrap.name,\n 'app/content/content.tpl.html',\n 'content.controller.js'\n]);\n\ncontentModule.config(function($stateProvider){\n $stateProvider.state('content', {\n url: '/content',\n templateUrl: 'app/content/content.tpl.html',\n controller: 'ContentCtrl',\n controllerAs: 'contentCtrl',\n authenticate: true\n });\n});\n\nexport default contentModule;\n"],"sourceRoot":"/source/"}
In response to @Nick Fitzgerald's request for more info, I think the login page for my in-development application should always be a source that's publicly accessible. You can see that at the following URL: http://develop.exp.scala.com:8000. Popping open the developer tools, you'll note that this file is visible in the Network tab/panel and has the error described above: http://develop.exp.scala.com:8000/common/directives/mainwrap/mainwrap.js. A note on my stack, I'm using Browsersync (a Node server) to serve the content via a websocket connection (this is subject to change as we don't intend to keep it this way). I'm also using Angular JS which is written in ES6 and transpiled to ES5 using Babel. The gulp plugin I'm using for generating my sourcemaps is called gulp-sourcemaps (https://github.com/floridoo/gulp-sourcemaps). I think that should cover it, let me know if more info is needed.
Flags: needinfo?(brian.feister) → needinfo?(nfitzgerald)
Assignee | ||
Comment 2•9 years ago
|
||
To summarize comment 1:
Steps to reproduce:
* Go to http://develop.exp.scala.com:8000/login
* Open debugger w/ source maps enabled
* Select the "/source/app/app/app.js" (or about half of the other sources present)
Expected Results:
Get some source
Actual Results:
"Error loading this URL: /source/app/app/app.js"
------------------------------------------------------------------------
Going to see if I can make a reduced test case.
Flags: needinfo?(nfitzgerald)
Summary: loadSourceError with source maps → loadSourceError with gulp and babel
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 3•9 years ago
|
||
Ok, I was able to reduce this to a bug in the mozilla/source-map library. Working on it here: https://github.com/mozilla/source-map/pull/199
Assignee | ||
Comment 4•9 years ago
|
||
Verified that when I include that PR in the tree's source-map checkout, I get the expected results in comment 2.
Will attach a patch for updating the tree's checkout once the PR merges.
Assignee | ||
Updated•9 years ago
|
status-firefox39:
--- → affected
status-firefox40:
--- → affected
status-firefox41:
--- → affected
status-firefox42:
--- → affected
Assignee | ||
Comment 5•9 years ago
|
||
Assignee | ||
Comment 6•9 years ago
|
||
Comment on attachment 8643375 [details] [diff] [review]
Update the tree's copy of the mozilla/source-map library to get upstream bug fixes
This is updating the source-map lib to the latest version. Changes that weren't a part of the PR you just reviewed were previously reviewed by either me or Eddy.
Attachment #8643375 -
Flags: review?(jryans)
Attachment #8643375 -
Flags: review?(jryans) → review+
Assignee | ||
Comment 7•9 years ago
|
||
Assignee | ||
Comment 8•9 years ago
|
||
(In reply to Nick Fitzgerald [:fitzgen][:nf] from comment #7)
> Try push:
> https://treeherder.mozilla.org/#/jobs?repo=try&revision=2e49ac61b487
I think we need bug 935366 to land first, since there were some changes surrounding m-c integration that landed in the source map lib that haven't had their corresponding bits land in m-c yet.
Depends on: 935366
Assignee | ||
Comment 10•9 years ago
|
||
This update contains a fix for loadSourceError in the debugger when a source map
has an absolute sourceRoot and one or more of its sources are absolute rather
than relative to the sourceRoot.
Attachment #8643375 -
Attachment is obsolete: true
Assignee | ||
Comment 11•9 years ago
|
||
Comment on attachment 8645042 [details] [diff] [review]
Update the tree's copy of the mozilla/source-map library
Unfortunately, trees are closed right now so I can't do a try push with this rebased patch.
Flags: needinfo?(nfitzgerald)
Attachment #8645042 -
Flags: review+
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → nfitzgerald
Status: NEW → ASSIGNED
Assignee | ||
Comment 12•9 years ago
|
||
Also unfortunate: I don't think we are going to be able to uplift this patch because of the accidental dependency on bug 935366 -- it feels like too much of a tangle to try and uplift :(
Assignee | ||
Comment 14•9 years ago
|
||
Flags: needinfo?(nfitzgerald)
Comment 16•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•