TeamNewPipe / NewPipe

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

NewPipe does not crash in Opera Classic, but it does not play video either. #5117

Open Baltazar500 opened 3 years ago

Baltazar500 commented 3 years ago

Checklist

Steps to reproduce the bug

  1. In Opera Classic (12.10.ADR-1502251211) browser open google search, find youtube - video and open the link
  2. In the popup NewPipe window, click "Video player" and select "just once"

Actual behaviour

You get the "Network error" error in a small popup and the video does not play.

Expected behavior

Opening an external video player. On android 4.2.2 and NewPipeLegacy 0.20.2 everything works without errors

Screenshots/Screen recordings

2020 12 07_08 55 59~02 2020 12 07_08 57 27~01

Logs

Device info

triallax commented 3 years ago

Could you provide a link to a video where this issue happens?

Baltazar500 commented 3 years ago

Could you provide a link to a video where this issue happens?

Any. For example this one https://www.youtube.com/watch?v=iKtk_sj3Ul0 or simulating link opening via am (works for Android 4.2.2 and NewPipeLegacy 0.20.2, data getted via logcat) :

am start -a android.intent.action.VIEW -d "vnd.youtube:iKtk_sj3Ul0?vndapp=youtube_mobile&vndclient=mv-google&vndel=home" -n org.schabi.newpipe/.RouterActivity

triallax commented 3 years ago

Assuming you are talking about https://play.google.com/store/apps/details?id=com.opera.browser, I could not reproduce. Could you see if this issue is present with other browsers (e.g. Chrome)? It is highly unlikely that Opera is the issue here.

Baltazar500 commented 3 years ago

com.opera.browser is not com.opera.browser.classic. It is hidden in GooglePlay https://play.google.com/store/apps/details?id=com.opera.browser.classic or you can download it here https://ftp.opera.com/pub/opera/android/classic/Mobile_Classic_12_1_9_Generic_Opera_ARMv5v7.apk

Other browsers don't have this problem.

triallax commented 3 years ago

@Baltazar500 well, I still can't see it in the Play Store, even when I search myself. Perhaps it was removed but because you have the app already installed you can still see it?

Anyway, regarding the issue, @wb9688 was able to diagnose the cause. Apparently, apps usually send an intent with the data that is either the URL of the video or something like vnd.youtube:[ID_OF_VIDEO] if they want the app that opens the video to be YouTube specifically. But for some reason, Opera Classic instead sends an intent with data that looks like vnd.youtube:[ID_OF_VIDEO]?vndapp=youtube_mobile&vndclient=mv-google&vndel=home. @wb9688 suggested that the part after ? should just be ignored.

Thanks for digging into it @wb9688!

Baltazar500 commented 3 years ago

@wb9688 suggested that the part after ? should just be ignored.

When I start NewPipe through am without data after the "? ..." , I see the same "network error" popup after choosing a video player

am start -a android.intent.action.VIEW -d "vnd.youtube:iKtk_sj3Ul0" -n org.schabi.newpipe/.RouterActivity

wb9688 commented 3 years ago

Interesting, as that's something that's supposedly tested: https://github.com/TeamNewPipe/NewPipeExtractor/blob/dev/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamLinkHandlerFactoryTest.java#L81