peerjs-server icon indicating copy to clipboard operation
peerjs-server copied to clipboard

Unauthorized error in peerjs server

Open RamyaAshika opened this issue 5 years ago • 5 comments

I have hosted this peerjs server to heroku and I'm facing this error when I tried to connect

https://myapp.herokuapp.com/peerjs/6ba28c1d-8761-457e-ace4-31bcdbe4d32d/k1kpjuwftfr/id?i=0

and in my client code I have added

      const peer = new Peer({ 
      key: 'peerjs', 
      host: 'myapp.herokuapp.com', 
      secure: true, 
      port: 443, 
      generateClientId:id,
      config 
      });

instead of this

peer = new Peer(id, { debug: 2, config }); and I have deployed my client code in apache web server and peerjs server is deployed in heroku. Can anyone please help me on this? Why its happening? @afrokick @kidandcat or anyone else?

RamyaAshika avatar Oct 03 '20 09:10 RamyaAshika

What error you see?

afrokick avatar Nov 24 '20 08:11 afrokick

Facing the same error. Can someone help on this?

ASKNJ avatar Apr 26 '21 21:04 ASKNJ

I have hosted this peerjs server to heroku and I'm facing this error when I tried to connect

https://myapp.herokuapp.com/peerjs/6ba28c1d-8761-457e-ace4-31bcdbe4d32d/k1kpjuwftfr/id?i=0

and in my client code I have added

      const peer = new Peer({ 
      key: 'peerjs', 
      host: 'myapp.herokuapp.com', 
      secure: true, 
      port: 443, 
      generateClientId:id,
      config 
      });

instead of this

peer = new Peer(id, { debug: 2, config }); and I have deployed my client code in apache web server and peerjs server is deployed in heroku. Can anyone please help me on this? Why its happening? @afrokick @kidandcat or anyone else?

Hey did you find anything on this?

ASKNJ avatar Apr 26 '21 21:04 ASKNJ

Still waiting for updates

HanustaviraGA avatar Jun 04 '22 14:06 HanustaviraGA

I don't think there is a generateClientId in client side options... That's a serverside config option to have a custom id generator in case the default doesn't serve for clients connecting without id in the constructor.

bosskabouter avatar Jun 10 '22 14:06 bosskabouter