TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
31.83k stars 3.08k forks source link

Crash when going fullscreen (especially Android TVs) #9023

Closed dolorosus closed 1 year ago

dolorosus commented 2 years ago

Checklist

Affected version

v0.24.0

Steps to reproduce the bug

  1. Start any video and try to switch to fullscreen mode results in an error message (see screenshot).
  2. No chance to continue the video, 'cause only an remote control is attached, but got no focus to the play button. Only chance is going back and restart the video which brings us back 1.

Expected behavior

entering fullscreen mode

Actual behavior

see attached [screenshot]

Screenshots/Screen recordings

Screenshot 2022-09-25 210614

Logs

No response

Affected Android/Custom ROM version

AndroidTV 9 and FireTV

Affected device model

No response

Additional information

No response

opusforlife2 commented 2 years ago

Thank you. Being polite never killed anyone.

opusforlife2 commented 2 years ago

The screenshot you've posted is of the toast. Can you check your notifications to fetch the actual error?

dolorosus commented 2 years ago

I know the screenshot give no useful information, but how should I access notifications AndroidTV?

opusforlife2 commented 2 years ago

Okay, it seems like providing app notifications on Android TV is a no-no: https://scribe.rip/android-tv-application-notifications-on-o-c6820ada2086

@Stypox Can it be made so that errors which would generate error notifications on handhelds are made to open the error activity on TV instead?

j-seeley commented 2 years ago

Same issue on Android TV. Videos in non-full screen play fine in v0.24 but when clicking on the full screen icon, the screen is filled with green except the video window stays the same size. At that point, the video freezes, but the audio continues. When I back out of full screen, it then crashes. (previous recent versions of NewPipe worked well with no issues) Screenshot_20220928-091531 Screenshot_20220928-092145 Screenshot_20220928-092156 I don't have time right now to figure out how to submit this report in live text format from Android TV, so I made some screenshots for now.

fliegentoeter commented 2 years ago

Same Issue on a FireTV 4K stick. Videos do not open in Fullscreen and when manually clicking on Full-Screen newpipe crashes...

migbox commented 2 years ago

I have the same issue on Sony Android TV., now I reinstalled the 23.3 version, that works. may I suggest to add a shortcut to switch into/out of fullscreen that can be used from a tv remote?

opusforlife2 commented 2 years ago

may I suggest to add a shortcut to switch into/out of fullscreen that can be used from a tv remote?

Is the full screen button non-selectable or invisible?

dolorosus commented 2 years ago

I have the same issue on Sony Android TV., now I reinstalled the 23.3 version, that works. may I suggest to add a shortcut to switch into/out of fullscreen that can be used from a tv remote?

I'm afraid that won't help. As soon as you switch to full screen mode, you get an error message. After that, no further operation is possible, because none of the controls get the focus anymore.

It would make more sense to eliminate the cause. in versions <23.0 it worked, only since V23.0 there are problems with the fullscreen mode.

fliegentoeter commented 2 years ago

What i've learned on AndroidTV: Do not update newpipe when everything is working, wait until youtube makes changes and you are forced to update :) Same goes for a lot of other apps that are simply not designed for AndroidTV...

opusforlife2 commented 2 years ago

What i've learned on AndroidTV: Do not update newpipe when everything is working, wait until youtube makes changes and you are forced to update :) Same goes for a lot of other apps that are simply not designed for AndroidTV...

What your actual learning should be is that you should help us test upcoming changes on your TV device so that our entire TV userbase doesn't have to suffer when a new version is released.

No one in the dev team has an Android TV. If no user steps up to help test, then issues like this are bound to come up again and again.

migbox commented 2 years ago

I will be glad to do tests on your behalf.

The Sony Android TV has been the best TV I ever bought, I strongly recommend it to people who need to buy a new tv

dolorosus commented 2 years ago

... No one in the dev team has an Android TV. If no user steps up to help test, then issues like this are bound to come up again and again.

Maybe you should go a little bit more into detail how to get a test version?

fliegentoeter commented 2 years ago

I get that. But I have no idea how to test these versions and/or install them with a regular newpipe version installed. It is quite complicated to downgrade by itself and copy/import my old settings with only a remote control by itself. So my solutuion is simply to run the version until something breaks and upgrade then when I have to. There are no notifications, so I do not even get a notice when a new version would be available in Neo-Store (only Fdroid-Store I found usable with a remote control). As mentioned before, the old v23 from fdroid works great.

opusforlife2 commented 2 years ago

I will be glad to do tests on your behalf.

@migbox Shall I add your name to https://github.com/TeamNewPipe/NewPipe/wiki/Testers#android-tv?

Maybe you should go a little bit more into detail how to get a test version?

@dolorosus At the bare minimum, we need our release candidates tested to catch any regressions (bugs that are not present in the current release, but were added by new changes since then). You can grab these from the "RC [version number]" issues that we pin for at least a week before releasing a new version, precisely for this reason.

Apart from that, every PR that could possibly affect TV users should be tested. For the most part, this includes PRs that affect the player code. The PR description has a "testing" section which describes how to obtain the needed debug APKs for this.

But I have no idea how to test these versions and/or install them with a regular newpipe version installed.

@fliegentoeter Stypox did some magic years ago which lets you install several different versions of Newpipe side by side with the current release. The APKs you download from different PRs or from the RC issues have separate package names. This means that if you have 2 APKs from 2 different PRs, they will install side-by-side. But if you download a newer APK from one of the PRs, one of the 2 APKs will get updated. This means you can continue to test newer changes in PRs as they get updated, and also that you can test multiple PRs in parallel.

You should never need to touch your official release version for any reason. One of our developers used to keep a record 60+ Newpipe builds on their device at a time.

And there is no need at all to import/export anything. You should definitely keep a database export of your current release build as a safety net in any case. Just make sure to never mess with database backups with development builds, because any changes there could potentially corrupt your "true" database of the release version.

migbox commented 2 years ago

I use to download new versions to my gdrive and install it from there using the app Solid explorer . However it should be interesting a way to save easily bookmarks and settings when I will need to downgrade.. Does anyone of you have simple instructions?

dolorosus commented 2 years ago

No one in the dev team has an Android TV....

No problem, just add a FireTV Stick to your Amazon wishlist and send me a link to your Amazon wishlist.

ingmarcosp commented 2 years ago

I'm using a Sony Android tv 9 and have the same problem with the lastest f-droid's version. full screen in 4k and 1080p doesn't work. An extra is kind of difficult to move arroud the app with the remote control.

opusforlife2 commented 2 years ago

No problem, just add a FireTV Stick to your Amazon wishlist and send me a link to your Amazon wishlist.

You just quoted the same comment again and had a different 'advice' to give. The dev team isn't full of paupers. If you're not interested in testing, then have patience and wait for a fix. Don't complain if you're not ready to be a part of the solution.

opusforlife2 commented 2 years ago

@migbox Read my big comment again closely. You will never need to downgrade at all. Keep your release version installed. Keep a fresh database export ready in case of emergencies. Then install the APK from the RC issue for version 0.24.0 as a test. You will see that it installs as a completely separate app with its own database and settings. It won't interact with your main app at all.

migbox commented 2 years ago

Sure, you can add me. Of course I need to know where I can get the APK to test and how do I have to report the tests results

opusforlife2 commented 2 years ago

@migbox Thanks! We'll ping you and help you figure out how to provide relevant info when needed.

IMMalebolgia commented 2 years ago

@opusforlife2

I am a heavy Firestick user and would be happy to do some testing as well to help the effort. I have noticed some substantial differences between the way the 4k and 4k Max behave so I can test on both.

opusforlife2 commented 2 years ago

@IMMalebolgia Thanks! To be sure, are you referring to this specific issue or do you wish to be a TV tester for us in general?

IMMalebolgia commented 2 years ago

Happy to be a tester in general.

I have been an EE for 26+ years now specializing in post silicon debug so plenty of experience tracking down wierd SW/HW bugs so figured I might be of service to an app I rely heavily on. I previously assumed you had plenty of testers or else I would have volunteered sooner ๐Ÿ™‚

ghost commented 2 years ago

Hi, below is the error I get in logcat when trying to play video fullscreen on Android TV. Visible symptoms are the same as the other guys are getting. Android version 11, vendor Philips, uname -a says Linux localhost 4.19.182-ab2437 #1 SMP PREEMPT Fri Jul 15 10:35:27 CST 2022 armv8l.

10-07 22:11:36.164 12647 12647 E Player  : ExoPlayer - onPlayerError() called with:
10-07 22:11:36.164 12647 12647 E Player  : com.google.android.exoplayer2.ExoPlaybackException: Unexpected runtime error
10-07 22:11:36.164 12647 12647 E Player  :  at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:616)
10-07 22:11:36.164 12647 12647 E Player  :  at android.os.Handler.dispatchMessage(Handler.java:102)
10-07 22:11:36.164 12647 12647 E Player  :  at android.os.Looper.loop(Looper.java:223)
10-07 22:11:36.164 12647 12647 E Player  :  at android.os.HandlerThread.run(HandlerThread.java:67)
10-07 22:11:36.164 12647 12647 E Player  : Caused by: java.lang.IllegalStateException
10-07 22:11:36.164 12647 12647 E Player  :  at android.media.MediaCodec.native_setSurface(Native Method)
10-07 22:11:36.164 12647 12647 E Player  :  at android.media.MediaCodec.setOutputSurface(MediaCodec.java:2146)
10-07 22:11:36.164 12647 12647 E Player  :  at com.google.android.exoplayer2.mediacodec.SynchronousMediaCodecAdapter.setOutputSurface(SynchronousMediaCodecAdapter.java:189)
10-07 22:11:36.164 12647 12647 E Player  :  at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.setOutputSurfaceV23(MediaCodecVideoRenderer.java:1451)
10-07 22:11:36.164 12647 12647 E Player  :  at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.setOutput(MediaCodecVideoRenderer.java:646)
10-07 22:11:36.164 12647 12647 E Player  :  at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.handleMessage(MediaCodecVideoRenderer.java:584)
10-07 22:11:36.164 12647 12647 E Player  :  at com.google.android.exoplayer2.ExoPlayerImplInternal.deliverMessage(ExoPlayerImplInternal.java:1546)
10-07 22:11:36.164 12647 12647 E Player  :  at com.google.android.exoplayer2.ExoPlayerImplInternal.sendMessageToTarget(ExoPlayerImplInternal.java:1510)
10-07 22:11:36.164 12647 12647 E Player  :  at com.google.android.exoplayer2.ExoPlayerImplInternal.sendMessageInternal(ExoPlayerImplInternal.java:1485)
10-07 22:11:36.164 12647 12647 E Player  :  at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:521)
10-07 22:11:36.164 12647 12647 E Player  :  ... 3 more
10-07 22:11:36.166   397   397 E Layer   : [SurfaceView - org.schabi.newpipe/org.schabi.newpipe.MainActivity#0] No local sync point found
NeloKa61 commented 2 years ago

I am Android TV Box user( a low end device) so maybe i can give some feedback on testing .My device is B860H V5.0(Google certified Android Tv OS) I already tested 0.24.0 but different from the others. When i click fullscreen just upper half get the video player and the lower half get Title. when Fullscreen icon clicked again it's not responding on meda player.

migbox commented 2 years ago

Yes, the button is visible, but to act on it, you can only use the arrows on the remote walking around the screen trying to have the focus on full screen icon. Unfortunately when you try to go there using the down arrows, the focus goes on the time slider; the full screen is on his right and if you try to move on it, what you obtain is moving the time slider on the right. To reach the full screen icon, you have to move first to the top screen, then on the right until you reach the next title column, 3 times down to align with the full screen icon, then once on the left and you will be on the icon and can press enter

Il giorno ven 30 set 2022 alle ore 18:38 opusforlife2 < @.***> ha scritto:

may I suggest to add a shortcut to switch into/out of fullscreen that can be used from a tv remote?

Is the full screen button non-selectable or invisible?

โ€” Reply to this email directly, view it on GitHub https://github.com/TeamNewPipe/NewPipe/issues/9023#issuecomment-1263789217, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5BHJ2L7VBXERYGS2M2D7LWA4JR5ANCNFSM6AAAAAAQVGWPY4 . You are receiving this because you commented.Message ID: @.***>

j-seeley commented 2 years ago

I uninstalled v24 but before doing so, I saved/copied four files to a save place: 1) newpipe.db 2) newpipe.db-shm 3) newpipe.db-wal and 4) org.schabi.newpipe_preferences.xml (not sure if all four of these are needed but it was just hit or miss)

After uninstalling v24, I then installed v23.3 and ran the app to get the db and xml files to populate so I know where to then replace those with the four above. I got all of my settings back as well as search and view history. Good enough for me.

I have a simple and old Android TV Box (rooted) running Android 6. Because it's rooted, I had access to those files.

peat80 commented 2 years ago

Almost nobody seems to know that if you press down on your remote another time when the progressbar is focused it will then select the fullscreen button. That should be noted somewhere. ๐Ÿ™„

opusforlife2 commented 2 years ago

There shouldn't even be a full screen button on Android TVs.

peat80 commented 2 years ago

A dedicated tv ui for newpipe would be awesome. ๐Ÿ˜€

opusforlife2 commented 2 years ago

Unfortunately, we don't have anyone who can do that. There was a contributor years ago who brought some major improvements to the TV UI. That was it.

NeloKa61 commented 2 years ago

is Newpipe-Nightly release is the one that supposed to be testing on Android TV? The repo link https://github.com/TeamNewPipe/NewPipe-nightly

There shouldn't even be a full screen button on Android TVs.

I disagree, fullscreen botton make Low end Tv Box playing on newpipe a bit easier and less laggy.

peat80 commented 2 years ago

Nightlys can be installed on both android and android tv and are really useful to test the latest features.

For easy up- and downgrade on tv i use a favorite bookmark for newpipe nightlys (and others) in the downloader app (available in the play store). Works fine with just the remote. ๐Ÿ˜€

On low end boxes you probably should decrease default resolution in newpipe's settings to improve performance.

Maybe the fullscreen button should be moved to somewhere else to get it focused easier with remotes. Even better would be if we could have a remote button configured that switches to fullscreen and back. ๐Ÿค”๐Ÿ˜๐Ÿ‘

opusforlife2 commented 2 years ago

I disagree, fullscreen botton make Low end Tv Box playing on newpipe a bit easier and less laggy.

What part lags? The animation to enter full screen?

dolorosus commented 2 years ago

Just for the records:
nightly6 changed nothing. Fullscreen mode is still completely broken on Android TV.

Speciesx commented 2 years ago

A dedicated tv ui for newpipe would be awesome. ๐Ÿ˜€

NewPipe UI is horrible for TV use. SmartTubeNext has nice TV UI.

elparra72 commented 2 years ago

Checklist

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

Affected version

v0.24.0

Steps to reproduce the bug

  1. Start any video and try to switch to fullscreen mode results in an error message (see screenshot).
  2. No chance to continue the video, 'cause only an remote control is attached, but got no focus to the play button. Only chance is going back and restart the video which brings us back 1.

Expected behavior

entering fullscreen mode

Actual behavior

see attached [screenshot]

Screenshots/Screen recordings

Screenshot 2022-09-25 210614

Logs

No response

Affected Android/Custom ROM version

AndroidTV 9 and FireTV

Affected device model

No response

Additional information

No response Error hapens too on Xiaomi P1, Android 10, Newpipe version tested: 24.0, 24.0.1 and 24.0.2. I've back to 23.4

elparra72 commented 2 years ago

I've found a workaround working in my Xiaomi P1 based on AndroidTV 10. If you set 3GP video format by default, start watching a video with this shit of resolution and then select WebM 1080 or any other resolution, video doesn't stop.

