You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using peerjs custom server on nodejs
and the client is Electron app
consthandelPeer=async(peerId: string)=>{constid=`${Math.random().toString(16).slice(2)}_${user?.username?.replaceAll(' ','_').toString()!}`;constpeer=newPeer(id,{host: 'xxx.xxxx.xxx',path: '/peerjs',secure: true,});peer.on('open',()=>{constconnection=peer.connect(peerId);// Never called on some users connection.on('open',async()=>{dataSream.current=awaitcreateStream();callRef.current=peer.call(peerId,dataSream.current);callRef.current?.on('error',(e)=>{console.log('error',e);});callRef.current?.on('close',()=>{cleanUp(connection);});});connection.on('close',()=>{cleanUp(connection);});connection.on('error',(e: any)=>{console.log('got connection error',e);});});peer.on('disconnected',()=>{console.log('disconnect');cleanUp();});peer.on('error',(error)=>{cleanUp();});};
everything working great but it's not working on some users' devices without errors
after debugging I have figured that peer.connect never open even on setTimeOut
console.log(connection)
The text was updated successfully, but these errors were encountered:
Elabbasy00
changed the title
peer.connect not called on some users
peer.connect not open on some users
Jan 11, 2024
I am using peerjs custom server on nodejs
and the client is Electron app
everything working great but it's not working on some users' devices without errors
after debugging I have figured that peer.connect never open even on setTimeOut
console.log(connection)
The text was updated successfully, but these errors were encountered: