Closed Bug 1188697 Opened 9 years ago Closed 9 years ago

loadSourceError with gulp and babel

Categories

(DevTools :: Debugger, defect)

defect
Not set
normal

Tracking

(firefox39 affected, firefox40 affected, firefox41 affected, firefox42 fixed)

RESOLVED FIXED
Firefox 42
Tracking Status
firefox39 --- affected
firefox40 --- affected
firefox41 --- affected
firefox42 --- fixed

People

(Reporter: fitzgen, Assigned: fitzgen)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

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)
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
See Also: → 1188982
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
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.
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)
(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
Reminder
Flags: needinfo?(nfitzgerald)
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
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: nobody → nfitzgerald
Status: NEW → ASSIGNED
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 :(
reminder to push to try
Flags: needinfo?(nfitzgerald)
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: