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

Better error reporting on app crashes #1243

Open
AyoungDukie opened this issue Aug 15, 2023 · 12 comments
Open

Better error reporting on app crashes #1243

AyoungDukie opened this issue Aug 15, 2023 · 12 comments

Comments

@AyoungDukie
Copy link

AyoungDukie commented Aug 15, 2023

So today I started having an issue that no results will play. Typically, long videos and certain results may fail to play (akin to #1208), but now no results are loading at all. There is a momentary flash and then the results list reloads.

Issue / Suggestion

This is likely an upstream issue overall, but wanted to bring attention to something that was making debugging quite difficult. After using a screen recorder at 30fps, I was finally able to record the result failing to play, and the result being then hidden and dropping to the list.

In my case there is an apparent ffmpeg error due to an HTTP error 403 Forbidden (this seems similar to older errors that came about due to API key setups before, but also possibly upstream).
image

My main concern is that there currently does not seem to be documentation on how to collect debug logs for use. I have tried using the --debug flag to no avail, but did see an old post on Linux noting --logging , but I am not sure how that would work on windows and using pipx instead of pip...

Can someone provide guidance on the best way to collect logs on this playback issue? And what might be the preferred way to submit that info in a PR for the documentation?

Your Environment

For yewtube:

PS >yt.exe --version
yewtube version    : 2.10.4
yt_dlp version     : 2023.03.04
Python version     : 3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)]
Processor          : Intel64 Family 6 Model 158 Stepping 13, GenuineIntel
Machine type       : AMD64
Architecture       : 64bit, WindowsPE
Platform           : Windows-10-10.0.19044-SP0
sys.stdout.enc     : utf-8
default enc        : utf-8
Config dir         : C:\Users\jflynn\AppData\Roaming\mps-youtube
dbus               : None
glib               : False
env:TERM           : xterm-256color

And for mpv:

PS > mpv.com --version
mpv 0.36.0 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
 built on Tue Aug 01 10:56:31 2023
libplacebo version: v6.292.0-78-gabf34ba-dirty
FFmpeg version: N-111661-g567e78b28
FFmpeg library versions:
   libavutil       58.14.100
   libavcodec      60.22.100
   libavformat     60.10.100
   libswscale      7.3.100
   libavfilter     9.10.100
   libswresample   4.11.100
@polochon777
Copy link

Almost same issue here:

Error fetching data. Possible network issue.
ERROR: unable to download video data: HTTP Error 403: Forbidden

I can fetch metadata, comments, but can't watch neither download :(
My config:

❯ yt --version
yewtube version    : 2.10.4
yt_dlp version     : 2023.03.04
Python version     : 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
Processor          : x86_64
Machine type       : x86_64
Architecture       : 64bit, ELF
Platform           : Linux-5.14.0-1057-oem-x86_64-with-glibc2.35
sys.stdout.enc     : utf-8
default enc        : utf-8
Config dir         : /home/pol/.config/mps-youtube
dbus               : 1.2.18
glib               : True
env:TERM           : xterm-256color
env:SHELL          : /usr/bin/zsh
env:LANG           : fr_FR.UTF-8

@denozavr
Copy link

denozavr commented Aug 18, 2023

got the same error as @polochon777 this week (on the last week on 2023-08-07 everything worked fine) with yewtube version : 2.9.4. Tried to delete yewtube and clear cache completely with pip, updated yewtube and yt_dlp to the latest versions but still the same error when try to download or just listen to any song.

I still can download audio from Youtube using yt-dlp with next command yt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 VIDEO_URL. Much less convenient than with yewtube (need manually get video URL from browser) but at least alternative working solution for now.

Text of the error:

Error fetching data. Possible network issue.
[download] Got error: HTTP Error 403: Forbidden

My config:

>yt.exe --version
yewtube version    : 2.10.4
yt_dlp version     : 2023.03.04
Python version     : 3.9.0 (tags/v3.9.0:9cf6752, Oct  5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)]
Processor          : Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
Machine type       : AMD64
Architecture       : 64bit, WindowsPE
Platform           : Windows-10-10.0.19041-SP0
sys.stdout.enc     : utf-8
default enc        : utf-8
Config dir         : C:\Users\user\AppData\Roaming\mps-youtube
dbus               : None
glib               : False

MPV data:

>mpv.com --version
mpv 0.35.1 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
 built on Sun Jan 29 05:42:05 2023
FFmpeg library versions:
   libavutil       57.44.100
   libavcodec      59.58.100
   libavformat     59.36.100
   libswscale      6.8.112
   libavfilter     8.55.100
   libswresample   4.9.100
FFmpeg version: N-109691-gb95b2c849

@polochon777
Copy link

I suspect yewtube is blocked by youtube...
By the way, another alternative than yt-dlp if you don't want to download is to use directly mpv. But you have to get the URL before like yt-dlp.

@AyoungDukie
Copy link
Author

AyoungDukie commented Aug 18, 2023

Interesting, I wonder if it could be worth re-introducing the API tokens from prior MPS-Youtube to allow folks a workaround? I'd think the issue is that with YouTube locking down video access (e.g. with ad-blocking), the best path would be api and api-key access? One could even prompt folks to add their key after installation.

