jellyfin / jellyfin-androidtv

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

Certain Live TV Channels crash the app instantly #3918

Open schumi4 opened 2 months ago

schumi4 commented 2 months ago

Describe the bug

A certain group of channels I can watch over IPTV from all other clients without a problem crash the Android TV app on a Chromecast with Google TV immediately. All other channels play fine. This happens on another CCwGTV as well.

Logs


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

Logs

Stack Trace:

java.lang.IllegalStateException: Fragment CustomPlaybackOverlayFragment{d848e82} (f386dbb4-35e5-40e3-a6a5-ef4f716074c4) not attached to a context.
    at androidx.fragment.app.Fragment.requireContext(Fragment.java:977)
    at org.jellyfin.androidtv.ui.playback.CustomPlaybackOverlayFragment.lambda$prepareChannelAdapter$11$org-jellyfin-androidtv-ui-playback-CustomPlaybackOverlayFragment(CustomPlaybackOverlayFragment.java:1302)
    at org.jellyfin.androidtv.ui.playback.CustomPlaybackOverlayFragment$$ExternalSyntheticLambda14.apply(D8$$SyntheticClass:0)
    at org.jellyfin.androidtv.ui.livetv.TvManager.lambda$loadAllChannels$0(TvManager.java:102)
    at org.jellyfin.androidtv.ui.livetv.TvManager$$ExternalSyntheticLambda2.invoke(D8$$SyntheticClass:0)
    at org.jellyfin.androidtv.ui.livetv.TvManagerHelperKt$loadLiveTvChannels$1.invokeSuspend(TvManagerHelper.kt:46)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7839)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@de95e58, Dispatchers.Main.immediate]

Logcat:

