Skip to content

High Priority: when webrtc connection times out, this causes a crash of the app #260

@michaelpalumbo

Description

@michaelpalumbo

the following error occurs sometimes, and when it does it causes the whole app to crash. if webrtc can't connect, shouldn't cause a crash, should be handled and attempt to reconnect. we last multiple play sessions to this where players had nice patches going and then it crashed:

E:\GitHub\mischmasch\node_modules\wrtc\lib\index.js:49
  this._send(data);
       ^
DOMException [InvalidStateError]: RTCDataChannel.readyState is not 'open'
    at RTCDataChannel.send (E:\GitHub\mischmasch\node_modules\wrtc\lib\index.js:49:8)
    at E:\GitHub\mischmasch\Components\Patch\Patch.js:524:52
    at Array.forEach (<anonymous>)
    at Patch.updatePeers (E:\GitHub\mischmasch\Components\Patch\Patch.js:513:37)
    at Patch.update (E:\GitHub\mischmasch\Components\Patch\Patch.js:273:14)
    at Object.updateHandStateMachine (E:\GitHub\mischmasch\app.js:624:12)
    at Object.updateStateMachines (E:\GitHub\mischmasch\app.js:474:37)
    at Immediate.animate (E:\GitHub\mischmasch\app.js:2392:5)
    at process.processImmediate (node:internal/timers:476:21)

pc on the right made a large patch, it was sounding awesome, and then when i reconnected the other pc to the internet, it wiped the pc on the right's scene.

  • timeout should just be handled and retry the connection or go offline
  • bonus if we can figure out why it times out

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions