jellyfin / jellyfin-androidtv

Android TV Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.79k stars 477 forks source link

Live TV playback #3732

Closed bigworm closed 3 months ago

bigworm commented 3 months ago

Describe the bug

When I go to live tv, via home screen and then guide, guide does not load schedule data which is present via web or android. Certain channels immediately crash jellyfin. Same channel works fine via web/android.

Issue started with 0.17.0 beta 1 and persists with 0.17.0 beta 2. Server is running 10.9.7

Issue only occurs when via home screen, then guide, then channel. If I go in via channels or on now the same channel works normally.

Tested on two shields and one shield pro. Same channel will crash all three. Log is from regular shield.

Logs


client: Jellyfin for Android TV client_version: 0.17.0-beta.2 client_repository: https://github.com/jellyfin/jellyfin-androidtv type: crash_report format: markdown

Logs

Stack Trace:

java.lang.IllegalStateException: ViewTreeLifecycleOwner not found from android.widget.PopupWindow$PopupDecorView{3598687 V.E...... R.....I. 0,0-0,0}
    at androidx.compose.ui.platform.WindowRecomposer_androidKt.createLifecycleAwareWindowRecomposer(WindowRecomposer.android.kt:352)
    at androidx.compose.ui.platform.WindowRecomposer_androidKt.createLifecycleAwareWindowRecomposer$default(WindowRecomposer.android.kt:325)
    at androidx.compose.ui.platform.WindowRecomposerFactory$Companion.LifecycleAware$lambda$0(WindowRecomposer.android.kt:168)
    at androidx.compose.ui.platform.WindowRecomposerFactory$Companion.$r8$lambda$FWAPLXs0qWMqekhMr83xkKattCY(Unknown Source:0)
    at androidx.compose.ui.platform.WindowRecomposerFactory$Companion$$ExternalSyntheticLambda0.createRecomposer(D8$$SyntheticClass:0)
    at androidx.compose.ui.platform.WindowRecomposerPolicy.createAndInstallWindowRecomposer$ui_release(WindowRecomposer.android.kt:224)
    at androidx.compose.ui.platform.WindowRecomposer_androidKt.getWindowRecomposer(WindowRecomposer.android.kt:300)
    at androidx.compose.ui.platform.AbstractComposeView.resolveParentCompositionContext(ComposeView.android.kt:244)
    at androidx.compose.ui.platform.AbstractComposeView.ensureCompositionCreated(ComposeView.android.kt:251)
    at androidx.compose.ui.platform.AbstractComposeView.onAttachedToWindow(ComposeView.android.kt:283)
    at android.view.View.dispatchAttachedToWindow(View.java:20479)
    at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3489)
    at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)
    at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)
    at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)
    at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2505)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2018)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8467)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
    at android.view.Choreographer.doCallbacks(Choreographer.java:796)
    at android.view.Choreographer.doFrame(Choreographer.java:731)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:223)
    at android.app.ActivityThread.main(ActivityThread.java:7668)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Logcat:

07-08 06:26:29.115 E/LiveTvGuideFragmentHelperKt$refreshSelectedProgram(22705):     at android.app.ActivityThread.main(ActivityThread.java:7668)
07-08 06:26:29.115 E/LiveTvGuideFragmentHelperKt$refreshSelectedProgram(22705):     at java.lang.reflect.Method.invoke(Native Method)
07-08 06:26:29.115 E/LiveTvGuideFragmentHelperKt$refreshSelectedProgram(22705):     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
07-08 06:26:29.115 E/LiveTvGuideFragmentHelperKt$refreshSelectedProgram(22705):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
07-08 06:26:31.040 I/org.jellyfin.sdk.api.ktor.KtorClient(22705): GET http://192.168.1.30:8096/Items/af2ac974-f49b-4a63-bcaf-352bfcaeda33
07-08 06:26:31.042 V/io.ktor.client.plugins.HttpPlainText(22705): Adding Accept-Charset=UTF-8 to http://192.168.1.30:8096/Items/af2ac974-f49b-4a63-bcaf-352bfcaeda33
07-08 06:26:31.051 V/io.ktor.client.plugins.HttpCallValidator(22705): Validating response for request http://192.168.1.30:8096/Items/af2ac974-f49b-4a63-bcaf-352bfcaeda33
07-08 06:26:31.051 V/io.ktor.client.plugins.DefaultResponseValidation(22705): Skipping default response validation for http://192.168.1.30:8096/Items/af2ac974-f49b-4a63-bcaf-352bfcaeda33
07-08 06:26:31.053 E/LiveTvGuideFragmentHelperKt$refreshSelectedProgram(22705): Unable to get program details
07-08 06:26:31.053 E/LiveTvGuideFragmentHelperKt$refreshSelectedProgram(22705): org.jellyfin.sdk.api.client.exception.InvalidStatusException: Invalid HTTP status in response: 404
07-08 06:26:31.053 E/LiveTvGuideFragmentHelperKt$refreshSelectedProgram(22705):     at org.jellyfin.sdk.api.ktor.KtorClient.request$suspendImpl(KtorClient.kt:132)
07-08 06:26:31.053 E/LiveTvGuideFragmentHelperKt$refreshSelectedProgram(22705):     at org.jellyfin.sdk.api.ktor.KtorClient$request$1.invokeSuspend(Unknown Source:19)
07-08 06:26:31.053 E/LiveTvGuideFragmentHelperKt$refreshSelectedProgram(22705):     at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
07-08 06:26:31.053 E/LiveTvGuideFragmentHelperKt$refreshSelectedProgram(22705):     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
07-08 06:26:31.053 E/LiveTvGuideFragmentHelperKt$refreshSelectedProgram(22705):     at android.os.Handler.handleCallback(Handler.java:938)
07-08 06:26:31.053 E/LiveTvGuideFragmentHelperKt$refreshSelectedProgram(22705):     at android.os.Handler.dispatchMessage(Handler.java:99)
07-08 06:26:31.053 E/LiveTvGuideFragmentHelperKt$refreshSelectedProgram(22705):     at android.os.Looper.loop(Looper.java:223)
07-08 06:26:31.053 E/LiveTvGuideFragmentHelperKt$refreshSelectedProgram(22705):     at android.app.ActivityThread.main(ActivityThread.java:7668)
07-08 06:26:31.053 E/LiveTvGuideFragmentHelperKt$refreshSelectedProgram(22705):     at java.lang.reflect.Method.invoke(Native Method)
07-08 06:26:31.053 E/LiveTvGuideFragmentHelperKt$refreshSelectedProgram(22705):     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
07-08 06:26:31.053 E/LiveTvGuideFragmentHelperKt$refreshSelectedProgram(22705):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
07-08 06:26:31.696 I/android_os_HwBinder(22705): HwBinder: Starting thread pool for getting: vendor.nvidia.hardware.cpl.service_common@1.0::INvCplHalCommonService/default
07-08 06:26:31.702 I/org.jellyfin.sdk.api.ktor.KtorClient(22705): GET http://192.168.1.30:8096/Items/a5525f1f-b5b2-4838-94a4-5194eaa57c19
07-08 06:26:31.704 V/io.ktor.client.plugins.HttpPlainText(22705): Adding Accept-Charset=UTF-8 to http://192.168.1.30:8096/Items/a5525f1f-b5b2-4838-94a4-5194eaa57c19
07-08 06:26:31.714 D/AndroidRuntime(22705): Shutting down VM
--------- beginning of crash
07-08 06:26:31.715 E/AndroidRuntime(22705): FATAL EXCEPTION: main
07-08 06:26:31.715 E/AndroidRuntime(22705): Process: org.jellyfin.androidtv, PID: 22705
07-08 06:26:31.715 E/AndroidRuntime(22705): java.lang.IllegalStateException: ViewTreeLifecycleOwner not found from android.widget.PopupWindow$PopupDecorView{3598687 V.E...... R.....I. 0,0-0,0}
07-08 06:26:31.715 E/AndroidRuntime(22705):     at androidx.compose.ui.platform.WindowRecomposer_androidKt.createLifecycleAwareWindowRecomposer(WindowRecomposer.android.kt:352)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at androidx.compose.ui.platform.WindowRecomposer_androidKt.createLifecycleAwareWindowRecomposer$default(WindowRecomposer.android.kt:325)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at androidx.compose.ui.platform.WindowRecomposerFactory$Companion.LifecycleAware$lambda$0(WindowRecomposer.android.kt:168)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at androidx.compose.ui.platform.WindowRecomposerFactory$Companion.$r8$lambda$FWAPLXs0qWMqekhMr83xkKattCY(Unknown Source:0)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at androidx.compose.ui.platform.WindowRecomposerFactory$Companion$$ExternalSyntheticLambda0.createRecomposer(D8$$SyntheticClass:0)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at androidx.compose.ui.platform.WindowRecomposerPolicy.createAndInstallWindowRecomposer$ui_release(WindowRecomposer.android.kt:224)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at androidx.compose.ui.platform.WindowRecomposer_androidKt.getWindowRecomposer(WindowRecomposer.android.kt:300)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at androidx.compose.ui.platform.AbstractComposeView.resolveParentCompositionContext(ComposeView.android.kt:244)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at androidx.compose.ui.platform.AbstractComposeView.ensureCompositionCreated(ComposeView.android.kt:251)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at androidx.compose.ui.platform.AbstractComposeView.onAttachedToWindow(ComposeView.android.kt:283)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at android.view.View.dispatchAttachedToWindow(View.java:20479)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3489)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2505)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2018)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8467)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at android.view.Choreographer.doCallbacks(Choreographer.java:796)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at android.view.Choreographer.doFrame(Choreographer.java:731)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at android.os.Handler.handleCallback(Handler.java:938)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at android.os.Handler.dispatchMessage(Handler.java:99)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at android.os.Looper.loop(Looper.java:223)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at android.app.ActivityThread.main(ActivityThread.java:7668)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at java.lang.reflect.Method.invoke(Native Method)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
07-08 06:26:31.715 E/AndroidRuntime(22705):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
07-08 06:26:31.716 E/ACRA    (22705): ACRA caught a IllegalStateException for org.jellyfin.androidtv
07-08 06:26:31.716 E/ACRA    (22705): java.lang.IllegalStateException: ViewTreeLifecycleOwner not found from android.widget.PopupWindow$PopupDecorView{3598687 V.E...... R.....I. 0,0-0,0}
07-08 06:26:31.716 E/ACRA    (22705):   at androidx.compose.ui.platform.WindowRecomposer_androidKt.createLifecycleAwareWindowRecomposer(WindowRecomposer.android.kt:352)
07-08 06:26:31.716 E/ACRA    (22705):   at androidx.compose.ui.platform.WindowRecomposer_androidKt.createLifecycleAwareWindowRecomposer$default(WindowRecomposer.android.kt:325)
07-08 06:26:31.716 E/ACRA    (22705):   at androidx.compose.ui.platform.WindowRecomposerFactory$Companion.LifecycleAware$lambda$0(WindowRecomposer.android.kt:168)
07-08 06:26:31.716 E/ACRA    (22705):   at androidx.compose.ui.platform.WindowRecomposerFactory$Companion.$r8$lambda$FWAPLXs0qWMqekhMr83xkKattCY(Unknown Source:0)
07-08 06:26:31.716 E/ACRA    (22705):   at androidx.compose.ui.platform.WindowRecomposerFactory$Companion$$ExternalSyntheticLambda0.createRecomposer(D8$$SyntheticClass:0)
07-08 06:26:31.716 E/ACRA    (22705):   at androidx.compose.ui.platform.WindowRecomposerPolicy.createAndInstallWindowRecomposer$ui_release(WindowRecomposer.android.kt:224)
07-08 06:26:31.716 E/ACRA    (22705):   at androidx.compose.ui.platform.WindowRecomposer_androidKt.getWindowRecomposer(WindowRecomposer.android.kt:300)
07-08 06:26:31.716 E/ACRA    (22705):   at androidx.compose.ui.platform.AbstractComposeView.resolveParentCompositionContext(ComposeView.android.kt:244)
07-08 06:26:31.716 E/ACRA    (22705):   at androidx.compose.ui.platform.AbstractComposeView.ensureCompositionCreated(ComposeView.android.kt:251)
07-08 06:26:31.716 E/ACRA    (22705):   at androidx.compose.ui.platform.AbstractComposeView.onAttachedToWindow(ComposeView.android.kt:283)
07-08 06:26:31.716 E/ACRA    (22705):   at android.view.View.dispatchAttachedToWindow(View.java:20479)
07-08 06:26:31.716 E/ACRA    (22705):   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3489)
07-08 06:26:31.716 E/ACRA    (22705):   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)
07-08 06:26:31.716 E/ACRA    (22705):   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)
07-08 06:26:31.716 E/ACRA    (22705):   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)
07-08 06:26:31.716 E/ACRA    (22705):   at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)
07-08 06:26:31.716 E/ACRA    (22705):   at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2505)
07-08 06:26:31.716 E/ACRA    (22705):   at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2018)
07-08 06:26:31.716 E/ACRA    (22705):   at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8467)
07-08 06:26:31.716 E/ACRA    (22705):   at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
07-08 06:26:31.716 E/ACRA    (22705):   at android.view.Choreographer.doCallbacks(Choreographer.java:796)
07-08 06:26:31.716 E/ACRA    (22705):   at android.view.Choreographer.doFrame(Choreographer.java:731)
07-08 06:26:31.716 E/ACRA    (22705):   at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
07-08 06:26:31.716 E/ACRA    (22705):   at android.os.Handler.handleCallback(Handler.java:938)
07-08 06:26:31.716 E/ACRA    (22705):   at android.os.Handler.dispatchMessage(Handler.java:99)
07-08 06:26:31.716 E/ACRA    (22705):   at android.os.Looper.loop(Looper.java:223)
07-08 06:26:31.716 E/ACRA    (22705):   at android.app.ActivityThread.main(ActivityThread.java:7668)
07-08 06:26:31.716 E/ACRA    (22705):   at java.lang.reflect.Method.invoke(Native Method)
07-08 06:26:31.716 E/ACRA    (22705):   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
07-08 06:26:31.716 E/ACRA    (22705):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
07-08 06:26:31.716 D/ACRA    (22705): Building report
07-08 06:26:31.716 D/ACRA    (22705): Starting collectors with priority FIRST
07-08 06:26:31.717 D/ACRA    (22705): Calling collector org.acra.collector.DropBoxCollector
07-08 06:26:31.717 D/ACRA    (22705): Calling collector org.acra.collector.LogCatCollector
07-08 06:26:31.717 D/ACRA    (22705): Calling collector org.acra.collector.StacktraceCollector
07-08 06:26:31.717 D/ACRA    (22705): Collector org.acra.collector.DropBoxCollector completed
07-08 06:26:31.718 D/ACRA    (22705): Collector org.acra.collector.StacktraceCollector completed
07-08 06:26:31.725 D/ACRA    (22705): Retrieving logcat output (buffer:default)...

