Bug 475121 - Importing a playlist causes an immediate application crash
Summary: Importing a playlist causes an immediate application crash
Status: REPORTED
Alias: None
Product: audiotube
Classification: Applications
Component: general (other bugs)
Version First Reported In: 23.08.1
Platform: Flatpak Linux
: NOR crash
Target Milestone: ---
Assignee: Jonah Brüchert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-02 00:47 UTC by smstewa4
Modified: 2025-12-22 22:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description smstewa4 2023-10-02 00:47:00 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

When attempting to import a playlist from YouTube/YouTube Music, Audiotube crashes and closes immediately. A split second before the crash, an empty playlist called "Unknown" is created, and then the entire application crashes.

Looking at the output of `flatpak run org.kde.audiotube` shows this at the moment of the crash:

futuresql: Running "select video_id from playlist_entries where playlist_id = ? order by random() limit 4"
Exception: Server returned HTTP 400: Bad Request.
Request contains an invalid argument.
At:
  /app/lib/python3.10/site-packages/ytmusicapi/ytmusic.py(142): _send_request
  /app/lib/python3.10/site-packages/ytmusicapi/mixins/playlists.py(109): get_playlist

STEPS TO REPRODUCE
1. Open Audiotube, either via `flatpak run org.kde.audiotube` or via rofi
2. Attempt to import a playlist with the URL generated by YouTube/YouTube Music
3. App crashes immediately after creating empty "Unknown" playlist

OBSERVED RESULT
Audiotube creates an empty playlist called "Unknown" and then immediately force closes


EXPECTED RESULT
The playlist will be created inside Audiotube from the shareable link generated from YouTube/YouTube Music


SOFTWARE/OS VERSIONS
Arch Linux
Hyprland
Audiotube 23.08.1 flatpak from Flathub
KDE Application Platform branch 5.15-22.08 from Flathub

ADDITIONAL INFORMATION
Comment 1 Felix Meuer 2023-12-26 00:20:36 UTC
(In reply to smstewa4 from comment #0)
> SUMMARY
> ***
> NOTE: If you are reporting a crash, please try to attach a backtrace with
> debug symbols.
> See
> https://community.kde.org/Guidelines_and_HOWTOs/Debugging/
> How_to_create_useful_crash_reports
> ***
> 
> When attempting to import a playlist from YouTube/YouTube Music, Audiotube
> crashes and closes immediately. A split second before the crash, an empty
> playlist called "Unknown" is created, and then the entire application
> crashes.
> 
> Looking at the output of `flatpak run org.kde.audiotube` shows this at the
> moment of the crash:
> 
> futuresql: Running "select video_id from playlist_entries where playlist_id
> = ? order by random() limit 4"
> Exception: Server returned HTTP 400: Bad Request.
> Request contains an invalid argument.
> At:
>   /app/lib/python3.10/site-packages/ytmusicapi/ytmusic.py(142): _send_request
>   /app/lib/python3.10/site-packages/ytmusicapi/mixins/playlists.py(109):
> get_playlist
> 
> STEPS TO REPRODUCE
> 1. Open Audiotube, either via `flatpak run org.kde.audiotube` or via rofi
> 2. Attempt to import a playlist with the URL generated by YouTube/YouTube
> Music
> 3. App crashes immediately after creating empty "Unknown" playlist
> 
> OBSERVED RESULT
> Audiotube creates an empty playlist called "Unknown" and then immediately
> force closes
> 
> 
> EXPECTED RESULT
> The playlist will be created inside Audiotube from the shareable link
> generated from YouTube/YouTube Music
> 
> 
> SOFTWARE/OS VERSIONS
> Arch Linux
> Hyprland
> Audiotube 23.08.1 flatpak from Flathub
> KDE Application Platform branch 5.15-22.08 from Flathub
> 
> ADDITIONAL INFORMATION

Hello,
I had a similar issue when trying to import a playlist.

What I tried:
I tried copying a Playlist link from a Youtube Thumbnail (which will result in a URL of the format(1) "https://www.youtube.com/watch?v=foo&list=bar&index=1").
This causes the application to crash, since it is not the real playlist URL (the playlist URL looks something like "https://www.youtube.com/playlist?list=bar").
When pasting the correct playlist URL it worked out fine.
Maybe you accidentally also pasted the wrong URL?

Pasting the wrong URL should nevertheless not lead to a program crash, so providing faulty URLs should be properly handled.
As a bonus, URLs of format (1) could maybe automatically be parsed correctly as a quality of life feature?

Greets, Felix