PipePipe icon indicating copy to clipboard operation
PipePipe copied to clipboard

[Bug] App crashes on Android 15 due to ForegroundServiceStartNotAllowedException

Open HairyMilkshakes opened this issue 4 months ago • 0 comments

Checklist

  • [x] I make sure that the issue is NOT a duplicate of pinned issues
  • [x] I make sure I am using the LATEST version - check here
  • [x] I understand that issues with limited impact, such as those occurring on specific devices or under specific network conditions, will not be fixed
  • [x] I have attached the error report in the issue

Describe the bug

Error log:

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: US
  • Content Language: en-US
  • App Language: en_US
  • Service: none
  • Version: 4.7.2
  • OS: Linux Android 15 - 35
Crash log

java.lang.RuntimeException: Unable to create service org.schabi.newpipe.player.PlayerService: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service InfinityLoop1309.NewPipeEnhanced/org.schabi.newpipe.player.PlayerService
	at android.app.ActivityThread.handleCreateService(ActivityThread.java:5373)
	at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2694)
	at android.os.Handler.dispatchMessage(Handler.java:112)
	at android.os.Looper.loopOnce(Looper.java:288)
	at android.os.Looper.loop(Looper.java:393)
	at android.app.ActivityThread.main(ActivityThread.java:9564)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:600)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1010)
Caused by: android.app.ForegroundServiceStartNotAllowedException: Service.startForeground() not allowed due to mAllowStartForeground false: service InfinityLoop1309.NewPipeEnhanced/org.schabi.newpipe.player.PlayerService
	at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:54)
	at android.app.ForegroundServiceStartNotAllowedException$1.createFromParcel(ForegroundServiceStartNotAllowedException.java:50)
	at android.os.Parcel.readParcelableInternal(Parcel.java:5105)
	at android.os.Parcel.readParcelable(Parcel.java:5087)
	at android.os.Parcel.createExceptionOrNull(Parcel.java:3267)
	at android.os.Parcel.createException(Parcel.java:3256)
	at android.os.Parcel.readException(Parcel.java:3239)
	at android.os.Parcel.readException(Parcel.java:3181)
	at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7193)
	at java.lang.reflect.Method.invoke(Native Method)
	at leakcanary.ServiceWatcher$install$4$2.invoke(ServiceWatcher.kt:93)
	at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
	at $Proxy7.setServiceForeground(Unknown Source)
	at android.app.Service.startForeground(Service.java:863)
	at org.schabi.newpipe.player.NotificationUtil$$ExternalSyntheticApiModelOutline0.m(Unknown Source:0)
	at org.schabi.newpipe.player.NotificationUtil.createNotificationAndStartForeground(NotificationUtil.java:201)
	at org.schabi.newpipe.player.PlayerService.createView(PlayerService.java:122)
	at org.schabi.newpipe.player.PlayerService.onCreate(PlayerService.java:113)
	at android.app.ActivityThread.handleCreateService(ActivityThread.java:5343)
	... 9 more


Hope this helps.

Frequency

Always (100% of the time)

Device

No response

Steps to reproduce the bug

No response

Additional context

No response

HairyMilkshakes avatar Sep 10 '25 04:09 HairyMilkshakes