jellyflix-app / jellyflix

Jellyfix is an easy-to-use Jellyfin client for movies and shows. It's cross-platform and supports Mobile (iOS, Android) and Desktop (Windows, Mac, Linux).
https://jellyflix.kiejon.com
GNU General Public License v3.0
182 stars 26 forks source link

[Issue]: Android app crashes on play #132

Open madmini opened 1 month ago

madmini commented 1 month ago

Please describe your bug

App crashes as soon as I try to play any media. Tested on my local Jellyfin 10.9.11 instance (same results with https://demo.jellyfin.org/stable when its up) with Play Store Beta version (1.3.1-preview0190) and latest non-pre release (0.10.0) on an OnePlus 6 (Android 11).

Running in debug from preview branch (1.3.1-preview0190) on the same phone also crashes with the following log:

"de": 5 untranslated message(s).
"es": 5 untranslated message(s).
"fr": 6 untranslated message(s).
"he": 6 untranslated message(s).
"it": 5 untranslated message(s).
"pl": 5 untranslated message(s).
"tr": 7 untranslated message(s).
"zh": 5 untranslated message(s).
To see a detailed report, use the untranslated-messages-file 
option in the l10n.yaml file:
untranslated-messages-file: desiredFileName.txt
<other option>: <other selection> 

This will generate a JSON format file containing all messages that 
need to be translated.
Launching lib\main.dart on ONEPLUS A6003 in debug mode...
Running Gradle task 'assembleDebug'...
√ Built build\app\outputs\flutter-apk\app-debug.apk
Debug service listening on ws://127.0.0.1:58971/1ZlifNoF3Uw=/ws
Syncing files to device ONEPLUS A6003...
[GoRouter] Full paths for routes:
  => /home
  => /library
  => /detail
  => /search
  => /profile
  => /downloads
  => /loading
  => /player
  => /offlinePlayer
  => /login

[GoRouter] setting initial location /login
I/Gralloc4( 7880): mapper 4.x is not supported
W/Gralloc3( 7880): mapper 3.x is not supported
D/DecorView( 7880): onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@56bdf29[MainActivity]
D/ViewRootImpl[MainActivity]( 7880): windowFocusChanged hasFocus=true inTouchMode=true
D/ProfileInstaller( 7880): Installing profile for com.ambark.jellyflix
E/sqlite3_android( 7880): [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
[GoRouter] redirecting to RouteMatchList#49557(uri: /home, matches: [ShellRouteMatch#389dc(route: ShellRoute#62a45(navigatorKey: [LabeledGlobalKey<NavigatorState>#6d37d]))])
[GoRouter] pushing /player?startTimeTicks=0
[GoRouter] An extra with complex data type (String, _$PlaybackInfoResponse) is provided without a codec. Consider provide a codec to GoRouter to prevent extra being dropped during serialization.
[GoRouter] An extra with complex data type (String, _$PlaybackInfoResponse) is provided without a codec. Consider provide a codec to GoRouter to prevent extra being dropped during serialization.
D/permissions_handler( 7880): No permissions found in manifest for: []15
D/permissions_handler( 7880): No permissions found in manifest for: []15
D/ViewRootImpl[MainActivity]( 7880): windowFocusChanged hasFocus=false inTouchMode=true
I/media_kit( 7880): package:media_kit_libs_android_video detached.
E/libEGL  ( 7880): call to OpenGL ES API with no current context (logged once per thread)
W/FlutterJNI( 7880): Tried to send a platform message response, but FlutterJNI was detached from native C++. Could not send. Response ID: 117
W/FlutterJNI( 7880): Tried to send a platform message response, but FlutterJNI was detached from native C++. Could not send. Response ID: 120
W/FlutterJNI( 7880): Tried to send a platform message response, but FlutterJNI was detached from native C++. Could not send. Response ID: 121
I/media_kit( 7880): com.alexmercerind.media_kit_video.VideoOutputManager.create: 527406684464
E/MethodChannel#com.alexmercerind/media_kit_video( 7880): Failed to handle method call
E/MethodChannel#com.alexmercerind/media_kit_video( 7880): java.lang.RuntimeException: Cannot execute operation because FlutterJNI is not attached to native.
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at io.flutter.embedding.engine.FlutterJNI.ensureAttachedToNative(FlutterJNI.java:516)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at io.flutter.embedding.engine.FlutterJNI.registerTexture(FlutterJNI.java:902)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at io.flutter.embedding.engine.renderer.FlutterRenderer.registerTexture(FlutterRenderer.java:1223)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at io.flutter.embedding.engine.renderer.FlutterRenderer.registerSurfaceTexture(FlutterRenderer.java:273)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at io.flutter.embedding.engine.renderer.FlutterRenderer.registerSurfaceTexture(FlutterRenderer.java:256)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at io.flutter.embedding.engine.renderer.FlutterRenderer.createSurfaceTexture(FlutterRenderer.java:246)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at com.alexmercerind.media_kit_video.VideoOutput.<init>(VideoOutput.java:72)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at com.alexmercerind.media_kit_video.VideoOutputManager.create(VideoOutputManager.java:34)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at com.alexmercerind.media_kit_video.MediaKitVideoPlugin.onMethodCall(MediaKitVideoPlugin.java:103)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at android.os.Handler.handleCallback(Handler.java:938)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at android.os.Looper.loop(Looper.java:233)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at android.app.ActivityThread.main(ActivityThread.java:8068)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
E/MethodChannel#com.alexmercerind/media_kit_video( 7880):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
W/FlutterJNI( 7880): Tried to send a platform message response, but FlutterJNI was detached from native C++. Could not send. Response ID: 126
I/Choreographer( 7880): Skipped 118 frames!  The application may be doing too much work on its main thread.

The crash happens at windowFocusChanged hasFocus=false, everything logged after than pops up a second after the app closes.

Jellyflix Version

Other

if other:

1.3.1-preview0190

Jellyfin Version

10.9.x

if other:

No response

Environment

- OS: Android
- OS Version: Android 11
- Playback Method: Direct Play, Remux
QuAzI commented 1 week ago

The same issue with Jellyfin 10.10.0 (hosted on Docker) on Samsung Note 10+ (Android 12) and Lenovo Tab M10 HD (Android 11) The latest Jellyflix (1.2.0-preview0156) from GApps All videos cause closing app without any diagnostic messages

jdk-21 commented 1 week ago

I think this is a permission issue. This issue needs a Bit more Investigation on what Android versions work and what don't.

@QuAzI Which version are you using?

QuAzI commented 1 week ago

@jdk-21 added more information to previous comment