Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

242
Vistas
WebRTC: ICE failed, add a TURN server and see about:webrtc for more details

I'm trying to make a simple connection, but run into the error which is the title of this post.

My code for the caller and answerer are below:

STUN Server

const servers = {iceServers: [{urls: ['stun:stun1.l.google.com:19302']}]}

Peer A (Caller)

let peer = new RTCPeerConnection(servers)
let chnl = peer.createDataChannel("channel")
chnl.onopen = e => console.log("Connection opened")
chnl.onmessage = e => console.log("New message: " + e.data)
peer.onicecandidate = e => console.log(JSON.stringify(e.candidate))
peer.createOffer().then(offer => peer.setLocalDescription(offer)).then(a => console.log(peer.localDescription))

Peer B (Answerer)

let peer = new RTCPeerConnection(servers)
peer.ondatachannel= e => {
    peer.chnl = e.channel
    peer.chnl.onopen = e => console.log("Connection opened")
    peer.chnl.onmessage = e => console.log("New message: " + e.data)
}
peer.onicecandidate = e => console.log(JSON.stringify(e.candidate))
peer.setRemoteDescription(offer)
peer.createAnswer().then(answer=> peer.setLocalDescription(answer)).then(a => console.log(peer.localDescription))

I was running this code in 2 separate tabs of Firefox's console. I would copy the offer and answer logged from the onicecandidate callback and set these as the answerer's and caller's remote descriptions, respectively. At this moment, I would receive the error: WebRTC: ICE failed, add a TURN server and see about:webrtc for more details. I'm unsure how to resolve this.

Thank you

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda