owncloud / android

:phone: The ownCloud Android App
GNU General Public License v2.0
3.82k stars 3.05k forks source link

[BUG] Audio player does not work #4474

Closed jesmrec closed 1 week ago

jesmrec commented 1 week ago

Steps to reproduce

Play any audio file

Actual behaviour

Unexpected error trying to play...

i caught the following stacktrace:

E: IllegalStateException user1@<server>/<filename> (Ask Gemini)
                 android.app.MissingForegroundServiceTypeException: Starting FGS without a type  callerApp=ProcessRecord{1ebcada 29147:com.owncloud.android.debug/u0a202} targetSDK=34
                    at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:53)
                    at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:49)
                    at android.os.Parcel.readParcelableInternal(Parcel.java:4870)
                    at android.os.Parcel.readParcelable(Parcel.java:4852)
                    at android.os.Parcel.createExceptionOrNull(Parcel.java:3052)
                    at android.os.Parcel.createException(Parcel.java:3041)
                    at android.os.Parcel.readException(Parcel.java:3024)
                    at android.os.Parcel.readException(Parcel.java:2966)
                    at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7280)
                    at android.app.Service.startForeground(Service.java:775)
                    at com.owncloud.android.media.MediaService.setUpAsForeground(MediaService.java:626)
                    at com.owncloud.android.media.MediaService.playMedia(MediaService.java:484)
                    at com.owncloud.android.media.MediaService.processPlayFileRequest(MediaService.java:299)
                    at com.owncloud.android.media.MediaService.onStartCommand(MediaService.java:267)
                    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5053)
                    at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
                    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2435)
                    at android.os.Handler.dispatchMessage(Handler.java:106)
                    at android.os.Looper.loopOnce(Looper.java:224)
                    at android.os.Looper.loop(Looper.java:318)
                    at android.app.ActivityThread.main(ActivityThread.java:8763)
                    at java.lang.reflect.Method.invoke(Native Method)
                    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:561)
                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)

Expected behaviour

File played

Reproduced in the current stable 4.3.1 with Android 14

jesmrec commented 1 week ago

Checking with different Android versions:

9 -> not reproducible 10 -> not reproducible 11 -> not reproducible 12 -> not reproducible 13 -> not reproducible 14 -> reproducible