[GH-ISSUE #38] StreamError - not working #945

Closed
opened 2026-03-14 12:35:23 +03:00 by kerem · 12 comments
Owner

Originally created by @elkrien on GitHub (May 24, 2022).
Original GitHub issue: https://github.com/aome510/spotify-player/issues/38

I have installed player from AUR (btw it is still 0.5.1 version) and it is not working. This is what i see (look at the playlist - was not able to copy this error):
image

Originally created by @elkrien on GitHub (May 24, 2022). Original GitHub issue: https://github.com/aome510/spotify-player/issues/38 I have installed player from AUR (btw it is still 0.5.1 version) and it is not working. This is what i see (look at the playlist - was not able to copy this error): ![image](https://user-images.githubusercontent.com/78103450/170040627-b3e1c8db-f633-46fc-9ce8-d0d6f178609a.png)
kerem closed this issue 2026-03-14 12:35:29 +03:00
Author
Owner

@aome510 commented on GitHub (May 24, 2022):

Hi @elkrien, thanks for submitting this issue. I'm the maintainer for that AUR package but I'm no longer have access to Arch machine.

Can you try to install the latest version using other method, e.g cargo install spotify_player, to see if this error still persists?

<!-- gh-comment-id:1135989840 --> @aome510 commented on GitHub (May 24, 2022): Hi @elkrien, thanks for submitting this issue. I'm the maintainer for that AUR package but I'm no longer have access to Arch machine. Can you try to install the latest version using other method, e.g `cargo install spotify_player`, to see if this error still persists?
Author
Owner

@elkrien commented on GitHub (May 24, 2022):

After installing last release by cargo error still persists.

<!-- gh-comment-id:1136099606 --> @elkrien commented on GitHub (May 24, 2022): After installing last release by cargo error still persists.
Author
Owner

@aome510 commented on GitHub (May 24, 2022):

Can you send me a log file and a backtrace file as described in the README?

<!-- gh-comment-id:1136105664 --> @aome510 commented on GitHub (May 24, 2022): Can you send me a log file and a backtrace file as described in [the README](https://github.com/aome510/spotify-player#logging)?
Author
Owner

@elkrien commented on GitHub (May 24, 2022):

Please see log file. I didn't find any backtrace file in cache directory.
spotify-player.log

<!-- gh-comment-id:1136142131 --> @elkrien commented on GitHub (May 24, 2022): Please see log file. I didn't find any backtrace file in cache directory. [spotify-player.log](https://github.com/aome510/spotify-player/files/8764571/spotify-player.log)
Author
Owner

@aome510 commented on GitHub (May 24, 2022):

Can you confirm that the application is run with latest version, e.g what is the result of spotify_player --version?

The latest version 0.7.0 should produce a timestamped log file (spotify-player-22-05-24-12:34.log). Also judging from the contain of the log you send, it seems that the application still runs with an old version.

<!-- gh-comment-id:1136149158 --> @aome510 commented on GitHub (May 24, 2022): Can you confirm that the application is run with latest version, e.g what is the result of `spotify_player --version`? The latest version `0.7.0` should produce a timestamped log file (`spotify-player-22-05-24-12:34.log`). Also judging from the contain of the log you send, it seems that the application still runs with an old version.
Author
Owner

@elkrien commented on GitHub (May 24, 2022):

Yes, You are right. I was launching version installed by AUR. I uninstalled AUR version and the one built by cargo works - no more errors. Now I need to figure why I don't hear any sound :)

<!-- gh-comment-id:1136261380 --> @elkrien commented on GitHub (May 24, 2022): Yes, You are right. I was launching version installed by AUR. I uninstalled AUR version and the one built by cargo works - no more errors. Now I need to figure why I don't hear any sound :)
Author
Owner

@aome510 commented on GitHub (May 24, 2022):

Now I need to figure why I don't hear any sound :)

Sorry to hear that. Can you include log/backtrace files so I can look into the issue?

<!-- gh-comment-id:1136269589 --> @aome510 commented on GitHub (May 24, 2022): > Now I need to figure why I don't hear any sound :) Sorry to hear that. Can you include log/backtrace files so I can look into the issue?
Author
Owner

@elkrien commented on GitHub (May 24, 2022):

spotify-player-22-05-24-21:04.log
Backtrace is empty

<!-- gh-comment-id:1136328806 --> @elkrien commented on GitHub (May 24, 2022): [spotify-player-22-05-24-21:04.log](https://github.com/aome510/spotify-player/files/8765581/spotify-player-22-05-24-21.04.log) Backtrace is empty
Author
Owner

@aome510 commented on GitHub (May 24, 2022):

Backtrace is empty

I just realized that I incorrectly configured the backtrace, so it doesn't print all the panic messages.

Sorry for the back-and-forth, but can you try reproducing this error with the latest build from master by running

git clone https://github.com/aome510/spotify-player.git && cd spotify-player
cargo run

Then send me the backtrace file. Given the original error StreamError, the backtrace file should not be empty.

Thanks.

<!-- gh-comment-id:1136375067 --> @aome510 commented on GitHub (May 24, 2022): > Backtrace is empty I just realized that I incorrectly configured the backtrace, so it doesn't print all the panic messages. Sorry for the back-and-forth, but can you try reproducing this error with the latest build from `master` by running ```shell git clone https://github.com/aome510/spotify-player.git && cd spotify-player cargo run ``` Then send me the backtrace file. Given the original error `StreamError`, the backtrace file should not be empty. Thanks.
Author
Owner

@elkrien commented on GitHub (May 24, 2022):

Here You are:

Got a panic: PanicInfo {
    payload: Any { .. },
    message: Some(
        called `Result::unwrap()` on an `Err` value: StreamError(BuildStreamError(BackendSpecific { err: BackendSpecificError { description: "ALSA function 'snd_pcm_sw_params' failed with error 'EINVAL: Invalid argument'" } })),
    ),
    location: Location {
        file: "/home/mm/.cargo/registry/src/github.com-1ecc6299db9ec823/librespot-playback-0.3.1/src/audio_backend/rodio.rs",
        line: 181,
        col: 53,
    },
    can_unwind: true,
}

Stack backtrace:
   0: spotify_player::init_logging::{{closure}}
             at src/main.rs:115:25
   1: std::panicking::rust_panic_with_hook
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/panicking.rs:702:17
   2: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/panicking.rs:588:13
   3: std::sys_common::backtrace::__rust_end_short_backtrace
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/sys_common/backtrace.rs:138:18
   4: rust_begin_unwind
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/panicking.rs:584:5
   5: core::panicking::panic_fmt
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/core/src/panicking.rs:142:14
   6: core::result::unwrap_failed
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/core/src/result.rs:1785:5
   7: core::result::Result<T,E>::unwrap
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/core/src/result.rs:1078:23
   8: librespot_playback::audio_backend::rodio::open
             at /home/mm/.cargo/registry/src/github.com-1ecc6299db9ec823/librespot-playback-0.3.1/src/audio_backend/rodio.rs:181:26
   9: librespot_playback::audio_backend::rodio::mk_rodio
             at /home/mm/.cargo/registry/src/github.com-1ecc6299db9ec823/librespot-playback-0.3.1/src/audio_backend/rodio.rs:22:14
  10: spotify_player::spirc::new_connection::{{closure}}
             at src/spirc.rs:61:17
  11: librespot_playback::player::Player::new::{{closure}}
             at /home/mm/.cargo/registry/src/github.com-1ecc6299db9ec823/librespot-playback-0.3.1/src/player.rs:325:23
  12: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/sys_common/backtrace.rs:122:18
  13: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/thread/mod.rs:501:17
  14: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/core/src/panic/unwind_safe.rs:271:9
  15: std::panicking::try::do_call
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/panicking.rs:492:40
  16: __rust_try
  17: std::panicking::try
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/panicking.rs:456:19
  18: std::panic::catch_unwind
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/panic.rs:137:14
  19: std::thread::Builder::spawn_unchecked_::{{closure}}
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/thread/mod.rs:500:30
  20: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/core/src/ops/function.rs:248:5
  21: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/alloc/src/boxed.rs:1872:9
      <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/alloc/src/boxed.rs:1872:9
      std::sys::unix::thread::Thread::new::thread_start
             at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/sys/unix/thread.rs:108:17
  22: <unknown>
  23: clone

<!-- gh-comment-id:1136424491 --> @elkrien commented on GitHub (May 24, 2022): Here You are: ``` Got a panic: PanicInfo { payload: Any { .. }, message: Some( called `Result::unwrap()` on an `Err` value: StreamError(BuildStreamError(BackendSpecific { err: BackendSpecificError { description: "ALSA function 'snd_pcm_sw_params' failed with error 'EINVAL: Invalid argument'" } })), ), location: Location { file: "/home/mm/.cargo/registry/src/github.com-1ecc6299db9ec823/librespot-playback-0.3.1/src/audio_backend/rodio.rs", line: 181, col: 53, }, can_unwind: true, } Stack backtrace: 0: spotify_player::init_logging::{{closure}} at src/main.rs:115:25 1: std::panicking::rust_panic_with_hook at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/panicking.rs:702:17 2: std::panicking::begin_panic_handler::{{closure}} at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/panicking.rs:588:13 3: std::sys_common::backtrace::__rust_end_short_backtrace at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/sys_common/backtrace.rs:138:18 4: rust_begin_unwind at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/panicking.rs:584:5 5: core::panicking::panic_fmt at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/core/src/panicking.rs:142:14 6: core::result::unwrap_failed at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/core/src/result.rs:1785:5 7: core::result::Result<T,E>::unwrap at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/core/src/result.rs:1078:23 8: librespot_playback::audio_backend::rodio::open at /home/mm/.cargo/registry/src/github.com-1ecc6299db9ec823/librespot-playback-0.3.1/src/audio_backend/rodio.rs:181:26 9: librespot_playback::audio_backend::rodio::mk_rodio at /home/mm/.cargo/registry/src/github.com-1ecc6299db9ec823/librespot-playback-0.3.1/src/audio_backend/rodio.rs:22:14 10: spotify_player::spirc::new_connection::{{closure}} at src/spirc.rs:61:17 11: librespot_playback::player::Player::new::{{closure}} at /home/mm/.cargo/registry/src/github.com-1ecc6299db9ec823/librespot-playback-0.3.1/src/player.rs:325:23 12: std::sys_common::backtrace::__rust_begin_short_backtrace at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/sys_common/backtrace.rs:122:18 13: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}} at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/thread/mod.rs:501:17 14: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/core/src/panic/unwind_safe.rs:271:9 15: std::panicking::try::do_call at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/panicking.rs:492:40 16: __rust_try 17: std::panicking::try at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/panicking.rs:456:19 18: std::panic::catch_unwind at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/panic.rs:137:14 19: std::thread::Builder::spawn_unchecked_::{{closure}} at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/thread/mod.rs:500:30 20: core::ops::function::FnOnce::call_once{{vtable.shim}} at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/core/src/ops/function.rs:248:5 21: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/alloc/src/boxed.rs:1872:9 <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/alloc/src/boxed.rs:1872:9 std::sys::unix::thread::Thread::new::thread_start at /rustc/ee160f2f5e73b6f5954bc33f059c316d9e8582c4/library/std/src/sys/unix/thread.rs:108:17 22: <unknown> 23: clone ```
Author
Owner

@aome510 commented on GitHub (May 24, 2022):

@elkrien thanks. My best guess is that the rodio library is unable to detect your audio backend. This is not because of spotify-player, so I’m afraid I don’t really know how to fix this 😢 .

Maybe you can try install/reinstall pulseaudio-alsa package as mentioned in https://github.com/bevyengine/bevy/discussions/2991. Or you can try build the application using different audio backends.

<!-- gh-comment-id:1136512745 --> @aome510 commented on GitHub (May 24, 2022): @elkrien thanks. My best guess is that the `rodio` library is unable to detect your audio backend. This is not because of `spotify-player`, so I’m afraid I don’t really know how to fix this 😢 . Maybe you can try install/reinstall `pulseaudio-alsa` package as mentioned in https://github.com/bevyengine/bevy/discussions/2991. Or you can try build the application [using different audio backends](https://github.com/aome510/spotify-player#audio-backend).
Author
Owner

@elkrien commented on GitHub (May 25, 2022):

Installing pulseaudio-alsa solved the problem. All works great now. Nice project. The only thing I miss now is to be able to control player by playerctl (my bar works with playerctl that controls ncspot that I use). If this feature will be added to playerctl than this player will be my daily driver :)

<!-- gh-comment-id:1136911302 --> @elkrien commented on GitHub (May 25, 2022): Installing pulseaudio-alsa solved the problem. All works great now. Nice project. The only thing I miss now is to be able to control player by playerctl (my bar works with playerctl that controls ncspot that I use). If this feature will be added to playerctl than this player will be my daily driver :)
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/spotify-player#945
No description provided.