vscode-js-debug: Instant crash when accessing navigator.getUserMedia
Attempting to access the camera or microphone either through code or the console will result in the chrome instance crashing
- VS Code Version: 1.43.0
- Chrome Version 80
- Log file (set
"trace": true
in launch config):
Steps to reproduce:
- Start a Chrome instance using VS Code Chrome Debug
- Open console and paste in this line: navigator.getUserMedia({video:true},devices=>{console.log(‘hello’)},err=>{console.log(err)})
- Allow access to the camera
- Chrome will crash without a trace
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 5
- Comments: 31 (12 by maintainers)
We’re still waiting on work from the Chromium team for this
I was able by allowing vscode permissions for camera and microphone, but I had to create these entitled permissions in first place.
Have a look at this: https://github.com/microsoft/vscode/issues/95062#issuecomment-751241372
Now all works for me when started directly from vscode!
MacOS Catalina (10.15.7)
@isometriq thank you, I tried the solution you provided, and it works!
but I had to change the inserted code, because there were some other required fields in my access table:
Work around:
Start Chrome with debug enabled
OSX:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
use attach in launch.json
“name”: “Chrome”, “type”: “chrome”, “request”: “attach”, “port”: 9222, “webRoot”: “${workspaceFolder}/src”,
Hi, still no updates on this? My browser crashes for me too when trying to allow microphone permissions.
Doesn’t seem to happen on Windows. Tracking upstream with: https://bugs.chromium.org/p/chromium/issues/detail?id=1066155
You can use an “attach” type config to work around this. I don’t have anything better, sorry.