08-21 19:12:09.887 I/VideoManager( 9089): Video path set to: https://domain.tld/videos/9082d106-4854-5a44-f94d-9f98725d988b/master.m3u8?DeviceId=92ef3f6bfaf449f1f4d916e9c961acb946eecde0&MediaSourceId=9e139c57eb7c0f0265b458c8e7a023a5&VideoCodec=hevc,h264,h264&AudioCodec=aac,mp3&AudioStreamIndex=-1&VideoBitrate=199808000&AudioBitrate=192000&MaxFramerate=50&PlaySessionId=46ef05934cf147a19f4666813707d4ff&api_key=b0523debc77b4759802eea344ba1e622&LiveStreamId=e2329f4997b378e64ccf8fa396deb76e_af999c25a00715699361240d4c6c7a53_9e139c57eb7c0f0265b458c8e7a023a5&RequireAvc=false&SegmentContainer=ts&BreakOnNonKeyFrames=False&h264-level=32&h264-videobitdepth=8&h264-profile=high&h264-maxrefframes=12&aac-audiochannels=2&TranscodeReasons=AudioCodecNotSupported
08-21 19:12:09.890 D/VideoManager( 9089): Caught player timeline change - reason: PLAYLIST_CHANGED
08-21 19:12:09.893 D/VideoManager( 9089): Player is buffering
08-21 19:12:09.894 D/jellyfin-apiclient( 9089): Adding request to queue: https://domain.tld/Sessions/Playing
08-21 19:12:09.895 I/ReportingHelper( 9089): Playback of ZDF started.
08-21 19:12:09.909 V/io.ktor.client.plugins.defaultTransformers( 9089): Transformed with default transformers response body for https://domain.tld/UserViews?includeHidden=false to interface io.ktor.utils.io.ByteReadChannel (Kotlin reflection is not available)
08-21 19:12:09.917 D/ItemRowAdapterHelperKt( 9089): Creating items from 0 existing and 3 new, adapter size is 0
08-21 19:12:09.935 V/io.ktor.client.plugins.defaultTransformers( 9089): Transformed with default transformers response body for https://domain.tld/LiveTv/Programs/Recommended?limit=20&isAiring=true&imageTypeLimit=1&fields=Overview&fields=PrimaryImageAspectRatio&fields=ChannelInfo&fields=ChildCount&enableTotalRecordCount=false to interface io.ktor.utils.io.ByteReadChannel (Kotlin reflection is not available)
08-21 19:12:09.946 D/ItemRowAdapterHelperKt( 9089): Creating items from 0 existing and 4 new, adapter size is 0
08-21 19:12:09.951 V/io.ktor.client.plugins.defaultTransformers( 9089): Transformed with default transformers response body for https://domain.tld/Shows/NextUp?limit=50&fields=PrimaryImageAspectRatio&fields=Overview&fields=ChildCount&imageTypeLimit=1&enableTotalRecordCount=true&disableFirstEpisode=false&enableResumable=false&enableRewatching=false to interface io.ktor.utils.io.ByteReadChannel (Kotlin reflection is not available)
08-21 19:12:09.956 V/io.ktor.client.plugins.HttpCallValidator( 9089): Validating response for request https://domain.tld/LiveTv/Channels?sortBy=SortName&sortOrder=Ascending&enableFavoriteSorting=true&addCurrentProgram=true
08-21 19:12:09.956 V/io.ktor.client.plugins.DefaultResponseValidation( 9089): Skipping default response validation for https://domain.tld/LiveTv/Channels?sortBy=SortName&sortOrder=Ascending&enableFavoriteSorting=true&addCurrentProgram=true
08-21 19:12:09.962 V/io.ktor.client.plugins.defaultTransformers( 9089): Transformed with default transformers response body for https://domain.tld/UserItems/Resume?limit=50&fields=PrimaryImageAspectRatio&fields=Overview&fields=ItemCounts&fields=DisplayPreferencesId&fields=ChildCount&mediaTypes=Video&imageTypeLimit=1&excludeItemTypes=AudioBook&enableTotalRecordCount=false&enableImages=true&excludeActiveSessions=false to interface io.ktor.utils.io.ByteReadChannel (Kotlin reflection is not available)
08-21 19:12:10.308 D/ItemRowAdapterHelperKt( 9089): Creating items from 0 existing and 20 new, adapter size is 0
08-21 19:12:10.332 D/ItemRowAdapterHelperKt( 9089): Creating items from 0 existing and 8 new, adapter size is 0
08-21 19:12:10.337 I/jellyfin-apiclient( 9089): Response received from: https://domain.tld/Sessions/Playing
08-21 19:12:10.342 V/io.ktor.client.plugins.defaultTransformers( 9089): Transformed with default transformers response body for https://domain.tld/Items/Latest?parentId=43cfe12f-e7d9-d8d2-1251-e0964e0232e2&fields=PrimaryImageAspectRatio&fields=Overview&fields=ChildCount&fields=SeriesPrimaryImage&imageTypeLimit=1&limit=50&groupItems=true to interface io.ktor.utils.io.ByteReadChannel (Kotlin reflection is not available)
08-21 19:12:10.398 D/ItemRowAdapterHelperKt( 9089): Creating items from 0 existing and 10 new, adapter size is 0
08-21 19:12:10.400 I/jellyfin-apiclient( 9089): Response received from: https://domain.tld/Sessions/Playing/Stopped
08-21 19:12:10.409 D/ACRA    ( 9089): onActivityPaused class org.jellyfin.androidtv.ui.browsing.MainActivity
08-21 19:12:10.429 D/ACRA    ( 9089): onActivityStopped class org.jellyfin.androidtv.ui.browsing.MainActivity
08-21 19:12:10.431 D/CustomPlaybackOverlayFragment( 9089): Stopping!
08-21 19:12:10.432 D/CustomPlaybackOverlayFragment( 9089): this fragment belongs to the current session, ending it
08-21 19:12:10.433 D/PlaybackController( 9089): stop called at 0
08-21 19:12:10.434 I/ReportingHelper( 9089): ReportingHelper.reportStopped called for 9082d106-4854-5a44-f94d-9f98725d988b at position 0
08-21 19:12:10.434 I/jellyfin-apiclient( 9089): ReportPlaybackStopped: Item 9082d106-4854-5a44-f94d-9f98725d988b, Ticks: 0
08-21 19:12:10.435 D/jellyfin-apiclient( 9089): Adding request to queue: https://domain.tld/Sessions/Playing/Stopped
08-21 19:12:10.439 I/ExoPlayerImpl( 9089): Release 8141d11 [AndroidXMedia3/1.4.0] [sabrina, Chromecast, Google, 31] [media3.common, media3.exoplayer, media3.decoder, media3.session, media3.ui, media3.exoplayer.hls, media3.datasource]
08-21 19:12:10.443 D/MainActivity$onStop( 9089): MainActivity stopped
08-21 19:12:10.444 I/SessionRepositoryImpl$restoreSession( 9089): Restoring session
08-21 19:12:10.445 D/ACRA    ( 9089): onActivitySaveInstanceState class org.jellyfin.androidtv.ui.browsing.MainActivity
08-21 19:12:10.458 D/ACRA    ( 9089): onActivityDestroyed class org.jellyfin.androidtv.ui.browsing.MainActivity
08-21 19:12:10.480 D/Compose Focus( 9089): Owner FocusChanged(true)
08-21 19:12:10.568 D/ACRA    ( 9089): onActivityCreated class org.jellyfin.androidtv.ui.browsing.MainActivity
08-21 19:12:10.603 D/DefaultPlayerQueueState( 9089): Queue changed, setting index to 0
08-21 19:12:10.605 I/PlaybackController( 9089): ** Available display refresh rates:
08-21 19:12:10.606 D/PlaybackController( 9089): display mode 1 - 720x480@59,940060
08-21 19:12:10.607 D/PlaybackController( 9089): display mode 2 - 720x480@60,000004
08-21 19:12:10.608 D/PlaybackController( 9089): display mode 3 - 720x576@50,000000
08-21 19:12:10.608 D/PlaybackController( 9089): display mode 4 - 1280x720@59,940060
08-21 19:12:10.609 D/PlaybackController( 9089): display mode 5 - 1280x720@60,000004
08-21 19:12:10.610 D/PlaybackController( 9089): display mode 6 - 1920x1080@59,940060
08-21 19:12:10.611 D/PlaybackController( 9089): display mode 7 - 1920x1080@60,000004
08-21 19:12:10.612 D/PlaybackController( 9089): display mode 8 - 1280x720@50,000000
08-21 19:12:10.612 D/PlaybackController( 9089): display mode 9 - 1920x1080@29,970030
08-21 19:12:10.613 D/PlaybackController( 9089): display mode 10 - 1920x1080@30,000002
08-21 19:12:10.614 D/PlaybackController( 9089): display mode 11 - 1920x1080@50,000000
08-21 19:12:10.615 D/PlaybackController( 9089): display mode 12 - 1920x1080@25,000000
08-21 19:12:10.616 D/PlaybackController( 9089): display mode 13 - 1920x1080@23,976025
08-21 19:12:10.617 D/PlaybackController( 9089): display mode 14 - 1920x1080@24,000002
08-21 19:12:10.625 I/org.jellyfin.sdk.api.ktor.KtorClient( 9089): GET https://domain.tld/LiveTv/Programs/Recommended?limit=1&isAiring=true&imageTypeLimit=1&enableTotalRecordCount=false
08-21 19:12:10.627 I/HomeRowsFragment( 9089): Updating audio queue in HomeFragment (onQueueStatusChanged)
08-21 19:12:10.629 V/io.ktor.client.plugins.HttpPlainText( 9089): Adding Accept-Charset=UTF-8 to https://domain.tld/LiveTv/Programs/Recommended?limit=1&isAiring=true&imageTypeLimit=1&enableTotalRecordCount=false
08-21 19:12:10.644 D/ACRA    ( 9089): onActivityStarted class org.jellyfin.androidtv.ui.browsing.MainActivity
08-21 19:12:10.670 V/io.ktor.client.plugins.HttpCallValidator( 9089): Validating response for request https://domain.tld/LiveTv/Programs/Recommended?limit=1&isAiring=true&imageTypeLimit=1&enableTotalRecordCount=false
08-21 19:12:10.670 V/io.ktor.client.plugins.DefaultResponseValidation( 9089): Skipping default response validation for https://domain.tld/LiveTv/Programs/Recommended?limit=1&isAiring=true&imageTypeLimit=1&enableTotalRecordCount=false
08-21 19:12:10.676 V/io.ktor.client.plugins.defaultTransformers( 9089): Transformed with default transformers response body for https://domain.tld/LiveTv/Programs/Recommended?limit=1&isAiring=true&imageTypeLimit=1&enableTotalRecordCount=false to interface io.ktor.utils.io.ByteReadChannel (Kotlin reflection is not available)
08-21 19:12:10.727 I/ExoPlayerImpl( 9089): Init f5877b [AndroidXMedia3/1.4.0] [sabrina, Chromecast, Google, 31]
08-21 19:12:10.728 I/DefaultRenderersFactory( 9089): Loaded FfmpegVideoRenderer.
08-21 19:12:10.733 I/DefaultRenderersFactory( 9089): Loaded FfmpegAudioRenderer.
08-21 19:12:10.760 I/PlaybackController( 9089): Play called from state: IDLE with pos: -100000000 and sub index: null
08-21 19:12:10.760 I/PlaybackController( 9089): Negative start requested - adjusting to zero
08-21 19:12:10.761 D/PlaybackController( 9089): Max bitrate is: 200000000
08-21 19:12:10.765 I/org.jellyfin.sdk.api.ktor.KtorClient( 9089): GET https://domain.tld/LiveTv/Channels/9082d106-4854-5a44-f94d-9f98725d988b
08-21 19:12:10.769 V/io.ktor.client.plugins.HttpPlainText( 9089): Adding Accept-Charset=UTF-8 to https://domain.tld/LiveTv/Channels/9082d106-4854-5a44-f94d-9f98725d988b
08-21 19:12:10.776 I/PlaybackController( 9089): Using internal player for Live TV
08-21 19:12:10.781 D/jellyfin-apiclient( 9089): Adding request to queue: https://domain.tld/Items/9082d106-4854-5a44-f94d-9f98725d988b/PlaybackInfo?format=json
08-21 19:12:10.789 D/org.jellyfin.sdk.api.sockets.OkHttpSocketConnection( 9089): Receiving (raw) message {"MessageId":"e03cb870beb64964aa065677668a37f6","Data":{"UserId":"bd2e34a6846e4726b9a53128fcc343b1","UserDataList":[{"PlaybackPositionTicks":0,"PlayCount":2,"IsFavorite":false,"LastPlayedDate":"2024-08-21T17:12:10.0328149Z","Played":false,"Key":"9082d106-4854-5a44-f94d-9f98725d988b","ItemId":"9082d10648545a44f94d9f98725d988b"},{"PlaybackPositionTicks":0,"PlayCount":0,"IsFavorite":false,"Played":false,"Key":"2b2bca16-aacc-8a14-d53a-11bb829eafa5","ItemId":"2b2bca16aacc8a14d53a11bb829eafa5"}]},"MessageType":"UserDataChanged"}
08-21 19:12:10.791 W/PhoneWindow( 9089): Previously focused view reported id 2131427902 during save, but can't be found during restore.
08-21 19:12:10.791 D/ACRA    ( 9089): onActivityResumed class org.jellyfin.androidtv.ui.browsing.MainActivity
08-21 19:12:10.794 W/AudioManager( 9089): Use of stream types is deprecated for operations other than volume control
08-21 19:12:10.794 W/AudioManager( 9089): See the documentation of requestAudioFocus() for what to use instead with android.media.AudioAttributes to qualify your playback use case
08-21 19:12:10.836 E/ACRA    ( 9089): ACRA caught a IllegalStateException for org.jellyfin.androidtv
08-21 19:12:10.836 E/ACRA    ( 9089): java.lang.IllegalStateException: Fragment CustomPlaybackOverlayFragment{d848e82} (f386dbb4-35e5-40e3-a6a5-ef4f716074c4) not attached to a context.
08-21 19:12:10.836 E/ACRA    ( 9089):   at androidx.fragment.app.Fragment.requireContext(Fragment.java:977)
08-21 19:12:10.836 E/ACRA    ( 9089):   at org.jellyfin.androidtv.ui.playback.CustomPlaybackOverlayFragment.lambda$prepareChannelAdapter$11$org-jellyfin-androidtv-ui-playback-CustomPlaybackOverlayFragment(CustomPlaybackOverlayFragment.java:1302)
08-21 19:12:10.836 E/ACRA    ( 9089):   at org.jellyfin.androidtv.ui.playback.CustomPlaybackOverlayFragment$$ExternalSyntheticLambda14.apply(D8$$SyntheticClass:0)
08-21 19:12:10.836 E/ACRA    ( 9089):   at org.jellyfin.androidtv.ui.livetv.TvManager.lambda$loadAllChannels$0(TvManager.java:102)
08-21 19:12:10.836 E/ACRA    ( 9089):   at org.jellyfin.androidtv.ui.livetv.TvManager$$ExternalSyntheticLambda2.invoke(D8$$SyntheticClass:0)
08-21 19:12:10.836 E/ACRA    ( 9089):   at org.jellyfin.androidtv.ui.livetv.TvManagerHelperKt$loadLiveTvChannels$1.invokeSuspend(TvManagerHelper.kt:46)
08-21 19:12:10.836 E/ACRA    ( 9089):   at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
08-21 19:12:10.836 E/ACRA    ( 9089):   at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
08-21 19:12:10.836 E/ACRA    ( 9089):   at android.os.Handler.handleCallback(Handler.java:938)
08-21 19:12:10.836 E/ACRA    ( 9089):   at android.os.Handler.dispatchMessage(Handler.java:99)
08-21 19:12:10.836 E/ACRA    ( 9089):   at android.os.Looper.loopOnce(Looper.java:201)
08-21 19:12:10.836 E/ACRA    ( 9089):   at android.os.Looper.loop(Looper.java:288)
08-21 19:12:10.836 E/ACRA    ( 9089):   at android.app.ActivityThread.main(ActivityThread.java:7839)
08-21 19:12:10.836 E/ACRA    ( 9089):   at java.lang.reflect.Method.invoke(Native Method)
08-21 19:12:10.836 E/ACRA    ( 9089):   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
08-21 19:12:10.836 E/ACRA    ( 9089):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
08-21 19:12:10.836 E/ACRA    ( 9089):   Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@de95e58, Dispatchers.Main.immediate]
08-21 19:12:10.837 D/ACRA    ( 9089): Building report
08-21 19:12:10.839 D/ACRA    ( 9089): Starting collectors with priority FIRST
08-21 19:12:10.840 D/ACRA    ( 9089): Calling collector org.acra.collector.DropBoxCollector
08-21 19:12:10.840 D/ACRA    ( 9089): Calling collector org.acra.collector.LogCatCollector
08-21 19:12:10.840 D/ACRA    ( 9089): Collector org.acra.collector.DropBoxCollector completed
08-21 19:12:10.841 D/ACRA    ( 9089): Calling collector org.acra.collector.StacktraceCollector
08-21 19:12:10.841 D/ACRA    ( 9089): Collector org.acra.collector.StacktraceCollector completed
08-21 19:12:10.857 D/ACRA    ( 9089): Retrieving logcat output (buffer:default)...

