GetStream / stream-video-android

📲 Android Video SDK. Stream's versatile Core + Compose UI component libraries that allow you to build video calling, audio room, and, live streaming apps based on Webrtc running on Stream's global edge network.
https://getstream.io/video/docs/android
Other
382 stars 39 forks source link

App crash when I come back from background #1194

Closed inveders closed 1 month ago

inveders commented 1 month ago

Describe the bug Hello, I've implemented getstream for livestreaming in my app. I'm using Jetpack Compose. I have a live page and a podcast page. So I don't even enter the live page, I go to the podcast page, then I put my app in the background. When I come back to the app, it crashes and gives me this message.

java.lang.IllegalStateException: User token is empty at io.getstream.video.android.core.socket.CoordinatorSocket.authenticate(CoordinatorSocket.kt:64) at io.getstream.video.android.core.socket.PersistentSocket$connect$3$2$2.invokeSuspend(PersistentSocket.kt:136) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702) Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@cfbfc67, Dispatchers.IO]

SDK version

To Reproduce Steps to reproduce the behavior:

  1. Implement getstream in your app
  2. Put the app in background
  3. Come back in the app
  4. See error

Expected behavior The app come from backgorund without any issue

Device:

aleksandar-apostolov commented 1 month ago

Hey @inveders

The userToken must never be null or empty. You should only initialise the SDK if you have a user and its token. Can you please provide a sample code of how is the SDK initialised on your side especially with regards to the user, token and any token provider you may have.

Regards, Alex

github-actions[bot] commented 1 month ago

This issue has been automatically closed because there has been no response to our request from the original author. Please don't hesitate to comment on the bug if you have any more information for us - we will reopen it right away! Thanks for your contribution.