Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source maps loading error from bundled node_modules asar archive #103344

Closed
Mon-ius opened this issue Jul 26, 2020 · 7 comments
Closed

Source maps loading error from bundled node_modules asar archive #103344

Mon-ius opened this issue Jul 26, 2020 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@Mon-ius
Copy link

Mon-ius commented Jul 26, 2020

MAC Version 10.15.6 (19G73)
Code Version

1.48.0-insider
8c426f9f3b6b18935cc6c2ec8aa6d45ccd88021e
x64

DevTools failed to load SourceMap: Could not load content for file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar/node-pty/lib/index.js.map:
DevTools failed to load SourceMap: Could not load content for file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar/node-pty/lib/unixTerminal.js.map:
DevTools failed to load SourceMap: Could not load content for file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar/node-pty/lib/terminal.js.map:
DevTools failed to load SourceMap: Could not load content for file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar/node-pty/lib/eventEmitter2.js.map:
DevTools failed to load SourceMap: Could not load content for file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar/node-pty/lib/utils.js.map:
DevTools failed to load SourceMap: Could not load content for file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar/semver-umd/lib/semver-umd.js.map:
DevTools failed to load SourceMap: Could not load content for file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar/xterm/lib/xterm.js.map:
DevTools failed to load SourceMap: Could not load content for file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar/xterm-addon-unicode11/lib/xterm-addon-unicode11.js.map:
DevTools failed to load SourceMap: Could not load content for file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar/xterm-addon-search/lib/xterm-addon-search.js.map:
DevTools failed to load SourceMap: Could not load content for file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/node_modules.asar/vscode-textmate/release/main.js.map:

@nrayburn-tech
Copy link
Contributor

I believe this is a chromium issue, https://bugs.chromium.org/p/chromium/issues/detail?id=1052872. According to this comment, there are three actual issues.
https://bugs.chromium.org/p/chromium/issues/detail?id=1052872#c14

@deepak1556
Copy link
Contributor

Thanks @nrayburn-tech based on the discussion in that thread it is intended change to show all the sourcemap errors that were previously hidden https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1872581

@Mon-ius how are you launching insiders ? you should be only seeing the warnings in console when --verbose is used.

@deepak1556 deepak1556 added electron-9-update info-needed Issue requires more information from poster labels Jul 27, 2020
@nrayburn-tech
Copy link
Contributor

@deepak1556 I receive the warnings when opening vscode by just clicking the app in my dock, or using code-insiders in terminal.

The error comes from the devtools, not from vscode. I don't know if --verbose is intended to control that or not. There is a setting inside of devtools to disable source maps.

SourceMapError

SourceMapSetting

@Mon-ius
Copy link
Author

Mon-ius commented Jul 27, 2020

Yes, it could help. But I prefer to know what causes these problems? If there is a way to help to load the source map instead of ignore them?

@deepak1556
Copy link
Contributor

deepak1556 commented Jul 27, 2020

Thanks for the clarification, seeing the warning in devtools makes sense. I was under the impression the original issue was about warnings in console without --verbose flag.

As for why they are not loaded, that is something to be investigated. Although I am pretty sure loading source maps from asar archives are not allowed. The error only appears for modules that are shipping the source maps, its quite useless to ship source maps for these modules. Will confirm the root cause and remove these maps as well.

@deepak1556 deepak1556 added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Jul 27, 2020
@deepak1556 deepak1556 changed the title Many warnings using insider version on MAC Source maps loading error from bundled node_modules asar archive Jul 27, 2020
@archfz
Copy link

archfz commented Feb 6, 2021

Note that I am experiencing the same issue, with electron-webpack, the maps of the projects js files cant be loaded DevTools failed to load SourceMap: Could not load content for file:///tmp/.mount_**/resources/app.asar/dist.

@deepak1556 deepak1556 added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Apr 8, 2021
@deepak1556
Copy link
Contributor

Closing as issue does not repro in recent versions.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

5 participants