Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-71053

Source maps are reported as errors in console in Safari/Firefox/IE

XMLWordPrintable

      Both Atlassian and vendor plugins often reference sourcemaps in their js files. These comments are often parsed even in batched mode, e.g. the last sourceMappingURL in the file (it seems).
      Source map files cannot be obtained through WRM because WRM does not handle that file type and also at the moment we do not generate separate web-resources for sourcemaps - .map files are either not included in web-resource at all, or they are in the same web-resource as the associated js file.
      Chrome silently swallows these errors but other browsers report them as failures. It should be noted that this behavior does not prevent any product actions from happening, or show up in any way in the UI, rather, it just throws errors in the console within browser developer tools.

      So far we have observed the behavior:

      • if the sourcemap is not in the web-resource, browser gets 404
      • if the sourcemap is there, browser gets 503

      Currently known culprits:

      • auiplugin includes source map URLs in it's static resources and adds .js.map to each web-resource
      • Jira dev status plugin

      Example output from Firefox console:

      Source map error: Error: request failed with status 503
      Resource URL: http://localhost:8080/s/944662958bb8207032bd08844a9750d3-CDN...tlassian.auiplugin:split_aui.vendor.backbone.js?locale=en-US
      Source Map URL: aui.chunk.11c5823082453cf10b70--f1f806614b99ed9d4493.js.map
      
       /* module-key = 'com.atlassian.jira.plugins.jira-development-integration-plugin:commons_runtime', location = 'dist/runtime.9995922c9ff8e7e24e64.js' */
      ...
      //# sourceMappingURL=runtime.9995922c9ff8e7e24e64.js.map
      }catch(e){WRMCB(e)};
      ;try {
      /* module-key = 'com.atlassian.jira.plugins.jira-development-integration-plugin:entrypoint-devstatus-view-issue', location = 'dist/devstatus-view-issue.db31d611e52e0febdb0b.js' */
      ...
      //# sourceMappingURL=devstatus-view-issue.db31d611e52e0febdb0b.js.map
      }catch(e){WRMCB(e)};try {
      /* module-key = 'com.atlassian.jira.plugins.jira-development-integration-plugin:0', location = 'dist/0.075180f0a8e207fec1f8.js' */
      ...
      //# sourceMappingURL=0.075180f0a8e207fec1f8.js.map
      }catch(e){WRMCB(e)};  

      Note:

      This is copied from CONFSRVDEV-11378 which leverages the same AUI framework as Jira.

              Unassigned Unassigned
              ddiblasio David Di Blasio (Inactive)
              Votes:
              11 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated: