Skip to main content

Troubleshooting

There are several possible integration issues that can lead to calls not being established. This section will cover the most frequent ones.

Connection issues

Connection issues usually happen when you provide an invalid token during the SDK setup. When this happens, a web socket connection can't be established with our backend, resulting in errors when trying to connect to a call.

Expired tokens

When you initialize the StreamVideoClient object, you provide a token, as described here. The tokens generated in the docs have an expiry date, therefore, please make sure to always use a token with a valid expiry date. You can check the contents of a JWT token on websites like this one.

Additionally, when expiring tokens are used, you need to provide a tokenProvider when creating StreamVideoClient, that will be invoked when the existing token expires. This is your chance to update the token by generating a new one on your backend.

Wrong secret for token generation

When you start integrating the SDK into your app, you might copy-paste the token from the docs into your project. However, that will not work.

Tokens are generated with the help of the app secret (available in your dashboard), and are unique per app id. Your app id is different from the demo apps we have as examples in our docs.

On websites like this one, you can verify if the token is signed with the correct signature.

While developing, you can manually generate tokens by providing your secret and the user's ID here. However, note that for production usage, your backend would need to generate these tokens.

User-token mismatch

The token can be valid and correct, but for the wrong user. Make sure that the token you provide matches the id of the user that is used when creating the StreamVideoClient object.

Debuggers

Our SDK will log errors or warnings in browser's console unless disabled. We try to have a descriptive error messages that should guide you to faster problem resolution. Also, using browser's Network tab can help you spot failing network requests and the reasons for it.

Ringing calls issues

Ringing calls issues usually present themselves in a failure to show the incoming call screen or failure to deliver a notification event to the user we're trying to call.

Members of a call

One common issue is that you only specify one user and try to call the same user on another device. This will not work, if you are the caller, you will not receive a notification that you're being called - you can't call yourself.

As you would do it in the real world, you would need to specify another member (or members) that you want to call. Another important note - that member should also exist in Stream's platform (it must have connected at least once). This is needed because we need to know the user's device and where to send the call notification.

Reusing a call id

Call IDs in general can be reused - you can join a call with the same id many times. However, the ringing is done only once per call ID. Therefore, if you implement calls with ringing, make sure that you provide a unique ID every time, in order for the ring functionality to work. One option is to use a uuid as a call ID.

Logging

For easier debugging, you can turn on more verbose logging. To do that, follow these instructions.

Did you find this page helpful?