Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Error: Service.startForeground() is not called #10151

Closed
6 tasks done
avidseeker opened this issue Jun 7, 2023 · 3 comments
Closed
6 tasks done

UI Error: Service.startForeground() is not called #10151

avidseeker opened this issue Jun 7, 2023 · 3 comments

Comments

@avidseeker
Copy link

Checklist

  • I am able to reproduce the bug with the latest version.
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have read the FAQ and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected version

0.25.1

Steps to reproduce the bug

  1. Pause video
  2. Switch to another audio source (E.g: podcast)
  3. Disconnect and reconnect network
  4. Return back to NewPipe

Expected behavior

No crash

Actual behavior

Exception. See attached log.

Screenshots/Screen recordings

No response

Logs

Exception

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

android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{8f41c62 u0 org.schabi.newpipe/.player.PlayerService}
	at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:2009)
	at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:1983)
	at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2245)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7903)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ExecInit.main(ExecInit.java:49)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)
Caused by: android.app.StackTrace: Last startServiceCommon() call for this service was made here
	at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1936)
	at android.app.ContextImpl.startForegroundService(ContextImpl.java:1891)
	at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:822)
	at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:822)
	at androidx.core.content.ContextCompat$Api26Impl$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:0)
	at androidx.core.content.ContextCompat$Api26Impl.startForegroundService(ContextCompat.java:931)
	at androidx.core.content.ContextCompat.startForegroundService(ContextCompat.java:703)
	at androidx.media.session.MediaButtonReceiver.onReceive(MediaButtonReceiver.java:115)
	at android.app.ActivityThread.handleReceiver(ActivityThread.java:4311)
	at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2157)
	... 9 more


Affected Android/Custom ROM version

Android 13

Affected device model

No response

Additional information

No response

@avidseeker avidseeker added bug Issue is related to a bug needs triage Issue is not yet ready for PR authors to take up labels Jun 7, 2023
@SameenAhnaf SameenAhnaf added player Issues related to any player (main, popup and background) and removed needs triage Issue is not yet ready for PR authors to take up labels Jun 8, 2023
@NightScript370
Copy link

Am able to reproduce on my end. Here is the stack trace

Exception

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

android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{a9213b8 u0 org.schabi.newpipe/.player.PlayerService}
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2083)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7750)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:997)

@AudricV
Copy link
Member

AudricV commented Sep 17, 2023

Could you look at #9358 (comment) and test the debug APK linked to see if the issue is fixed? Thanks in advance.

@opusforlife2 opusforlife2 added the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Sep 18, 2023
@github-actions
Copy link

github-actions bot commented Oct 3, 2023

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@github-actions github-actions bot closed this as completed Oct 3, 2023
@opusforlife2 opusforlife2 removed bug Issue is related to a bug player Issues related to any player (main, popup and background) waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. labels Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants