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

Psst closes when attempting to refetch expired access token #564

Open
CodeF53 opened this issue Dec 6, 2024 · 7 comments
Open

Psst closes when attempting to refetch expired access token #564

CodeF53 opened this issue Dec 6, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@CodeF53
Copy link

CodeF53 commented Dec 6, 2024

Describe the bug

$ RUST_BACKTRACE=1 psst-gui
...
[2024-12-06T03:42:28Z INFO  psst_core::session::access_token] access token expired, requesting
thread 'main' panicked at /home/cassie/.cargo/registry/src/index.crates.io-6f17d22bba15001f/souvlaki-0.7.3/src/platform/mpris/zbus.rs:139:29:
called `Result::unwrap()` on an `Err` value: SendError { .. }
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at library/core/src/panicking.rs:221:5:
panic in a function that cannot unwind
thread caused non-unwinding panic. aborting.
fish: Job 1, 'RUST_BACKTRACE=1 psst-gui' terminated by signal SIGABRT (Abort)

Environment

  • desktop enviroment: KDE Plasma (wayland)
  • kernel: 6.12.1-zen1-1-zen (64-bit)
  • Version: r547.0cd9904-1 (via AUR)

Additional context
Add any other context about the problem here.

@CodeF53 CodeF53 added the bug Something isn't working label Dec 6, 2024
@jacksongoode
Copy link
Collaborator

Does this happen reliably? It seems to be triggered by zbus?

@CodeF53
Copy link
Author

CodeF53 commented Dec 15, 2024 via email

@SO9010
Copy link
Contributor

SO9010 commented Dec 20, 2024

The AUR is terribly out of date. Last update in 2022.

@jacksongoode
Copy link
Collaborator

Can we update that? I feel like the longer term solution is the #170 #141 #530 Flatpak support which was ALMOST finished 😂 but needs a little more of a nudge.

@SO9010
Copy link
Contributor

SO9010 commented Dec 20, 2024

I can probably update it! I also do want to look more into the flatpak support.

@ernstki
Copy link

ernstki commented Dec 21, 2024

Hi all,

I have 69314f9 built in November that exhibited this same problem. The circumstances were a loss of network connectivity when my laptop went into power save mode, with a track playing, and the crash was happening only after initial startup, upon trying to resume a playlist.

Backtrace after running RUST_BACKTRACE=full psst-gui
$ RUST_BACKTRACE=full psst-gui
[2024-12-21T09:18:38Z INFO  psst_gui::data::config] loading config: "/home/me/.config/Psst/config.json"
[2024-12-21T09:18:40Z INFO  psst_core::oauth] starting OAuth listener on 127.0.0.1:8888
[2024-12-21T09:18:40Z INFO  psst_core::oauth] listener bound successfully
[2024-12-21T09:18:49Z INFO  psst_core::connection] requesting AP list from http://apresolve.spotify.com
[2024-12-21T09:18:49Z INFO  psst_core::connection] received 6 APs from server
[2024-12-21T09:18:49Z INFO  psst_core::connection] successfully resolved 6 access points
[2024-12-21T09:18:49Z INFO  psst_core::connection] attempting to connect using 6 access points
[2024-12-21T09:18:49Z INFO  psst_core::connection] Trying AP 1 of 6: ap-guc3.spotify.com:4070
[2024-12-21T09:18:50Z INFO  psst_core::connection] successfully connected to AP: ap-guc3.spotify.com:4070
[2024-12-21T09:18:50Z ERROR psst_gui::webapi::client] failed to read local tracks: No such file or directory (os error 2)
[2024-12-21T09:18:50Z INFO  psst_gui::data::config] saved config: "/home/me/.config/Psst/config.json"
[2024-12-21T09:18:50Z INFO  psst_core::audio::output::cpal] using audio device: "default"
[2024-12-21T09:18:50Z INFO  psst_core::cache] using cache: "/home/me/.cache/Psst"
[2024-12-21T09:18:50Z INFO  psst_core::audio::output::cpal] opening output stream: StreamConfig { channels: 2, sample_rate: SampleRate(44100), buffer_size: Default }
[2024-12-21T09:18:50Z INFO  psst_core::session::access_token] access token expired, requesting
[2024-12-21T09:18:50Z INFO  psst_core::connection] requesting AP list from http://apresolve.spotify.com
thread '<unnamed>' panicked at /cargo/registry/src/index.crates.io-6f17d22bba15001f/souvlaki-0.7.3/src/platform/mpris/zbus.rs:100:22:
called `Result::unwrap()` on an `Err` value: NameTaken
stack backtrace:
   0:     0x55b4be791b89 - <unknown>
   1:     0x55b4be34e19b - <unknown>
   2:     0x55b4be75be52 - <unknown>
   3:     0x55b4be792d88 - <unknown>
   4:     0x55b4be793c32 - <unknown>
   5:     0x55b4be793725 - <unknown>
   6:     0x55b4be793689 - <unknown>
   7:     0x55b4be793674 - <unknown>
   8:     0x55b4bdbb1062 - <unknown>
   9:     0x55b4bdbb1485 - <unknown>
  10:     0x55b4bdd313b9 - <unknown>
  11:     0x55b4bdd55a40 - <unknown>
  12:     0x55b4be79510b - <unknown>
  13:     0x7f43c6f09609 - start_thread
  14:     0x7f43c6cd7353 - clone
  15:                0x0 - <unknown>
