OpenRefine / OpenRefine/OpenRefine

Javascript source map errors when debugging

Open
#2,701 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

javascript Priority: Low Type: Bug
Dominant language
Java
Stars
12k
Forks
2.2k
Avg merge
1d 14h
Merged PRs (30d)
27

Description

Describe the bug
Browsers report Javascript source map errors because of missing or inaccessible map files or original source file is actually missing when specified.

To Reproduce
Steps to reproduce the behavior:

  1. Start OpenRefine
  2. In Firefox browser, use it's console tool.
  3. See error -->

Current Results

Source map error: Error: request failed with status 404
Resource URL: http://127.0.0.1:3333/index-bundle.js
Source Map URL: jquery.contextMenu.min.js.map

Expected behavior
No Source map errors with 404 code (referencing OpenRefine provided JS files).
Source maps should either be provided and accessible through Jetty or the sourceMappingURL comment should be removed from JS files when not provided.
Such as :
//# sourceMappingURL=jquery.contextMenu.min.js.map
//# sourceMappingURL=underscore-min.map

Screenshots

image
image

Desktop:

  • OS: Windows 10
  • Browser Version: Firefox, Edge
  • JRE or JDK Version: JRE 1.8.0_181

OpenRefine :

  • Version OpenRefine 3.5 Beta

Additional context
https://developer.mozilla.org/en-US/docs/Tools/Debugger/Source_map_errors
https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Use_a_source_map

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the generated index-bundle.js and the jquery.contextMenu.min.js and underscore-min.js assets referenced by the report. Check how their source maps are exposed through Jetty or whether the sourceMappingURL comments point to missing files; done means Firefox and Edge no longer report 404 source-map errors for OpenRefine JavaScript files.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.