After integrating the Agora Web SDK into your web app, you can debug your code using the console log. This document lists the common errors in the console log.
The played DOM does not exist, or the element ID cannot be found.
Ensure that the parent DOM exists when you call Stream.play
.
You have called Client.publish
before the Client.join
method call succeeds.
Check your code logic and ensure that you call Client.publish
after the Client.join
method call succeeds.
Same reason and solution as Failed to load resource.
The following table lists the possible reasons and corresponding solutions:
Reason | Solution |
---|---|
The web browser does not fully support WebRTC. | Use a Web browser supporting WebRTC. |
The web browser has plugins that prevent WebRTC from getting an ICE candidate on the local device. | Disable the problematic browser plugins. |
The user's gateway firewall disables the UDP protocol or the UDP ports greater than 10000. | Disable the firewall or use the Agora Cloud Proxy service. |
You set the web browser to use the VP8 codec, but the user uses the Safari browser that does not support VP8. | The user can either upgrade the Safari browser to versions later than 12.1, or use the Chrome browser. |
You set the web browser to use the H.264 codec, but the user's device hardware does not support H.264. | Set the web browser to use VP8. |
Connection issues of a network provider. | The user can try switching to a different network, for example, using a cellular data connection. |
If the error persists after troubleshooting, contact support@agora.io.
You have called Client.publish
before the Stream.init
method call succeeds.
Call publish
in the onSuccess
callback of Stream.init
.
The local DNS resolution fails.
The user can change the DNS server address and try joining the channel again.
114.114.114.114
.8.8.8.8
.This error is caused by calling switchDevice
and can be ignored.
Possible reasons:
The HTMLElementID
specified in Stream.play
is invalid.
Ensure that the string in HTMLElementID
contains only "_", "-", ".", or any digits and letters in the ASCII character set. The string must be non-empty and less than 256 bytes in length.
Possible reasons:
Check your settings for appId
in Client.init
and tokenOrKey
in Client.join
. Ensure that the App ID and token are correct and valid.
Same reason and solution as None Ice Candidate not allowed.
When establishing a WebRTC connection, the SDK fails to find any ICE (Interactive Connectivity Establishment) candidate.
The type of candidates used for connection depends on whether you have enabled cloud proxy or not. Choose one of the following solutions accordingly.
Same reason and solution as DTLS failed.
Multiple users joins the channel with the same uid
.
Ensure that all users in a channel have a unique uid
.
A mobile device emulator is running in the web browser.
Agora Web SDK does not support emulated mobile devices. Do not use an emulator to debug your app.
A mobile device emulator is running in the web browser.
Agora Web SDK does not support mobile device emulators. Do not use an emulator to debug your app.
The connection has not been established. This is usually the result of an incorrect API call sequence, for example, calling Client.publish
after Client.leave
.
Check your API call sequence.