question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nw 0.54.0 - getUserMedia crash

See original GitHub issue

hi @rogerwang the usage of navigator.mediaDevices.getUserMedia makes the process crash

tested on macOS 10.14.6

how to reproduce:

  1. open : https://www.html5rocks.com/en/tutorials/getusermedia/intro/
  2. click Capture

or just execute this script:

var constraints = { audio: true, video: true }; 

navigator.mediaDevices.getUserMedia(constraints)
.then(function(mediaStream) {
  var video = document.querySelector('video');
  video.srcObject = mediaStream;
  video.onloadedmetadata = function(e) {
    video.play();
  };
})
.catch(function(err) { console.log(err.name + ": " + err.message); });

nw version:

ares: "1.17.1"
brotli: "1.0.9"
chromium: "91.0.4472.77"
icu: "68.1"
llhttp: "6.0.1"
modules: "93"
napi: "8"
nghttp2: "1.42.0"
node: "16.1.0"
node-webkit: "0.54.0"
nw: "0.54.0"
nw-commit-id: "a11d74e-7fcbea8-a43b730-37966cd"
nw-flavor: "sdk"
openssl: "1.1.1k+quic"
unicode: "13.0"
uv: "1.41.0"
v8: "9.1.269.28"
zlib: "1.2.11"

package.json

{
  "name": "MyApp Test",
  "productName": "MyApp-test",
  "description": "My description",
  "version": "1.0.0",
  "author": "Me",
  "main": "app.html",
  "window": {
    "show": false,
    "icon": "icon.png",
    "width": 900,
    "height": 500,
    "min_width": 800,
    "min_height": 500,
    "position": "center"
  },
  "dependencies": {
    "concat-stream": "^1.5.1",
    "dompurify": "^0.7.4"
  },
  "chromium-args": "--ignore-certificate-errors --unsafely-treat-insecure-origin-as-secure='http://mydomain.fr'",
  "user-agent": "my user agent",
  "node-remote": [
    "*://*.mydomain.fr/*"
  ]
}

tested with and without “chromium-args”: "–enable-usermedia-screen-capturing "

apple stack trace:

Crashed Thread:        27  Dispatch queue: com.apple.root.default-qos

Exception Type:        EXC_CRASH (SIGKILL)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Thread 0:: CrBrowserMain  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff5fdf322a mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff5fdf376c mach_msg + 60
2   com.apple.CoreFoundation      	0x00007fff33d4194e __CFRunLoopServiceMachPort + 328
3   com.apple.CoreFoundation      	0x00007fff33d40ebc __CFRunLoopRun + 1612
4   com.apple.CoreFoundation      	0x00007fff33d4061e CFRunLoopRunSpecific + 455
5   com.apple.HIToolbox           	0x00007fff32f9f1ab RunCurrentEventLoopInMode + 292
6   com.apple.HIToolbox           	0x00007fff32f9eee5 ReceiveNextEventCommon + 603
7   com.apple.HIToolbox           	0x00007fff32f9ec76 _BlockUntilNextEventMatchingListInModeWithFilter + 64
8   com.apple.AppKit              	0x00007fff3133777d _DPSNextEvent + 1135
9   com.apple.AppKit              	0x00007fff3133646b -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1361
10  io.nwjs.nwjs.framework        	0x000000010ef70ec0 0x10b590000 + 60690112
11  io.nwjs.nwjs.framework        	0x000000010ea34202 0x10b590000 + 55198210
12  io.nwjs.nwjs.framework        	0x000000010ef70df9 0x10b590000 + 60689913
13  com.apple.AppKit              	0x00007fff31330588 -[NSApplication run] + 699
14  io.nwjs.nwjs.framework        	0x000000010ea3a16c 0x10b590000 + 55222636
15  io.nwjs.nwjs.framework        	0x000000010ea3902c 0x10b590000 + 55218220
16  io.nwjs.nwjs.framework        	0x000000010e9f3817 0x10b590000 + 54933527
17  io.nwjs.nwjs.framework        	0x000000010e9bd59b 0x10b590000 + 54711707
18  io.nwjs.nwjs.framework        	0x000000010c7a6b0f 0x10b590000 + 18967311
19  io.nwjs.nwjs.framework        	0x000000010c7a8422 0x10b590000 + 18973730
20  io.nwjs.nwjs.framework        	0x000000010c7a4271 0x10b590000 + 18956913
21  io.nwjs.nwjs.framework        	0x000000010e9236c1 0x10b590000 + 54081217
22  io.nwjs.nwjs.framework        	0x000000010e9231e3 0x10b590000 + 54079971
23  io.nwjs.nwjs.framework        	0x000000010e921a69 0x10b590000 + 54073961
24  io.nwjs.nwjs.framework        	0x000000010e9222fc 0x10b590000 + 54076156
25  io.nwjs.nwjs.framework        	0x000000010b595905 ChromeMain + 277
26  io.nwjs.nwjs                  	0x000000010951cacf main + 287
27  libdyld.dylib                 	0x00007fff5fcbe3d5 start + 1

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rogerwangcommented, Jun 10, 2021

Will look to fix it soon. Thanks.

0reactions
pd-l2orkcommented, Oct 10, 2022

@rogerwang what OS and version are you using when testing this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

NW.js v0.54.0 Released with Chromium 91 Upgrade
I'm pleased to announce NW.js 0.54.0. It ships Chromium 91 stable upgrade. Chromium 91 contains usual under-the-hood performance and stability ...
Read more >
React NW.js menubar setup crash
This appears to be a bug with the latest builds of NW.js and is not related to React. I can recreate the crash...
Read more >
[NW.js v0.54.1 Bug Report] - Incognito window crashes ...
Using chrome.windows.create api to open incognito window crashes the NW.js framework. ... I am developing a VPN Client for a customer which requires...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found