[2024-12-21T09:18:50Z INFO  psst_core::connection] received 6 APs from server
[2024-12-21T09:18:50Z INFO  psst_core::connection] successfully resolved 6 access points
[2024-12-21T09:18:50Z INFO  psst_core::connection] attempting to connect using 6 access points
[2024-12-21T09:18:50Z INFO  psst_core::connection] Trying AP 1 of 6: ap-guc3.spotify.com:4070
[2024-12-21T09:18:50Z INFO  psst_core::connection] successfully connected to AP: ap-guc3.spotify.com:4070
[2024-12-21T09:19:13Z INFO  symphonia_format_ogg::demuxer] starting new physical stream
[2024-12-21T09:19:13Z INFO  symphonia_format_ogg::demuxer] selected vorbis mapper for stream with serial=0x0
[2024-12-21T09:19:13Z INFO  psst_core::player] starting playback
thread 'main' panicked at /cargo/registry/src/index.crates.io-6f17d22bba15001f/souvlaki-0.7.3/src/platform/mpris/zbus.rs:139:29:
called `Result::unwrap()` on an `Err` value: SendError { .. }
stack backtrace:
   0:     0x55b4be791b89 - <unknown>
   1:     0x55b4be34e19b - <unknown>
   2:     0x55b4be75be52 - <unknown>
   3:     0x55b4be792d88 - <unknown>
   4:     0x55b4be793c32 - <unknown>
   5:     0x55b4be793725 - <unknown>
   6:     0x55b4be793689 - <unknown>
   7:     0x55b4be793674 - <unknown>
   8:     0x55b4bdbb1062 - <unknown>
   9:     0x55b4bdbb1485 - <unknown>
  10:     0x55b4be70f073 - <unknown>
  11:     0x55b4bdc67491 - <unknown>
  12:     0x55b4bdef397e - <unknown>
  13:     0x55b4be0dff65 - <unknown>
  14:     0x55b4bdef397e - <unknown>
  15:     0x55b4bdef397e - <unknown>
  16:     0x55b4bdc758b0 - <unknown>
  17:     0x55b4be192f64 - <unknown>
  18:     0x55b4bdef397e - <unknown>
  19:     0x55b4be016759 - <unknown>
  20:     0x55b4bddfe827 - <unknown>
  21:     0x55b4bddf9c24 - <unknown>
  22:     0x55b4be1102b1 - <unknown>
  23:     0x55b4be38a509 - <unknown>
  24:     0x55b4be38a2ea - <unknown>
  25:     0x7f43c7b4e04e - g_main_context_dispatch
  26:     0x7f43c7b4e400 - <unknown>
  27:     0x7f43c7b4e4a3 - g_main_context_iteration
  28:     0x7f43c7021fe5 - g_application_run
  29:     0x55b4be2dde22 - <unknown>
  30:     0x55b4bdd33c33 - <unknown>
  31:     0x55b4be305534 - <unknown>
  32:     0x7f43c6bdc083 - __libc_start_main
  33:     0x55b4bdbd274e - <unknown>
  34:                0x0 - <unknown>
thread 'main' panicked at core/src/panicking.rs:221:5:
panic in a function that cannot unwind
stack backtrace:
   0:     0x55b4be791b89 - <unknown>
   1:     0x55b4be34e19b - <unknown>
   2:     0x55b4be75be52 - <unknown>
   3:     0x55b4be792d88 - <unknown>
   4:     0x55b4be793c32 - <unknown>
   5:     0x55b4be7936f2 - <unknown>
   6:     0x55b4be793689 - <unknown>
   7:     0x55b4be793674 - <unknown>
   8:     0x55b4bdbb15b4 - <unknown>
   9:     0x55b4bdbb1615 - <unknown>
  10:     0x55b4bdbb15d0 - <unknown>
  11:     0x55b4be38a304 - <unknown>
  12:     0x7f43c7b4e04e - g_main_context_dispatch
  13:     0x7f43c7b4e400 - <unknown>
  14:     0x7f43c7b4e4a3 - g_main_context_iteration
  15:     0x7f43c7021fe5 - g_application_run
  16:     0x55b4be2dde22 - <unknown>
  17:     0x55b4bdd33c33 - <unknown>
  18:     0x55b4be305534 - <unknown>
  19:     0x7f43c6bdc083 - __libc_start_main
  20:     0x55b4bdbd274e - <unknown>
  21:                0x0 - <unknown>
thread caused non-unwinding panic. aborting.
Aborted

After some tinkering, it appears as if just logging out and back in through the app's settings solves this (for now).

I'm not inclined to do anything about it at the moment, in terms of pulling a new version and rebuilding, because otherwise psst is working fine. However, if there's anything else I can do to help isolate which versions of which crates, or reporting a problem to some upstream crate, please let me know.

I do not know a thing about Rust myself, beyond cargo build, so be gentle.

@ernstki
Copy link

ernstki commented Dec 21, 2024

The AUR is terribly out of date. Last update in 2022.

I don't know that much about Arch and the AUR, but I don't think the psst PKGBUILD script builds a specific version, just pulls from GitHub and reports its version as whatever HEAD was at build time.

If 0cd9904 from the OP's report is the Git commit ID, then that's from September 2024, a mere 20 commits behind the version I built. Not sure AUR is strictly to blame here is all I'm saying.

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

4 participants