7

It seems sprockets 4.0.0 is compatible with Chrome 78, but not Firefox 70.

Starting with a new rails app:

rails -v # Rails 6.0.0
rails new helloworld
# Gemfile
gem 'sass-rails', '~> 6' # not 5
bundle | grep sprockets
Using sprockets 4.0.0
Using sprockets-rails 3.2.1
# layouts/application.html.erb
javascript_include_tag 'application'
# app/assets/javascripts/application.js
console.log('line 1');
throw 'line 2';
# app/assets/config/manifest.js
//= link_directory ../javascripts .js
# Dev tools console, Firefox 70
line 1 application.source.js:1
uncaught exception: line 2 application.source.js:2
Error while fetching an original source: "http://localhost:3000/assets/application.source.js" is not in the SourceMap.
Source URL: <unknown>

Works fine in Chrome 78

Jared Beck
  • 16,796
  • 9
  • 72
  • 97
  • Can confirm failing in Firefox 70 and working in Chrome 78 using Sprokets. Is this Firefox or Sprockets causing the issue? Curious if Webpacker is experiencing any problems too. – user8897013 Nov 10 '19 at 21:48
  • 3
    Opened issue: https://github.com/rails/sprockets/issues/649 – Jared Beck Nov 12 '19 at 18:34
  • I confirm that I have same `Error while fetching an original source:` error in Firefox 73 (I can not even use `debugger` command in any javascript file since it does not see the source), but it works in Chrome 81. – duleorlovic Mar 10 '20 at 07:54
  • Same here with Firefox 73. – TomDogg Aug 25 '20 at 15:05

0 Answers0