You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error while starting streamer
io.github.thibaultbee.streampack.error.StreamPackError: java.lang.IllegalStateException: Must register a callback before starting capture, to manage resources in response to MediaProjection states.
at io.github.thibaultbee.streampack.streamers.bases.BaseStreamer.startStream$suspendImpl(BaseStreamer.kt:308)
at io.github.thibaultbee.streampack.streamers.bases.BaseStreamer$startStream$1.invokeSuspend(Unknown Source:14)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
at io.github.thibaultbee.streampack.screenrecorder.MainActivity.configureAndStart(MainActivity.kt:217)
at io.github.thibaultbee.streampack.screenrecorder.MainActivity.access$configureAndStart(MainActivity.kt:54)
at io.github.thibaultbee.streampack.screenrecorder.MainActivity$getContent$1$3.invoke(MainActivity.kt:148)
at io.github.thibaultbee.streampack.screenrecorder.MainActivity$getContent$1$3.invoke(MainActivity.kt:139)
at io.github.thibaultbee.streampack.ext.rtmp.services.ScreenRecorderRtmpLiveService$Companion$launch$1.invoke(ScreenRecorderRtmpLiveService.kt:67)
at io.github.thibaultbee.streampack.ext.rtmp.services.ScreenRecorderRtmpLiveService$Companion$launch$1.invoke(ScreenRecorderRtmpLiveService.kt:63)
at io.github.thibaultbee.streampack.streamers.services.BaseScreenRecorderService$Companion$launch$connection$1.onServiceConnected(BaseScreenRecorderService.kt:303)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:2198)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:2231)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Caused by: java.lang.IllegalStateException: Must register a callback before starting capture, to manage resources in response to MediaProjection states.
at android.media.projection.MediaProjection.createVirtualDisplay(MediaProjection.java:206)
at io.github.thibaultbee.streampack.internal.sources.screen.ScreenSource.startStream(ScreenSource.kt:116)
at io.github.thibaultbee.streampack.streamers.bases.BaseStreamer.startStream$suspendImpl(BaseStreamer.kt:304)
at io.github.thibaultbee.streampack.streamers.bases.BaseStreamer$startStream$1.invokeSuspend(Unknown Source:14)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
at io.github.thibaultbee.streampack.screenrecorder.MainActivity.configureAndStart(MainActivity.kt:217)
at io.github.thibaultbee.streampack.screenrecorder.MainActivity.access$configureAndStart(MainActivity.kt:54)
at io.github.thibaultbee.streampack.screenrecorder.MainActivity$getContent$1$3.invoke(MainActivity.kt:148)
at io.github.thibaultbee.streampack.screenrecorder.MainActivity$getContent$1$3.invoke(MainActivity.kt:139)
at io.github.thibaultbee.streampack.ext.rtmp.services.ScreenRecorderRtmpLiveService$Companion$launch$1.invoke(ScreenRecorderRtmpLiveService.kt:67)
at io.github.thibaultbee.streampack.ext.rtmp.services.ScreenRecorderRtmpLiveService$Companion$launch$1.invoke(ScreenRecorderRtmpLiveService.kt:63)
at io.github.thibaultbee.streampack.streamers.services.BaseScreenRecorderService$Companion$launch$connection$1.onServiceConnected(BaseScreenRecorderService.kt:303)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:2198)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:2231)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
The text was updated successfully, but these errors were encountered:
Version
2.6.0
Environment that reproduces the issue
Real device: Samsung S21FE
Emulated device: Pixel 5 - API 34
RTMP/SRT/... Server
RTMP screen streamer
Audio configuration
No response
Video configuration
No response
Is it reproducible in the demos application?
Yes
Reproduction steps
Setup RTMP server, press 'Record screen' - after allowing screen recording app fails
Expected result
Stream screen to RTMP server
Actual result
The app reports the following error:
![Screenshot_20240628_124309_Screen Recorder](https://private-user-images.githubusercontent.com/21056975/344138744-4498e7e4-90d2-4d89-98f1-1f936e06457f.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMjAxODcsIm5iZiI6MTczOTIxOTg4NywicGF0aCI6Ii8yMTA1Njk3NS8zNDQxMzg3NDQtNDQ5OGU3ZTQtOTBkMi00ZDg5LTk4ZjEtMWY5MzZlMDY0NTdmLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDIwMzgwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc0NmRjMmIyOWE5OGVhYzNhNDA0YTE1Y2JkMzFiNmVkZTg1MzE2OWQzMGFhNjQ3ZTYwMWVkNzhlOTU2ZGZiODQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.UZu_8MmJHsClVR7isDvvzDbpVXSElbBls33WCRLhMZs)
Additional context
No response
Relevant logs output
The text was updated successfully, but these errors were encountered: