lamarios / clipious

Invidious client for android
GNU Affero General Public License v3.0
803 stars 27 forks source link

Playback Error Unhandled exception #542

Closed Lcstyle closed 2 months ago

Lcstyle commented 3 months ago

Describe the bug

So there are a few issues here:

  1. Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.

    2024-04-28 08:17:47.439 31269-31269 WindowOnBackDispatcher  com.github.lamarios.clipious         W  OnBackInvokedCallback is not enabled for the application.
    Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
  2. The first exception shows a "403"

    Caused by: t0.t: Response code: 403
  3. second exception is a URI regex match error. I can open them up as separate tickets but for now just documenting it here.

    Caused by: n0.w0: Couldn't match URI="(.+?)" in #EXT-X-MAP:URI="http://X.X.X:3000/videoplayback?id=59ac64187b01f8d5&itag=609&source=youtube&expire=1714327400&ei=CDsuZuf_AoqlkucPr_aKqAU&ip=X.X.X.X&requiressl=yes&ratebypass=yes&pfa=1&wft=1&sgovp=clen%3D106012264%3Bdur%3D595.928%3Bgir%3Dyes%3Bitag%3D247%3Blmt%3D1714288989048813&rqh=1&hls_chunk_host=rr1---sn-q4flrnlz.googlevideo.com&xpc=EgVo2aDSNQ%3D%3D&mh=o9&mm=31%2C26&mn=sn-q4flrnlz%2Csn-a5mekn6z&ms=au%2Conr&mv=m&mvi=1&pl=22&pcm2=no&gcr=us&initcwndbps=2685000&vprv=1&playlist_type=DVR&txp=5535434&mt=1714305418&fvip=1&keepalive=yes&cmo=sensitive_content%3Dyes&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cratebypass%2Cpfa%2Cwft%2Csgovp%2Crqh%2Cxpc%2Cpcm2%2Cgcr%2Cvprv%2Cplaylist_type&sig=AJfQdSswRQIhAK_S4whtj5Y3TvDlbgnfJF5D5fsPzfKt0OkwJdnnnuQ2AiAxeTIekj26im8xBVOfHDPLRlx7FcHsq0G4dJlCgnEWug%3D%3D&lsparams=hls_chunk_host%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHWaYeowRQIgemgxsIjeIYj7Bhe4bXLafRLj7qXuZtpw5LpkWG8HkQACIQCJ7BII68-Xj8_b4PhRyK7TlkDl59v-bkB1GetY__TQ4w%3D%3D&playlist=index.m3u8&govp=slices%3D0-585324&gosq=0&local=true{contentIsMalformed=true, dataType=4}

To Reproduce Steps to reproduce the behavior:

  1. setup http local invidious instance
  2. confirm local invidious instance working on HTTP
  3. in clipious setup server, http://localip.local.domain:httpPort
  4. Click on any video
  5. See error

Expected behavior testing Using "Proxy video" setting, I did get the URI parsing exception.

Screenshots exclamation mark in video player window Smartphone (please complete the following information):

Additional context First Exception shows 403 (without proxy video setting):

2024-04-28 08:17:47.439 31269-31269 WindowOnBackDispatcher  com.github.lamarios.clipious         W  OnBackInvokedCallback is not enabled for the application.
Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
2024-04-28 08:17:47.440 31269-31389 flutter                 com.github.lamarios.clipious         I  [INFO] [Service] calling http://xxxxxxxxxx:3000/api/v1/videos/n1Tbjky_FUc
2024-04-28 08:17:48.936 31269-31389 flutter                 com.github.lamarios.clipious         I  [INFO] [Service] Response from GET http://xxxxxxxxxx:3000/api/v1/videos/n1Tbjky_FUc, status: 200
2024-04-28 08:17:48.958 31269-31389 flutter                 com.github.lamarios.clipious         I  [INFO] [PlayerControlControllers] Hiding controls false
2024-04-28 08:17:49.055 31269-31389 flutter                 com.github.lamarios.clipious         I  [INFO] [VideoPlayer] Playing url (dash false,  hasHls ? true)  http://X.X.X.X:3000/api/manifest/hls_variant/expire/1714328269/ei/bT4uZpTJHMiokucP352wuA8/ip/X.X.X.X/id/9f54db8e4cbf1547/source/youtube/requiressl/yes/xpc/EgVo2aDSNQ%3D%3D/playback_host/rr1---sn-q4fl6n6s.googlevideo.com/mh/8O/mm/31%2C29/mn/sn-q4fl6n6s%2Csn-q4flrnl6/ms/au%2Crdu/mv/m/mvi/1/pl/22/tx/51094388/txs/51094388%2C51094389/hfr/1/demuxed/1/tts_caps/1/maudio/1/initcwndbps/1757500/vprv/1/go/1/rqh/5/mt/1714306384/fvip/3/nvgoi/1/short_key/1/ncsapi/1/keepalive/yes/dover/13/itag/0/playlist_type/DVR/sparams/expire%2Cei%2Cip%2Cid%2Csource%2Crequiressl%2Cxpc%2Ctx%2Ctxs%2Chfr%2Cdemuxed%2Ctts_caps%2Cmaudio%2Cvprv%2Cgo%2Crqh%2Citag%2Cplaylist_type/sig/AJfQdSswRQIgEV6jPK7WDU7CjpdGngDIuTjVmPojqANd_LXu4FNJK90CIQDUDPwtpBgk1hCvOpr1j3FsHoUhZhxTfmW9QXMlsgC_Xg%3D%3D/lsparams/playback_host%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps/lsig/AHWaYeowRgIhAOws0TXQ1lOoStrcJloct5MtNkm-KwOhaoKIQjozK5kYAiEA9RWIY8u4g8AxT4J5KU25KXgGBf0EQ6lPhQDY7ror
2024-04-28 08:17:49.067 31269-11685 TrafficStats            com.github.lamarios.clipious         D  tagSocket(150) with statsTag=0xffffffff, statsUid=-1
<redacted numerous tagSocketLog Entries here>
2024-04-28 08:17:54.820 31269-10227 ExoPlayerImplInternal   com.github.lamarios.clipious         E  Playback error
w0.m: Source error
at w0.j1.I(Unknown Source:16)
at w0.j1.handleMessage(Unknown Source:335)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.os.HandlerThread.run(HandlerThread.java:68)
Caused by: t0.t: Response code: 403
at t0.m.e(Unknown Source:257)
at t0.a0.e(Unknown Source:12)
at c1.i.u(Unknown Source:0)
at c1.i.k(Unknown Source:18)
at c1.i.r(Unknown Source:7)
at c1.i.a(Unknown Source:37)
at o1.n$d.run(Unknown Source:51)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)

2024-04-28 08:17:54.823 31269-31389 flutter                 com.github.lamarios.clipious         I  [INFO] [PlayerControlControllers] Hiding controls false
2024-04-28 08:17:54.823 31269-31389 flutter                 com.github.lamarios.clipious         E  [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(VideoError, Video player had error w0.m: Source error, , null)

second exception full stack trace (using proxy video):

2024-04-28 08:03:20.522  1959-2095  MediaResumeListener     com.android.systemui                 E  Cannot resume with ComponentInfo{com.github.lamarios.clipious/com.ryanheise.audioservice.AudioService}
2024-04-28 08:03:20.887 31269-10227 ExoPlayerImplInternal   com.github.lamarios.clipious         
E  Playback error
w0.m: Source error
at w0.j1.I(Unknown Source:16)
at w0.j1.handleMessage(Unknown Source:327)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.os.HandlerThread.run(HandlerThread.java:68)
Caused by: n0.w0: Couldn't match URI="(.+?)" in #EXT-X-MAP:URI="http://X.X.X:3000/videoplayback?id=59ac64187b01f8d5&itag=609&source=youtube&expire=1714327400&ei=CDsuZuf_AoqlkucPr_aKqAU&ip=X.X.X.X&requiressl=yes&ratebypass=yes&pfa=1&wft=1&sgovp=clen%3D106012264%3Bdur%3D595.928%3Bgir%3Dyes%3Bitag%3D247%3Blmt%3D1714288989048813&rqh=1&hls_chunk_host=rr1---sn-q4flrnlz.googlevideo.com&xpc=EgVo2aDSNQ%3D%3D&mh=o9&mm=31%2C26&mn=sn-q4flrnlz%2Csn-a5mekn6z&ms=au%2Conr&mv=m&mvi=1&pl=22&pcm2=no&gcr=us&initcwndbps=2685000&vprv=1&playlist_type=DVR&txp=5535434&mt=1714305418&fvip=1&keepalive=yes&cmo=sensitive_content%3Dyes&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cratebypass%2Cpfa%2Cwft%2Csgovp%2Crqh%2Cxpc%2Cpcm2%2Cgcr%2Cvprv%2Cplaylist_type&sig=AJfQdSswRQIhAK_S4whtj5Y3TvDlbgnfJF5D5fsPzfKt0OkwJdnnnuQ2AiAxeTIekj26im8xBVOfHDPLRlx7FcHsq0G4dJlCgnEWug%3D%3D&lsparams=hls_chunk_host%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHWaYeowRQIgemgxsIjeIYj7Bhe4bXLafRLj7qXuZtpw5LpkWG8HkQACIQCJ7BII68-Xj8_b4PhRyK7TlkDl59v-bkB1GetY__TQ4w%3D%3D&playlist=index.m3u8&govp=slices%3D0-585324&gosq=0&local=true{contentIsMalformed=true, dataType=4}
at d1.i.z(Unknown Source:37)
at d1.i.o(Unknown Source:290)
at d1.i.i(Unknown Source:152)
at d1.i.a(Unknown Source:0)
at o1.p.a(Unknown Source:31)
at o1.n$d.run(Unknown Source:51)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
lamarios commented 3 months ago

Yeah it is as known issue proxying won't work with mixed protocols like: http (invidious) + https (google) or self signed certificates on for invidious. You'll find a number of similar issues in here.

Lcstyle commented 2 months ago

Issues 1 and 2 are still relevant because they were produced without the proxy videos settings. Thank you for all your hard work.

Lcstyle commented 2 months ago

issues resolved when i switched to production invidious instance on the local private instance.