Reputation: 1080
using Peerjs cdn.It was working fine.Suddenly getting this error today Error: Could not get an ID from the server
peer = new Peer();
<script src="https://unpkg.com/[email protected]/dist/peerjs.min.js"></script>
Even demo application given by peerjs documentation has this error now which was working fine before
https://jmcker.github.io/Peer-to-Peer-Cue-System/
Upvotes: 0
Views: 1864
Reputation: 110
Install peer and peerjs from npm. configure the following on the client js file.
const peer = new Peer(undefined, {
host: 'localhost',
port: 5001,
path: '/'
});
Then while the initial server is running. open another terminal and run the following
peerjs --port 5001
voila, you have started peerServer and now you can obtain the peer.id.
There are some other ways to too. please refer to this link to explore those ways.
Upvotes: 1
Reputation: 11
Yes, the problem is known.
The public server is not available at the moment (cracked by botnet). The maintainer has already reported the cause of the issue on github: https://github.com/peers/peerjs/issues/937#issuecomment-1077781924
There is also a small guide on how to deploy your own server through Heroku.
Upvotes: 1