logo
On this page

How to handle common Web browser console errors?

2023-03-07
Products / Plugins:Video Call / Audio Call / Live streaming
Platform / Framework:Web

After integrating Zego Express Web SDK into your Web application, you can debug through the logs printed in the browser console when encountering problems. This article lists common errors and reasons in console logs.

Error MessagePossible CauseHandling Suggestion
WebSocket is closed before the connection is establishedThe connection between the Web application and ZEGO server was closed before the connection was successfully established.
  • Check the network connection.
  • Check if there are any DNS anomalies.
input parm error.roomID must be stringParameter error. The "roomID" format passed when logging into the room is incorrect.Please check the parameter content to ensure that "roomID" is in string format.
Failed to load resourceDNS resolution error on the user's local machine.

It is recommended that users modify DNS according to their region and log in to the room again.

  • Users in mainland China: Set the DNS server to 114.114.114.114.
  • Users outside mainland China: Set the DNS server to 8.8.8.8.
publisher already existRepeated publishing of streams with the same stream name.Check whether there is repeated publishing in the business logic. To republish, you need to first call the stopPublishingStream interface to stop publishing.
cmd=login, err_code=1011, err_message=token format errorThe "token" parameter format passed when logging into the room is incorrect."token" is a string type. You need to encrypt the json format with base64 before passing it to the loginRoom interface.
  • cmd=login, err_code=1000000101, err_message=login liveroom request fail"
  • "content":"server error=1000000101"
AppID expired or Server address is incorrect.Please go to the ZEGOCLOUD Console to confirm whether the address is correct or contact ZEGOCLOUD Technical Support.
devices detect error: NotReadableError Could not start video sourceThe browser does not have permission to access media devices or the media device is occupied.Check whether the page is allowed to access media device information and whether other programs are using the camera device.
https or localhost requiredBased on browser security policy requirements for privacy, the Web platform requires "https" to call the camera. This security policy is a browser requirement.
ZEGO SDK relies on the webRTC API provided by the browser, so it only supports SSL Web servers (https), localhost, 127.0.0.1 (equivalent to https).
You can use "localhost" for integration testing first. When going live later, you still need an "https" environment.
Player already existThe SDK does not support repeated playing of the same stream.Check the business code logic to avoid repeated playing.

Previous

How to handle Token-related error codes in Express?

Next

Is it supported to send messages to yourself?