Windows Chrome Version 115.0.5790.173 (Official Build) (64-bit)
Node
node-datachannel version: 0.4.3
Docker image node:18.16.1-bullseye-slim running on DigitalOcean droplet (Debian do-kube-1.27.2-do.0)
uname -a inside Docker container inside Kuberenetes Pod with hostNetwork: true: Linux do-sfo3-0-dev-swarm-drone-demand-node-pool-f9ed0 6.1.0-0.deb11.6-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.15-1~bpo11+1 (2023-03-16) x86_64 GNU/Linux
1. Open a new Chrome browser window and open its DevTools Console. Please note that opening a new Chrome window before running the following steps seems to increase the probability of reproducing the crash (though this may not be true).
2. Run the following snippet in a Chrome browser DevTools Console:
consticeServers=[{urls: 'stun:stun1.l.google.com:19302'},{urls: 'stun:stun2.l.google.com:19302'},{urls: 'stun:stun3.l.google.com:19302'},{urls: 'stun:stun4.l.google.com:19302'},];constpeerConnection=newRTCPeerConnection({
iceServers,iceTransportPolicy: 'all',});letdataChannel;peerConnection.onconnectionstatechange=ev=>{const{ connectionState }=peerConnection;console.log(`peerConnection.onconnectionstatechange(): connectionState: ${connectionState}`);};peerConnection.ondatachannel=ev=>{console.log('peerConnection.ondatachannel()');dataChannel=ev.channel;dataChannel.onopen=ev=>{console.log('dataChannel.onopen()');peerConnection.close();// Close RTCPeerConnection immediately after RTCDataChannel opens};dataChannel.onmessage=ev=>{console.log(`dataChannel.onmessage(): ev.data: ${ev.data}`);};dataChannel.onclose=ev=>{console.log(`dataChannel.onclose()`);};dataChannel.onerror=ev=>{console.log(`dataChannel.onerror(): ev.data: ${ev.data}`);};};peerConnection.onicecandidate=ev=>{const{ candidate }=ev;console.log('peerConnection.onicecandidate(): candidate:',candidate);console.log(`COPY LAST ONE PRINTED AS THE FINAL ANSWER: ${JSON.stringify(peerConnection.localDescription)}\n`);};peerConnection.oniceconnectionstatechange=ev=>{const{ iceConnectionState }=peerConnection;console.log(`peerConnection.oniceconnectionstatechange(): iceConnectionState: ${iceConnectionState}`);};peerConnection.onicegatheringstatechange=ev=>{const{ iceGatheringState }=peerConnection;console.log(`peerConnection.onicegatheringstatechange(): iceGatheringState: ${iceGatheringState}`);};peerConnection.onsignalingstatechange=ev=>{const{ signalingState }=peerConnection;console.log(`peerConnection.onsignalingstatechange(): signalingState: ${signalingState}`);};
3. Run the following snippet in a Node REPL:
const{default: nodeDataChannel}=awaitimport('node-datachannel');consticeServers=[{hostname: 'stun:stun1.l.google.com',port: 19302,},{hostname: 'stun:stun2.l.google.com',port: 19302,},{hostname: 'stun:stun3.l.google.com',port: 19302,},{hostname: 'stun:stun4.l.google.com',port: 19302,},];constpeerConnection=newnodeDataChannel.PeerConnection('',{
iceServers,iceTransportPolicy: 'all',});peerConnection.onStateChange(state=>{console.log(`peerConnection.onStateChange(): state: ${state}`);});peerConnection.onSignalingStateChange(state=>{console.log(`peerConnection.onSignalingStateChange(): state: ${state}`);});peerConnection.onGatheringStateChange(state=>{console.log(`peerConnection.onGatheringStateChange(): state: ${state}`);});peerConnection.onLocalDescription((sdp,type)=>{console.log(`peerConnection.onLocalDescription(): sdp: ${sdp}, type: ${type}`);});peerConnection.onLocalCandidate((candidate,mid)=>{console.log(`peerConnection.onLocalCandidate(): candidate: ${candidate}, mid: ${mid}`);console.log(`COPY LAST ONE PRINTED AS THE FINAL OFFER: ${JSON.stringify(peerConnection.localDescription())}\n`);});constdataChannel=peerConnection.createDataChannel('',{ordered: false,maxRetransmits: 0,});dataChannel.onOpen(()=>{console.log('dataChannel.onOpen()');});dataChannel.onMessage(msg=>{console.log('dataChannel.onMessage(): msg:',msg);});dataChannel.onClosed(()=>{console.log('dataChannel.onClosed()');// These lines setting callbacks appear to cause the crashpeerConnection.onStateChange(state=>{});peerConnection.onSignalingStateChange(state=>{});peerConnection.onGatheringStateChange(state=>{});peerConnection.onLocalDescription((sdp,type)=>{});peerConnection.onLocalCandidate((candidate,mid)=>{});peerConnection.close();});dataChannel.onError(err=>{console.log(`dataChannel.onError(): err: ${err}`);});
4. In the Node REPL logs, copy the JSON stringified object after COPY LAST ONE PRINTED AS THE FINAL OFFER: . This is the final offer.
5. Paste the final offer into the offer variable below and run this snippet in the same Chrome DevTools Console:
constoffer=;// <--- Paste final offer hereawaitpeerConnection.setRemoteDescription(offer);constanswer=awaitpeerConnection.createAnswer();awaitpeerConnection.setLocalDescription(answer);
6. In the Chrome DevTools Console logs, copy the JSON stringified object after COPY LAST ONE PRINTED AS THE FINAL ANSWER: . This is the final answer.
7. Paste the final answer into the answer variable below and run this snippet in the same Node REPL:
constanswer=;// <--- Paste final answer hereconst{ sdp, type }=answer;peerConnection.setRemoteDescription(sdp,type);
8. In the Node REPL logs, there's a probability of the following crash occuring: