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

Pressing 'pause' button on headphones while no video is currently playing will crash NewPipe #9095

Open
6 tasks done
spitemim opened this issue Oct 9, 2022 · 5 comments
Open
6 tasks done
Labels
bug Issue is related to a bug player notification Anything to do with the MediaStyle notification

Comments

@spitemim
Copy link

spitemim commented Oct 9, 2022

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.24.0

Steps to reproduce the bug

  1. Connect any kind of headphones, that have a physical 'pause' button, to the device
  2. Ensure that no video is currently playing
  3. Press the 'pause' button on the connected headphones
  4. Wait for a few seconds

Expected behavior

The pause button on your headphones should not have any effect on the app when there is no video playing.

Actual behavior

After a few seconds, the app crashes. This happens regardless of whether the user interacts with the application before or after the button is pressed. The application functions normally in the period of time between pressing the button and the app crashing. I've tested this with bluetooth and wired headphones. I've also tested this when opening the app after a force stop, or after watching a video and then closing it. The bug persists in all cases.

Screenshots/Screen recordings

newpipe-bug-report-3000.mp4

Logs

Exception

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

android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{69897de u0 org.schabi.newpipe/.player.PlayerService}
	at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:1966)
	at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:1937)
	at android.app.ActivityThread.access$2700(ActivityThread.java:257)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2191)
	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:7876)
	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:48)
	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:1898)
	at android.app.ContextImpl.startForegroundService(ContextImpl.java:1853)
	at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:781)
	at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:781)
	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:4376)
	at android.app.ActivityThread.access$1600(ActivityThread.java:257)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2103)
	... 9 more


Affected Android/Custom ROM version

Android 12 / GrapheneOS (build number SP2A.220505.008.2022090700)

Affected device model

Pixel 3a XL

Additional information

No response

@spitemim spitemim added bug Issue is related to a bug needs triage Issue is not yet ready for PR authors to take up labels Oct 9, 2022
@DominikNovosel
Copy link

I'm getting a similar error even without headphones, and Android repeatedly reports the app has crashed despite the fact that it continues running normally. See if you can reproduce #9070 or any of the related duplicates.

@opusforlife2
Copy link
Collaborator

It used to just cause a blank Newpipe notification to appear because it is the last used media app. Since 0.24.0 it causes a crash instead.

@DominikNovosel
Copy link

Any idea when will this be fixed? Or, I guess more importantly, how?

@opusforlife2
Copy link
Collaborator

Nope, I'm not a dev.

@opusforlife2 opusforlife2 added player notification Anything to do with the MediaStyle notification and removed needs triage Issue is not yet ready for PR authors to take up labels Nov 10, 2022
@SentientCoffee

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug player notification Anything to do with the MediaStyle notification
Projects
None yet
Development

No branches or pull requests

4 participants