Open Bug 1865062 Opened 2 years ago Updated 2 years ago

Unable to load sourcemap when debugging self signed site

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: jackyzy823, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

When i debugging a self signed site, the DevTools failed to load source map of javascript files.

The error message in DevTools is too generic.

Source map error: Error: NetworkError when attempting to fetch resource.
Resource URL: https://127.0.0.1:5314/_nuxt/index.86195fd0.js
Source Map URL: index.86195fd0.js.map

In the "Browser Toolbox" , i found that the request to the sourcemap url failed because of NS_ERROR_GENERATE_FAILURE ( NS_ERROR_MODULE_SECURITY, SEC_ERROR_UNKNOWN_ISSUER)

So , i tried with a valid certificate for the same site again , then DevTools could load sourcemap correctly.


I know it might impossible to allow the request to a self-signed site via fetch API.

However I hope that 1. at least the DevTools show the detailed reason of failing to load sourcemap because of self-signed certificate . 2. Add this situation to the docs

Additional Information :

  1. I'm working under Private Browsing
  2. The answer from stackoverflow doesn't help. When visiting the site, I've already clicked the button to accept the risk of using self signed certificate.
  3. The error message is the same as https://firefox-source-docs.mozilla.org/devtools-user/debugger/source_map_errors/index.html#networkerror-when-attempting-to-fetch-resource. However the solution is also not very helpful.

Besides , i change site from https to http , the sourcemap load correctly.

Thanks for the report.
It's unclear how we could get more information about why the given fetch call failed, we'll investigate a bit

Severity: -- → S3
Flags: needinfo?(hmanilla)
Priority: -- → P3

I might expose more information via bug 1834725, I'm just not sure about certificate issues.

See Also: → 1834725
You need to log in before you can comment on or make changes to this bug.