App information

App version: 0.17.0-beta.2 (170002)
Package name: org.jellyfin.androidtv
Build:

{"BOARD":"sif","BOOTLOADER":"32.00.2019.50-t210-69ebfcbe","BRAND":"NVIDIA","CPU_ABI":"armeabi-v7a","CPU_ABI2":"armeabi","DEVICE":"sif","DISPLAY":"RQ1A.210105.003.7825199_3167.5736","FINGERPRINT":"NVIDIA\/sif\/sif:11\/RQ1A.210105.003\/7825199_3167.5736:user\/release-keys","HARDWARE":"sif","HOST":"mobile-u64-5306-d6000","ID":"RQ1A.210105.003","IS_DEBUGGABLE":false,"IS_EMULATOR":false,"MANUFACTURER":"NVIDIA","MODEL":"SHIELD Android TV","PERMISSIONS_REVIEW_REQUIRED":true,"PRODUCT":"sif","RADIO":"unknown","SUPPORTED_32_BIT_ABIS":["armeabi-v7a","armeabi"],"SUPPORTED_64_BIT_ABIS":[],"SUPPORTED_ABIS":["armeabi-v7a","armeabi"],"TAGS":"release-keys","TIME":1665975946000,"TYPE":"user","UNKNOWN":"unknown","USER":"NVIDIA","VERSION":{"ACTIVE_CODENAMES":[],"BASE_OS":"","CODENAME":"REL","INCREMENTAL":"7825199_3167.5736","PREVIEW_SDK_FINGERPRINT":"REL","PREVIEW_SDK_INT":0,"RELEASE":"11","RELEASE_OR_CODENAME":"11","SDK":"30","SDK_INT":30,"SECURITY_PATCH":"2022-04-05"}}