App information

App version: 0.17.3 (170399)
Package name: org.jellyfin.androidtv
Build:

{"BOARD":"sabrina","BOOTLOADER":"01.01.231226.064815","BRAND":"google","CPU_ABI":"armeabi-v7a","CPU_ABI2":"armeabi","DEVICE":"sabrina","DISPLAY":"STTL.240508.005.12011027","FINGERPRINT":"google\/sabrina_prod_stable\/sabrina:12\/STTL.240508.005\/12011027:user\/release-keys","HARDWARE":"amlogic","HOST":"r-d3d21742fc70d910-xpkc","ID":"STTL.240508.005","IS_DEBUGGABLE":false,"IS_EMULATOR":false,"MANUFACTURER":"Google","MODEL":"Chromecast","ODM_SKU":"DE","PERMISSIONS_REVIEW_REQUIRED":true,"PRODUCT":"sabrina_prod_stable","RADIO":"unknown","SKU":"DE","SOC_MANUFACTURER":"Amlogic","SOC_MODEL":"AMLS905D3","SUPPORTED_32_BIT_ABIS":["armeabi-v7a","armeabi"],"SUPPORTED_64_BIT_ABIS":[],"SUPPORTED_ABIS":["armeabi-v7a","armeabi"],"TAGS":"release-keys","TIME":1719300940000,"TYPE":"user","UNKNOWN":"unknown","USER":"android-build","VERSION":{"ACTIVE_CODENAMES":[],"BASE_OS":"","CODENAME":"REL","INCREMENTAL":"12011027","MEDIA_PERFORMANCE_CLASS":0,"PREVIEW_SDK_FINGERPRINT":"REL","PREVIEW_SDK_INT":0,"RELEASE":"12","RELEASE_OR_CODENAME":"12","SDK":"31","SDK_INT":31,"SECURITY_PATCH":"2024-06-01"}}

Build config:

{"APPLICATION_ID":"org.jellyfin.androidtv","BUILD_TYPE":"release","DEBUG":false,"DEVELOPMENT":false,"VERSION_CODE":170399,"VERSION_NAME":"0.17.3"}

Device information

Android version: 12
Device brand: google
Device product: sabrina_prod_stable
Device model: Chromecast

Crash information

Start time: 2024-08-21T19:11:42.874+02:00
Crash time: 2024-08-21T19:12:10.980+02:00

Application version

0.17.3

Where did you install the app from?

Google Play

Device information

Chromecast with Google TV

Android version

12, stock

Jellyfin server version

10.9.9

schumi4 commented 2 months ago

After further testing, this seems to be a bug specific to Chromecast with Google TV.

Streams that crash the app on two separate CCwGTV run fine on a Nokia 8010, a Fire TV Stick and integrated Android TV on a Phillipps TV. All tested with identical streams from the same Jellyfin instance.