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

[Bug] Music buffering #743

Closed
1 task done
6801318d8d opened this issue Sep 21, 2023 · 21 comments
Closed
1 task done

[Bug] Music buffering #743

6801318d8d opened this issue Sep 21, 2023 · 21 comments
Labels
bug Something isn't working

Comments

@6801318d8d
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Sometimes it gets stuck in the middle of a song. It looks like it repeats 1 millisecond of it or something like that

untitled.mp4

Expected Behavior

Should not get stuck

Steps to reproduce

It happens randomly while listening, more likely near the end of the song

Operating System

Arch Linux

Spotube version

3.1.2

Installation source

Arch User Repository (AUR)

Additional information

No response

@6801318d8d 6801318d8d added the bug Something isn't working label Sep 21, 2023
@6801318d8d
Copy link
Author

last log if it may be useful:

============================== CATCHER LOG ==============================
Crash occurred on [ABRIDGED]

------- DEVICE INFO -------
name: Arch Linux
version: null
id: arch
idLike: null
versionCodename: null
versionId: rolling
prettyName: Arch Linux
buildId: rolling
variant: null
variantId: null
machineId: [ABRIDGED]

------- APP INFO -------
environment: release
version: 3.1.2
appName: spotube
buildNumber: 24
packageName: spotube

---------- ERROR ----------
[SponsorBlock] no skip segments found for j0lSpNtjPM8
https://sponsor.ajay.app/api/skipSegments?videoID=[ABRIDGED]&category=sponsor&category=selfpromo&category=interaction&category=intro&category=outro&category=music_offtopic&actionType=skip

------- STACK TRACE -------
#0      ProxyPlaylistNotifier.getAndCacheSkipSegments (package:spotube/provider/proxy_playlist/proxy_playlist_provider.dart:575)
<asynchronous suspension>
#1      new ProxyPlaylistNotifier.<anonymous closure>.<anonymous closure> (package:spotube/provider/proxy_playlist/proxy_playlist_provider.dart:183)
<asynchronous suspension>

------- CUSTOM INFO -------
======================================================================

@6801318d8d
Copy link
Author

stderr log when this happens.

Looks like a Postgres exception:

❯ spotube

(spotube:71762): Gdk-CRITICAL **: 18:05:51.553: gdk_window_get_state: assertion 'GDK_IS_WINDOW (window)' failed

** (spotube:71762): CRITICAL **: 18:05:51.891: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found

** (spotube:71762): CRITICAL **: 18:05:51.892: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found

** (spotube:71762): CRITICAL **: 18:05:51.893: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found

** (spotube:71762): CRITICAL **: 18:05:51.893: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found

