Peerjs: Unable to communicate between iOS/MacOS to Windows 10

Created on 26 May 2019  ·  5Comments  ·  Source: peers/peerjs

I've got following error:

Uncaught TypeError: Cannot read property 'readyState' of undefined
    at e.cleanup (main.00964d37d7b2ca5b80ca.js:1)
    at t.close (main.00964d37d7b2ca5b80ca.js:1)
    at RTCPeerConnection.e.oniceconnectionstatechange (main.00964d37d7b2ca5b80ca.js:1)

My simple project uses the shared peerjs server to connect and send an increasing number every 3s. See https://passenger-location-share.firebaseapp.com/ and press Track passengers on a browser/tab and on another browser/tab, press passenger on the way to start sending messages.

Some tests I've done and results:

  • Safari on iOS 12.2 and Chrome 74 on Windows 10 ==> Error
  • Safari on macOS 10.13.4 and Chrome 74 on Windows 10 => Error
  • Chrome on macOS 10.13.4 and Chrome 74 on Windows 10 => Error
  • Chrome and Firefox on Windows 10 => Success
  • Chrome and Safari on macOS => Success
  • Chrome on Android 9 and Chrome on Windows 10 => Success

Please help to take a look. Thank you


Update: I've confirmed this issue on demo as well https://jmcker.github.io/Peer-to-Peer-Cue-System/

bug

All 5 comments

The same is happening for me running latest Chrome+Win10/7 vs Chrome+macOS and also for Chrome+Win10/7 vs Chrome+Android 8.1.

BTW it's not happening using PeerJS v2.0, at least with Chrome+Win10/7 vs Chrome+Android8 and Chrome+Win10/7 vs Chrome+macOS. Also, got it working with Chrome+Win10 vs Firefox+Win10.

I wonder, how do you use v2.0. It doesn't have API document.

Not really using it yet, just testing. I played a little with the provided example which is quite clear even if API calls are not documented. Many features are still missing (*) but the new API 2.0 seems simpler to use than v1, and for multipart connections it does almost everything by itself.

(*) Especially handling of disconnections and metadata, as far as the project I'm developing is concerned. There should be also the possibility to "nicely" reject a call instead of letting the peer timing out, which is something I need.

The issue was fixed in #520 ( version 1.0.1 )

Was this page helpful?
0 / 5 - 0 ratings

Related issues

geraldsamosir picture geraldsamosir  ·  6Comments

lucastwong picture lucastwong  ·  3Comments

kahrkunne picture kahrkunne  ·  4Comments

bilo1967 picture bilo1967  ·  7Comments

Kitanga picture Kitanga  ·  5Comments