Skip to content

fix: exoplayer usage#16603

Open
alperozturk96 wants to merge 5 commits intomasterfrom
fix/exoplayer-usage
Open

fix: exoplayer usage#16603
alperozturk96 wants to merge 5 commits intomasterfrom
fix/exoplayer-usage

Conversation

@alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Feb 27, 2026

Issues

Exception android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException:
  at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException (ActivityThread.java:2923)
  at android.app.ActivityThread.throwRemoteServiceException (ActivityThread.java:2891)
  at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException (Unknown Source)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:3255)
  at android.os.Handler.dispatchMessage (Handler.java:118)
  at android.os.Looper.loopOnce (Looper.java:237)
  at android.os.Looper.loop (Looper.java:325)
  at android.app.ActivityThread.main (ActivityThread.java:10385)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:635)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:961)
Exception java.lang.IllegalStateException:
  at androidx.fragment.app.Fragment.requireContext (Fragment.java:977)
  at com.owncloud.android.ui.preview.PreviewMediaFragment.createExoPlayer (PreviewMediaFragment.kt:265)
  at com.owncloud.android.ui.preview.PreviewMediaFragment.prepareForVideo$lambda$0$0 (PreviewMediaFragment.kt:246)
  at com.owncloud.android.ui.preview.PreviewMediaFragment.$r8$lambda$LAKt5wPiV7OXsof15OnWmBbjqQ8 (Unknown Source)
  at com.owncloud.android.ui.preview.PreviewMediaFragment$$ExternalSyntheticLambda4.run (D8$$SyntheticClass)
  at android.os.Handler.handleCallback (Handler.java:958)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loopOnce (Looper.java:206)
  at android.os.Looper.loop (Looper.java:295)
  at android.app.ActivityThread.main (ActivityThread.java:8695)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:577)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1053)

How to reproduce?

  1. Upload two videos and one audio file
  2. Download one video file
  3. Open three of them back to back

Note

To fix remote service exception notification needed to be added:

image

This notification will appear if user play audio file. Since via #16525 this enhancement we will have more robust solution and good UI/UX lets keep this to fix crashes for now. @tobiasKaminsky

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@alperozturk96
Copy link
Collaborator Author

/backport to stable-3.36

@github-actions
Copy link

Codacy

SpotBugs

CategoryBaseNew
Bad practice4242
Correctness7575
Dodgy code253253
Experimental11
Internationalization77
Malicious code vulnerability22
Multithreaded correctness3434
Performance4343
Security1818
Total475475

@github-actions
Copy link

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

@github-actions
Copy link

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/16603.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant