Defect #32450

Attempts to get "tribute.min.js.map" by Chrome DevTool causes RoutingError.

Added by Mizuki ISHIKAWA 3 months ago. Updated 3 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Code cleanup/refactoring
Target version:-
Resolution:Fixed Affected version:

Description

When using Chrome Devtools, Redmine raises No route matches [GET] "/javascripts/tribute.min.js.map".

Chrome DevTools looks for "/javascripts/tribute.min.js.map" based on sourceMappingURL = tribute.min.js.map in tribute-3.7.3.min.js.

Affected versions: trunk
Related to #31989


Related issues

Related to Redmine - Feature #31989: Inline issue auto complete (#) in fields with text-format... Closed

Associated revisions

Revision 19221
Added by Go MAEDA 3 months ago

Add tribute.min.js.map in order to avoid errors while using Chrome DevTools (#32450).

Revision 19331
Added by Go MAEDA 3 months ago

Merged r19221 from trunk to 4.1-stable (#32450, #31989).

History

#1 Updated by Mizuki ISHIKAWA 3 months ago

Deleting "// # sourceMappingURL = tribute.min.js.map" in tribute-3.7.3.min.js solves this problem

#2 Updated by Go MAEDA 3 months ago

  • Status changed from New to Confirmed
  • Target version set to Candidate for next major release

Confirmed. Error logs like the following are recorded for each web access by Chrome with the DevTools opened.

Started GET "/javascripts/tribute.min.js.map" for ::1 at 2019-11-13 22:48:26 +0900

ActionController::RoutingError (No route matches [GET] "/javascripts/tribute.min.js.map"):

actionpack (5.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (5.2.3) lib/rails/rack/logger.rb:38:in `call_app'
railties (5.2.3) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (5.2.3) lib/active_support/tagged_logging.rb:71:in `block in tagged'
activesupport (5.2.3) lib/active_support/tagged_logging.rb:28:in `tagged'
activesupport (5.2.3) lib/active_support/tagged_logging.rb:71:in `tagged'
railties (5.2.3) lib/rails/rack/logger.rb:26:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/request_id.rb:27:in `call'
rack (2.0.7) lib/rack/method_override.rb:22:in `call'
rack (2.0.7) lib/rack/runtime.rb:22:in `call'
activesupport (5.2.3) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/static.rb:127:in `call'
rack (2.0.7) lib/rack/content_length.rb:15:in `call'
rack (2.0.7) lib/rack/sendfile.rb:111:in `call'
railties (5.2.3) lib/rails/engine.rb:524:in `call'
puma (3.12.1) lib/puma/configuration.rb:227:in `call'
puma (3.12.1) lib/puma/server.rb:660:in `handle_request'
puma (3.12.1) lib/puma/server.rb:474:in `process_client'
puma (3.12.1) lib/puma/server.rb:334:in `block in run'
puma (3.12.1) lib/puma/thread_pool.rb:135:in `block in spawn_thread'

We can fix the error by one of the following means:

  • Remove '//# sourceMappingURL=tribute.min.js.map' from public/javascripts/tribute-3.7.3.min.js
  • Add real tribute.min.js.map
  • Add empty tribute.min.js.map

#3 Updated by Marius BALTEANU 3 months ago

I'm in favour of adding tribute.min.js.map.

#4 Updated by Go MAEDA 3 months ago

The attached patch adds tribute.min.js.map for Tribute 3.7.3.

#5 Updated by Go MAEDA 3 months ago

  • Related to Feature #31989: Inline issue auto complete (#) in fields with text-formatting enabled added

#6 Updated by Mizuki ISHIKAWA 3 months ago

Go MAEDA wrote:

The attached patch adds tribute.min.js.map for Tribute 3.7.3.

I confirmed that exceptions do not occur after applying the patch attached with #32450#note-4.
The patch looks good.

@Marius BALTEANU What do you think about 0001-Add-tribute.min.js.map-in-order-to-avoid-errors-whil.patch?

#7 Updated by Marius BALTEANU 3 months ago

Mizuki ISHIKAWA wrote:

Go MAEDA wrote:

The attached patch adds tribute.min.js.map for Tribute 3.7.3.

I confirmed that exceptions do not occur after applying the patch attached with #32450#note-4.
The patch looks good.

@Marius BALTEANU What do you think about 0001-Add-tribute.min.js.map-in-order-to-avoid-errors-whil.patch?

Looks good to me as well.

#8 Updated by Go MAEDA 3 months ago

  • Target version changed from Candidate for next major release to 4.2.0

Mizuki and Marius, thank you for reviewing the patch. I am setting the target version to 4.2.0.

#9 Updated by Go MAEDA 3 months ago

  • Subject changed from Nonexistent "/javascripts/tribute.min.js.map" is accessed (RoutingError) when using the Chrome DevTools to Attempts to get "tribute.min.js.map" by Chrome DevTool causes RoutingError.
  • Category changed from UI to Code cleanup/refactoring
  • Status changed from Confirmed to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you for reporting this issue.

#10 Updated by Mischa The Evil 3 months ago

  • Status changed from Closed to Reopened

This seems eligible to merge into 4.1-stable too IMHO (considering the inclusion of #31989 for 4.1.0). If so, then this issue doesn't have to be included on the changelog either too (thus the target version of this issue could then be cleared also...)

#11 Updated by Go MAEDA 3 months ago

I thought that the change does not have to be merged to 4.1-stable because the issue only affects developers and they usually use the trunk. But I don't object to merging into 4.1-stable.

#12 Updated by Marius BALTEANU 3 months ago

Go MAEDA wrote:

I thought that the change does not have to be merged to 4.1-stable because the issue only affects developers and they usually use the trunk. But I don't object to merging into 4.1-stable.

I'm in favour of merging this to 4.1.0.

#13 Updated by Go MAEDA 3 months ago

  • Status changed from Reopened to Closed
  • Target version deleted (4.2.0)

Merged to 4.1-stable. And clearing the target version because the fix is considered as a part of #31989.

Also available in: Atom PDF