Stypox commented 2 years ago

Does this APK solve the issue? app-debug.zip

elparra72 commented 2 years ago

Hi,

Same issue and same workaround. Video is reproduced in full screen mode only when video format is set a 3GP. Once video starts in full screen you can change to WenM 1080p without issues.

If you need to perform any other test or if you need some log contact me.

Thanks a lot.

Miguel รngel


From: Stypox @.> Sent: Saturday, October 29, 2022 5:38:16 PM To: TeamNewPipe/NewPipe @.> Cc: elparra72 @.>; Comment @.> Subject: Re: [TeamNewPipe/NewPipe] No fullscreen possible with Android TV (Issue #9023)

Does this APK solve the issue? app-debug.ziphttps://github.com/TeamNewPipe/NewPipe/files/9894007/app-debug.zip

โ€” Reply to this email directly, view it on GitHubhttps://github.com/TeamNewPipe/NewPipe/issues/9023#issuecomment-1295875081, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A34HU7MW5QFHV5M673UONJTWFVAGRANCNFSM6AAAAAAQVGWPY4. You are receiving this because you commented.Message ID: @.***>

elparra72 commented 2 years ago

Hi, I've tested also in a tvbox h96 max 4K ultra HD, based on Android 11 (not Android TV) and its work. I've detected issues in subscriptions. In some of them content is refreshed and in others don't.

As in the case with my Xiaomi P1, if you need some test in this kind of device based on RK chip, don't hesitate to contact me.

Thanks !!!


From: El Parra @.> Sent: Sunday, October 30, 2022 2:42:17 PM To: TeamNewPipe/NewPipe @.>; TeamNewPipe/NewPipe @.> Cc: Comment @.> Subject: Re: [TeamNewPipe/NewPipe] No fullscreen possible with Android TV (Issue #9023)

Hi,

Same issue and same workaround. Video is reproduced in full screen mode only when video format is set a 3GP. Once video starts in full screen you can change to WenM 1080p without issues.

If you need to perform any other test or if you need some log contact me.

Thanks a lot.

Miguel รngel


From: Stypox @.> Sent: Saturday, October 29, 2022 5:38:16 PM To: TeamNewPipe/NewPipe @.> Cc: elparra72 @.>; Comment @.> Subject: Re: [TeamNewPipe/NewPipe] No fullscreen possible with Android TV (Issue #9023)

Does this APK solve the issue? app-debug.ziphttps://github.com/TeamNewPipe/NewPipe/files/9894007/app-debug.zip

โ€” Reply to this email directly, view it on GitHubhttps://github.com/TeamNewPipe/NewPipe/issues/9023#issuecomment-1295875081, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A34HU7MW5QFHV5M673UONJTWFVAGRANCNFSM6AAAAAAQVGWPY4. You are receiving this because you commented.Message ID: @.***>

Stypox commented 2 years ago

I am talking in particular about https://github.com/TeamNewPipe/NewPipe/issues/9023#issuecomment-1260918129 @j-seeley

j-seeley commented 2 years ago

I am talking in particular about #9023 (comment) @j-seeley

Not sure if you're asking me to answer something or help you with something? (Haven't been here in a while..) Try the APK you posted? Thx

opusforlife2 commented 2 years ago

Try the APK you posted?

Yes. That's what's being said.

j-seeley commented 2 years ago

Try the APK you posted?

Yes. That's what's being said.

OK. I'll give the APK a shot.

j-seeley commented 2 years ago

Just tried the Debug APK. Same issue, (as in my first post here with the screenshots with the green screen) except the app doesn't crash when I navigate back out from the failed full screen. Tried to lower the res to 480 and tried to change the video and audio formats... no dice. But keep in mind, my android TV box is old and running android 6. But v23 still works fine.

Stypox commented 2 years ago

What about this one @j-seeley? app-debug.zip

j-seeley commented 2 years ago

What about this one @j-seeley? app-debug.zip

Same full screen failure, unfortunately When I navigate back out of full screen, it crashes.