# What are the common error messages to expect in Web browsers' console logs? (/en/api-reference/faq/integration/console_error_web)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

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.

## Cannot read property "appendChild" of null [#cannot-read-property-appendchild-of-null]

### Reason [#reason]

The played DOM does not exist, or the element ID cannot be found.

### Solution [#solution]

Ensure that the parent DOM exists when you call `Stream.play`.

## Cannot read property 'stringuid' of undefined [#cannot-read-property-stringuid-of-undefined]

### Reason [#reason-1]

You have called `Client.publish` before the `Client.join` method call succeeds.

### Solution [#solution-1]

Check your code logic and ensure that you call `Client.publish` after the `Client.join` method call succeeds.

## Connect choose server timeout [#connect-choose-server-timeout]

Same reason and solution as [Failed to load resource](#failed-to-load-resource).

## DTLS [#dtls]

The following table lists the possible reasons and corresponding solutions:

| Reason                                                                                                        | Solution                                                                                                       |
| :------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------- |
| The web browser does not fully support WebRTC.                                                                | Use a [Web browser](/en/realtime-media/video/reference/supported-platforms?platform=web) 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](/en/voice-calling/core-functionality/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](mailto\:support@agora.io).

## Failed to execute 'addStream' on 'RTCPeerConnection': parameter 1 is not of type 'MediaStream' [#failed-to-execute-addstream-on-rtcpeerconnection-parameter-1-is-not-of-type-mediastream]

### Reason [#reason-2]

You have called `Client.publish` before the `Stream.init` method call succeeds.

### Solution [#solution-2]

Call `publish` in the `onSuccess` callback of `Stream.init`.

## Failed to load resource [#failed-to-load-resource]

### Reason [#reason-3]

The local DNS resolution fails.

### Solution [#solution-3]

The user can change the DNS server address and try joining the channel again.

* For a user in Mainland China, change the DNS server address to `114.114.114.114`.
* For a user outside Mainland China, change the DNS server address to `8.8.8.8`.

## Failed to set remote answer sdp: Called in wrong state: kStable [#failed-to-set-remote-answer-sdp-called-in-wrong-state-kstable]

This error is caused by calling `switchDevice` and can be ignored.

## Media access MEDIA\_NOT\_SUPPORT: video/audio streams not supported yet /enumerateDevices() not supported [#media-access-media_not_support-videoaudio-streams-not-supported-yet-enumeratedevices-not-supported]

### Reason [#reason-4]

Possible reasons:

* The web browser is incompatible with the Agora Web SDK.
* HTTPS protocol is not used.
* Localhost is not used.

### Solution [#solution-4]

* Use a supported [Web browser](/en/video-calling/reference/supported-platforms).
* Deploy your web app through HTTPS or localhost.

## Invalid elementID [#invalid-elementid]

### Reason [#reason-5]

The `HTMLElementID` specified in `Stream.play` is invalid.

### Solution [#solution-5]

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.

## INVALID\_VENDOR\_KEY [#invalid_vendor_key]

### Reason [#reason-6]

Possible reasons:

* The App ID is invalid. For example, the Agora project is disabled, or the App ID is not yet active within a newly created project.
* The token is invalid.

### Solution [#solution-6]

Check your settings for `appId` in `Client.init` and `tokenOrKey` in `Client.join`. Ensure that the App ID and token are correct and valid.

## NO\_CANDIDATES\_IN\_OFFER [#no_candidates_in_offer]

Same reason and solution as [None Ice Candidate not allowed](#candidate).

## None Ice Candidate not allowed [#none-ice-candidate-not-allowed]

### Reason [#reason-7]

When establishing a WebRTC connection, the SDK fails to find any [ICE](https://developer.mozilla.org/en-US/docs/Glossary/ICE) (Interactive Connectivity Establishment) candidate.

<CalloutContainer type="info">
  <CalloutDescription>
    A candidate contains the IP address and port information for connecting to a remote device.
  </CalloutDescription>
</CalloutContainer>

### Solution [#solution-7]

The type of candidates used for connection depends on whether you have enabled [cloud proxy](/en/voice-calling/core-functionality/cloud-proxy) or not. Choose one of the following solutions accordingly.

* If you have enabled cloud proxy, the SDK gets relay candidates from a TURN server. Check whether you have whitelisted the IP addresses and ports that Agora provides for cloud proxy, and ensure that the local client can connect to the TURN server.
* If you have not enabled cloud proxy, the SDK gets host candidates from the local device. In this case, the error is usually caused by the security settings of the local device.
  * Check whether the browser has any plugins that disable WebRTC.
  * Ensure that you have enabled UDP in the system firewall, and added the [specified domains and ports](/en/voice-calling/reference/firewall) to the whitelist.

## P2P lost [#p2p-lost]

Same reason and solution as [DTLS failed](#DTLS).

## UID\_CONFLICT [#uid_conflict]

### Reason [#reason-8]

Multiple users joins the channel with the same `uid`.

### Solution [#solution-8]

Ensure that all users in a channel have a unique `uid`.

## Uncaught DOMException: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'. [#uncaught-domexception-failed-to-execute-addtransceiver-on-rtcpeerconnection-this-operation-is-only-supported-in-unified-plan]

### Reason [#reason-9]

A mobile device emulator is running in the web browser.

### Solution [#solution-9]

Agora Web SDK does not support emulated mobile devices. Do not use an emulator to debug your app.

## Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided [#uncaught-typeerror-failed-to-execute-createobjecturl-on-url-no-function-was-found-that-matched-the-signature-provided]

### Reason [#reason-10]

A mobile device emulator is running in the web browser.

### Solution [#solution-10]

Agora Web SDK does not support mobile device emulators. Do not use an emulator to debug your app.

## User is not in the session [#user-is-not-in-the-session]

### Reason [#reason-11]

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`.

### Solution [#solution-11]

Check your API call sequence.
