question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Peerjs server deployed on heroku is not working

See original GitHub issue

I used the deploy on Heroku button from this link to deploy a peerjs server. To connect to this server I used

const peer = new Peer(host: 'focusmonk-beta.herokuapp.com', port:9000, path:'/')

But this is not working, am I missing something ?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:15

github_iconTop GitHub Comments

6reactions
veerareddyvishal144commented, Aug 2, 2020

That’s because the default password is wrong. Trying to find a fix

2reactions
zaidm124commented, Oct 25, 2021

Thank you so much everyone, the problem is solved for me now. Peer cloud server worked. Thank you again @blyzniuk @siddharthmagadum16

I am getting this error, GET https://https//realtime-notepad-voice.herokuapp.com/:433/peerjs/peerjs/id?ts=16351849542150.5264754979506276 net::ERR_NAME_NOT_RESOLVED. I have set the port to 433 still i am getting this error. It works fine on local host, but when i deploy on heroku i get this error. I also found this in the headers. Referrer Policy: strict-origin-when-cross-origin

Here is the frontend code for using peer cloud server.

import Peer from "peerjs";
const myPeer = new Peer(undefined, {
    key: "peerjs",
    debug: 2,
    secure: process.env.REACT_APP_ENV === "PRODUCTION" ? true : false, // secure : false for http connection
  });

you can refer more in the docs https://peerjs.com/docs.html#start

This worked for me, thank you so much for helping me out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

peers/peerjs-server - Buttons - Heroku Elements
PeerServer: A server for PeerJS. PeerServer helps establishing connections between PeerJS clients. Data is not proxied through the server.
Read more >
Deploy PeerJS server on Heroku - Stack Overflow
I have a problem with PeerJS server. I used "Deploy to Heroku" button from here: https://github.com/peers/peerjs-server.
Read more >
I got the PeerServer working BUT - Google Groups
What do I need to do in the current PeerServer repo before deploying to heroku to be able to run it this way?...
Read more >
Peer.js Cloud Server is down! How to fix your project?!
Issue about the broken peer.js server ... Peer.js server repo https://github.com/peers/ peerjs - server Deploy your Peer.js serveron Heroku ...
Read more >
How do i properly deploy a Peerjs app to heroku-node.js
You have to deploy peer-js serve on heroku and use that url as a host in your app. you can get information about...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found