That is unless another method is found to fall back on, of course.

Edit: Invidious is also having this issue, and pinned some info/discussions about workarounds they are evaluating:
iv-org/invidious#4045

@galgot
Copy link

galgot commented Aug 23, 2023

It's strange cause I have YT still working on an old MacBook running Mac OSX 10.6.
Here is my config :

yewtube version    : 2.10.4
yt_dlp version     : 2023.07.06
Python version     : 3.11.4 (main, Jun 10 2023, 10:02:28) [Clang 11.1.0 ]
Processor          : i386
Machine type       : i386
Architecture       : 64bit,
Platform           : macOS-10.6.8-i386-64bit
sys.stdout.enc     : utf-8
default enc        : utf-8
Config dir         : /Users/galgot/.config/mps-youtube
dbus               : None
glib               : False
env:TERM           : xterm
env:SHELL          : /bin/bash

Setting :

Key                 Value
  order             : relevance
  user_order        :
  max_res           : 2160p
  player            : mpv
  playerargs        :
  encoder           : 0 [None]
  notifier          :
  checkupdate       : True
  show_player_keys  : True
  fullscreen        : False
  show_status       : True
  always_repeat     : False
  columns           :
  ddir              : /Users/galgot/Downloads/mps
  overwrite         : True
  show_video        : False
  search_music      : True
  window_pos        :
  window_size       :
  download_command  :
  lookup_metadata   : True
  lastfm_username   :
  lastfm_password   :
  lastfm_api_key    :
  lastfm_api_secret :
  audio_format      : auto
  video_format      : auto
  pages             : 3
  autoplay          : False
  set_title         : True
  mpris             : True
  show_qrcode       : False
  history           : True
  input_history     : True
  vlc_dummy_interface : False
  show_subtitles    : True

mpv :

mpv 0.34.1 Copyright © 2000-2021 mpv/MPlayer/mplayer2 projects
 built on Tue Jul 19 23:59:56 CEST 2022
FFmpeg library versions:
   libavutil       56.70.100
   libavcodec      58.134.100
   libavformat     58.76.100
   libswscale      5.9.100
   libavfilter     7.110.100
   libswresample   3.9.100
FFmpeg version: 4.4.4

Just tried setting show_video true , and works as well.
While I have a MacBook Pro 17' 2011 running Mac OS X 10.11.6, and yt there is broken.

@iamtalhaasghar
Copy link
Contributor

I guess its time to move backend from youtube-search-python to pytube.

@sona1111
Copy link

Hello, I've been having the same issue. Does anyone know which upstream project I should follow to be in tune with possible updates that will resolve the issue? I'm not familiar with the whole toolchain and how things are fitting together.

@galgot
Copy link

galgot commented Aug 28, 2023

Ok, for me the problem seem was from yt-dlp being version 2023.03.04. And an upgrade with pipx wouldn't update it.
I did a pipx reinstall-all, and it did a complete reinstall, updating yt_dlp to version 2023.07.06.
Now yt works fine on my MacBook Pro 17" 2011 too.

I had yewtube installed on a iMac G5 running Mac OSX 10.4.11, using pip3. There too yt_dlp was v.2023.03.04, and it wouldn't work.
So updated it with sudo pip3 install --upgrade yt_dlp, and now works fine there too with V.2023.07.06.

iamtalhaasghar added a commit that referenced this issue Aug 29, 2023
@iamtalhaasghar
Copy link
Contributor

iamtalhaasghar commented Aug 29, 2023

Guys update to latest yewtube / yt-dlp version.

Edit:
yewtube>=2.10.5
yt-dlp>=2023.7.6

iamtalhaasghar added a commit that referenced this issue Aug 29, 2023
@AyoungDukie
Copy link
Author

AyoungDukie commented Aug 29, 2023

Can confirm this fixed my issue with playback.

However the core question I had with making this github issue was about requesting a method to launch a debugging session or pull debugging information from yewtube to help with diagnosing playback issues (and confirm upstream issues as appropriate).

Is there a preferred method for pulling these logs/diagnostics? In this case, my method required screen-recording and going frame-by-frame to capture the yt-dlp failure message, so I'm just wondering what might be more helpful in the future...

@iamtalhaasghar iamtalhaasghar changed the title Attempting to play a result fails psuedo-silently Better error reporting or app crashes Aug 30, 2023
@iamtalhaasghar iamtalhaasghar changed the title Better error reporting or app crashes Better error reporting on app crashes Aug 30, 2023
@vicmortelmans
Copy link

Hi,

how can I install the latest version 2.10.5?

Installing with pip/pipx gives me 2.10.4.

When I give the command to install the latest version pip install git+https://github.com/iamtalhaasghar/yewtube.git, I get 2.9.2 !?? Is that normal? Or do I have an issue in my setup?

best regards,
Vic

@sona1111
Copy link

I was also trying to figure this out, I tried the repository version as well as the .tar.gz under "releases" ; all seem to show 2.10.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants