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 Message | Possible Cause | Handling Suggestion |
|---|---|---|
| WebSocket is closed before the connection is established | The connection between the Web application and ZEGO server was closed before the connection was successfully established. |
|
| input parm error.roomID must be string | Parameter 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 resource | DNS 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.
|
| publisher already exist | Repeated 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 error | The "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. |
| 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 source | The 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 required | Based 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 exist | The SDK does not support repeated playing of the same stream. | Check the business code logic to avoid repeated playing. |