** (spotube:71762): CRITICAL **: 18:05:51.893: Failed to read XDG desktop portal settings: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found
package:media_kit_libs_linux registered.
flutter: media_kit: WARNING: package:media_kit_native_event_loop not found.
method call InitSystemTray
SystemTray::set_system_tray_info title: , icon_path: /usr/share/spotube-bin/data/flutter_assets/assets/spotube-logo.png, toolTip: (null)
method call InitSystemTray
SystemTray::set_system_tray_info title: , icon_path: /usr/share/spotube-bin/data/flutter_assets/assets/spotube-logo.png, toolTip: (null)
method call CreateContextMenu
value_to_menu_item type:label, label:Show/Hide
value_to_menu_item type:label, label:Play/Pause
value_to_menu_item type:label, label:Next
value_to_menu_item type:label, label:Previous
value_to_menu_item type:label, label:Quit
method call CreateContextMenu
value_to_menu_item type:label, label:Show/Hide
value_to_menu_item type:label, label:Play/Pause
value_to_menu_item type:label, label:Next
value_to_menu_item type:label, label:Previous
value_to_menu_item type:label, label:Quit
method call SetContextMenu
method call SetContextMenu
method call DestroySystemTray
method call InitSystemTray
SystemTray::set_system_tray_info title: , icon_path: /usr/share/spotube-bin/data/flutter_assets/assets/spotube-logo.png, toolTip: (null)
method call CreateContextMenu
value_to_menu_item type:label, label:Show/Hide
value_to_menu_item type:label, label:Play/Pause
value_to_menu_item type:label, label:Next
value_to_menu_item type:label, label:Previous
value_to_menu_item type:label, label:Quit
method call SetContextMenu
flutter: PostgrestException(message: duplicate key value violates unique constraint "tracks_youtube_id_spotify_id_idx", code: 23505, details: Conflict, hint: null)
flutter: #0      PostgrestBuilder._parseResponse (package:postgrest/src/postgrest_builder.dart:345)
flutter: #1      PostgrestBuilder._execute (package:postgrest/src/postgrest_builder.dart:202)
flutter: <asynchronous suspension>
flutter: #2      PostgrestBuilder.then (package:postgrest/src/postgrest_builder.dart:422)
flutter: <asynchronous suspension>
method call DestroySystemTray
method call InitSystemTray
SystemTray::set_system_tray_info title: , icon_path: /usr/share/spotube-bin/data/flutter_assets/assets/spotube-logo.png, toolTip: (null)
method call DestroySystemTray
method call InitSystemTray
SystemTray::set_system_tray_info title: , icon_path: /usr/share/spotube-bin/data/flutter_assets/assets/spotube-logo.png, toolTip: (null)
method call CreateContextMenu
value_to_menu_item type:label, label:Show/Hide
value_to_menu_item type:label, label:Play/Pause
value_to_menu_item type:label, label:Next
value_to_menu_item type:label, label:Previous
value_to_menu_item type:label, label:Quit
method call CreateContextMenu
value_to_menu_item type:label, label:Show/Hide
value_to_menu_item type:label, label:Play/Pause
value_to_menu_item type:label, label:Next
value_to_menu_item type:label, label:Previous
value_to_menu_item type:label, label:Quit
method call SetContextMenu
method call SetContextMenu
method call DestroySystemTray
method call InitSystemTray
SystemTray::set_system_tray_info title: , icon_path: /usr/share/spotube-bin/data/flutter_assets/assets/spotube-logo.png, toolTip: (null)
method call CreateContextMenu
value_to_menu_item type:label, label:Show/Hide
value_to_menu_item type:label, label:Play/Pause
value_to_menu_item type:label, label:Next
value_to_menu_item type:label, label:Previous
value_to_menu_item type:label, label:Quit
method call SetContextMenu
flutter: PostgrestException(message: duplicate key value violates unique constraint "tracks_youtube_id_spotify_id_idx", code: 23505, details: Conflict, hint: null)
flutter: #0      PostgrestBuilder._parseResponse (package:postgrest/src/postgrest_builder.dart:345)
flutter: #1      PostgrestBuilder._execute (package:postgrest/src/postgrest_builder.dart:202)
flutter: <asynchronous suspension>
flutter: #2      PostgrestBuilder.then (package:postgrest/src/postgrest_builder.dart:422)
flutter: <asynchronous suspension>
method call DestroySystemTray
method call InitSystemTray
SystemTray::set_system_tray_info title: , icon_path: /usr/share/spotube-bin/data/flutter_assets/assets/spotube-logo.png, toolTip: (null)
method call DestroySystemTray
method call InitSystemTray
SystemTray::set_system_tray_info title: , icon_path: /usr/share/spotube-bin/data/flutter_assets/assets/spotube-logo.png, toolTip: (null)
method call CreateContextMenu
value_to_menu_item type:label, label:Show/Hide
value_to_menu_item type:label, label:Play/Pause
value_to_menu_item type:label, label:Next
value_to_menu_item type:label, label:Previous
value_to_menu_item type:label, label:Quit
method call CreateContextMenu
value_to_menu_item type:label, label:Show/Hide
value_to_menu_item type:label, label:Play/Pause
value_to_menu_item type:label, label:Next
value_to_menu_item type:label, label:Previous
value_to_menu_item type:label, label:Quit
method call SetContextMenu
method call SetContextMenu
method call DestroySystemTray
method call InitSystemTray
SystemTray::set_system_tray_info title: , icon_path: /usr/share/spotube-bin/data/flutter_assets/assets/spotube-logo.png, toolTip: (null)
method call CreateContextMenu
value_to_menu_item type:label, label:Show/Hide
value_to_menu_item type:label, label:Play/Pause
value_to_menu_item type:label, label:Next
value_to_menu_item type:label, label:Previous
value_to_menu_item type:label, label:Quit
method call SetContextMenu
flutter: PostgrestException(message: duplicate key value violates unique constraint "tracks_youtube_id_spotify_id_idx", code: 23505, details: Conflict, hint: null)
flutter: #0      PostgrestBuilder._parseResponse (package:postgrest/src/postgrest_builder.dart:345)
flutter: #1      PostgrestBuilder._execute (package:postgrest/src/postgrest_builder.dart:202)
flutter: <asynchronous suspension>
flutter: #2      PostgrestBuilder.then (package:postgrest/src/postgrest_builder.dart:422)
flutter: <asynchronous suspension>