Build config:

{"APPLICATION_ID":"org.jellyfin.androidtv","BUILD_TYPE":"release","DEBUG":false,"DEVELOPMENT":false,"VERSION_CODE":170002,"VERSION_NAME":"0.17.0-beta.2"}

Device information

Android version: 11
Device brand: NVIDIA
Device product: sif
Device model: SHIELD Android TV

Crash information

Start time: 2024-07-08T06:26:12.466-05:00
Crash time: 2024-07-08T06:26:31.768-05:00

Application version

0.17.0 beta 2

Where did you install the app from?

Google Play

Device information

Nvidia Shield

Android version

Android 11

Jellyfin server version

10.9.7

nielsvanvelzen commented 3 months ago

Please try again with beta 3. A lot of bug fixes went in for Live TV functionality.

bigworm commented 3 months ago

Beta 3 did fix the guide playback issue, but the behavior has changed. I assume this was intentional. As opposed to playing the selected item immediately, now when you choose something from the guide a modal window pops up and has a few options, with record being the default selected choice. I would think tune to channel would be the best default button on this screen.

The guide is still showing no data, but jf is getting the information, as the on now section shows what is on each channel from the guide data.

nielsvanvelzen commented 3 months ago

I figured out why there was no data showing. It was a timezone issue. Should be fixed in the next beta.

For the click behavior, the Live TV guide opens a channel when the item is currently playing and opens the popup when it is not. Because of the timezone issue it would always show, so also fixed in next beta.