[GH-ISSUE #92] Fail to run some particular titles: Unknown server response #71

Closed
opened 2026-02-28 14:30:24 +03:00 by kerem · 4 comments
Owner

Originally created by @Soulou on GitHub (Aug 17, 2021).
Original GitHub issue: https://github.com/jpochyla/psst/issues/92

OS: Linux
Version: Current master at the time of the issue creation
Build: Release version

Which song:

Slowly - Supermodified - Amon Tobin

Logs from the terminal:

[2021-08-17T09:07:16Z ERROR psst_core::audio_key] audio key error
[2021-08-17T09:07:16Z ERROR psst_core::audio_player] failed to preload audio file, error while opening: Unknown server response
[2021-08-17T09:07:16Z ERROR psst_core::audio_key] audio key error
[2021-08-17T09:07:16Z ERROR psst_core::audio_player] failed to preload audio file, error while opening: Unknown server response
[2021-08-17T09:07:16Z ERROR psst_core::audio_key] audio key error
[2021-08-17T09:07:16Z ERROR psst_core::audio_player] failed to preload audio file, error while opening: Unknown server response
[2021-08-17T09:07:16Z ERROR psst_core::audio_key] audio key error
[2021-08-17T09:07:16Z ERROR psst_core::audio_player] failed to preload audio file, error while opening: Unknown server response
[...]

psst-gui just skips the song and start playing the next.

If you need more information, please just ask.

Originally created by @Soulou on GitHub (Aug 17, 2021). Original GitHub issue: https://github.com/jpochyla/psst/issues/92 OS: Linux Version: Current master at the time of the issue creation Build: Release version Which song: Slowly - Supermodified - Amon Tobin Logs from the terminal: ``` [2021-08-17T09:07:16Z ERROR psst_core::audio_key] audio key error [2021-08-17T09:07:16Z ERROR psst_core::audio_player] failed to preload audio file, error while opening: Unknown server response [2021-08-17T09:07:16Z ERROR psst_core::audio_key] audio key error [2021-08-17T09:07:16Z ERROR psst_core::audio_player] failed to preload audio file, error while opening: Unknown server response [2021-08-17T09:07:16Z ERROR psst_core::audio_key] audio key error [2021-08-17T09:07:16Z ERROR psst_core::audio_player] failed to preload audio file, error while opening: Unknown server response [2021-08-17T09:07:16Z ERROR psst_core::audio_key] audio key error [2021-08-17T09:07:16Z ERROR psst_core::audio_player] failed to preload audio file, error while opening: Unknown server response [...] ``` psst-gui just skips the song and start playing the next. If you need more information, please just ask.
kerem 2026-02-28 14:30:24 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@jpochyla commented on GitHub (Aug 18, 2021):

I've seen this as well, it's possible we're doing the track re-linking wrong.

<!-- gh-comment-id:900888775 --> @jpochyla commented on GitHub (Aug 18, 2021): I've seen this as well, it's possible we're doing the track re-linking wrong.
Author
Owner

@felixkiessling commented on GitHub (Aug 24, 2021):

Same here. Got the message "error while loading: Permission denied (os error 13)" on macos.

<!-- gh-comment-id:904663791 --> @felixkiessling commented on GitHub (Aug 24, 2021): Same here. Got the message "error while loading: Permission denied (os error 13)" on macos.
Author
Owner

@kunzjacq commented on GitHub (Aug 29, 2021):

Indeed, having the same problem, I found that it is related to an incorrect logic in

 fn is_restricted_in_region(restriction: &Restriction, country: &str)

in metadata.rs.
In its current form, this function returns false (i.e. the track is authorized to play) when there is a nonempty list of allowed countries and the user country code is not in that list, which is wrong.

If this function is replaced by:

fn is_restricted_in_region(restriction: &Restriction, country: &str) -> bool {
    if let Some(allowed) = &restriction.countries_allowed {
        return !(is_country_in_list(allowed.as_bytes(), country.as_bytes()));
    }
    if let Some(forbidden) = &restriction.countries_forbidden {
        return is_country_in_list(forbidden.as_bytes(), country.as_bytes()); 
    }
    false // should never be reached
}

the errors dissapear.

<!-- gh-comment-id:907788925 --> @kunzjacq commented on GitHub (Aug 29, 2021): Indeed, having the same problem, I found that it is related to an incorrect logic in fn is_restricted_in_region(restriction: &Restriction, country: &str) in `metadata.rs`. In its current form, this function returns false (i.e. the track is authorized to play) when there is a nonempty list of allowed countries and the user country code is not in that list, which is wrong. If this function is replaced by: fn is_restricted_in_region(restriction: &Restriction, country: &str) -> bool { if let Some(allowed) = &restriction.countries_allowed { return !(is_country_in_list(allowed.as_bytes(), country.as_bytes())); } if let Some(forbidden) = &restriction.countries_forbidden { return is_country_in_list(forbidden.as_bytes(), country.as_bytes()); } false // should never be reached } the errors dissapear.
Author
Owner

@jpochyla commented on GitHub (Aug 29, 2021):

Thanks a lot @kunzjacq! ❤️ Included in 105f6cc

<!-- gh-comment-id:907800771 --> @jpochyla commented on GitHub (Aug 29, 2021): Thanks a lot @kunzjacq! ❤️ Included in 105f6cc
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/psst#71
No description provided.