@6801318d8d
Copy link
Author

This also happens with the AppImage donwloaded directly from GitHub releases.

so it's not a problem unique to the AUR release.

@KRTirtho
Copy link
Owner

KRTirtho commented Sep 21, 2023

There's no buffered audio progress after the stopping point so I assume it's just network issue or taking time to buffer or the stream expired for some reason

@6801318d8d
Copy link
Author

The network works fine, I'm writing here

@KRTirtho
Copy link
Owner

KRTirtho commented Sep 21, 2023

There's no error that means internally everything is working. Are you connected to VPN or proxy?

@6801318d8d
Copy link
Author

It also happens with the AppImage. When I start a song, it plays the first 2/3 seconds, then "skips" to 13 seconds and gets stuck there.

Here is another video:

untitled.mp4

@6801318d8d
Copy link
Author

There's no error that means internally everything is working. Are you connected to VPN or proxy?

No

@6801318d8d
Copy link
Author

There's no error that means internally everything is working. Are you connected to VPN or proxy?

It says "PostgrestException". That looks like an exception :)

@KRTirtho
Copy link
Owner

It says "PostgrestException". That looks like an exception :)
That's an expected error. It happens when there's a matched track is already in DB

@KRTirtho
Copy link
Owner

KRTirtho commented Sep 21, 2023

It also happens with the AppImage. When I start a song, it plays the first 2/3 seconds, then "skips" to 13 seconds and gets stuck there.

Here is another video:

untitled.mp4

I think SponsorBlock skips to that part & the song was buffering in that position. It should start playing once it has enough segments (depending on your network speed & location)

@6801318d8d
Copy link
Author

It also happens with the AppImage. When I start a song, it plays the first 2/3 seconds, then "skips" to 13 seconds and gets stuck there.
Here is another video:
untitled.mp4

I think SponsorBlock skips to that part & the song was buffering in that position. It should start playing once it has enough segments (depending on your network speed & location)

Sorry, it gets stuck for an infinite amount of time.

@KRTirtho
Copy link
Owner

KRTirtho commented Sep 21, 2023

Tell the song names where it happens

Use the share button to get the link

@6801318d8d
Copy link
Author

@KRTirtho
Copy link
Owner

Working great for me tho

@6801318d8d
Copy link
Author

Is there some --verbose flag? Something that could determine what's going on?

@KRTirtho
Copy link
Owner

VERBOSE=true spotube exists but I don't think it'll help much

@KRTirtho KRTirtho changed the title Gets stuck [Bug] Music buffering Sep 26, 2023
@KRTirtho KRTirtho mentioned this issue Sep 26, 2023
1 task
@6801318d8d
Copy link
Author

Hello,
it happens when and only when SponsorBlock moves the track forward.
If SponsorBlock doesn't intervene it doesn't happen.
I changed the search to YouTube Music and fixed the problem.
Also, you can deactivate SponsorBlock from the settings.

@alx-alexpark
Copy link

This issue should not have been closed. I have had the exact same issue that was remediated by disabling sponsorblock. Although a workaround has been found, the bug itself is still prevalent.

@6801318d8d
Copy link
Author

@KRTirtho did the option to disable SponsorBlock just disappeared in the last version? I still have this bug but I can't find this option anymore.

@KRTirtho
Copy link
Owner

It'll only show when audio source is set to YouTube (or Piped with YouTube only)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants