Artix Linux Forum

General Category => Forum => Topic started by: exoticmeiz on 02 February 2021, 09:43:03

Title: spotifyd panics `Couldn't initialize logger`
Post by: exoticmeiz on 02 February 2021, 09:43:03
I have recently tried setting up spotifyd for spotify-tui. When I go to activate the daemon via "spotifyd" cmd, it errors with this:

thread 'main' panicked at 'Couldn't initialize logger: Error(Initialization, State { next_error: Some(Error(Io(Os { code: 2, kind: NotFound, message: "No such file or directory" }), State { next_error: None, backtrace: None })), backtrace: None })', src/main.rs:39:51
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I have not been able to find a solution.

NOTE: This is my first week using linux, etc. I have tried doing my research before making this post.

Any help is much appreciated.
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: linuxer on 02 February 2021, 13:03:55
spotifyd and services have already been added to Universe repo, please use those by adding to your /etc/pacman.conf the following lines:

Code: [Select]
[universe]

https://universe.artixlinux.org/$arch
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: exoticmeiz on 03 February 2021, 07:15:30
How does this help?

I simply just downloaded it from another repo?

I still get this error.

thread 'main' panicked at 'Couldn't initialize logger: Error(Initialization, State { next_error: Some(Error(Io(Os { code: 2, kind: NotFound, message: "No such file or directory" }), State { next_error: None, backtrace: None })), backtrace: None })', src/main.rs:38:51
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: alium on 03 February 2021, 10:47:13
Use in bash "export RUST_BACKTRACE=1"
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: linuxer on 03 February 2021, 11:32:29
How does this help?

I simply just downloaded it from another repo?

I still get this error.

thread 'main' panicked at 'Couldn't initialize logger: Error(Initialization, State { next_error: Some(Error(Io(Os { code: 2, kind: NotFound, message: "No such file or directory" }), State { next_error: None, backtrace: None })), backtrace: None })', src/main.rs:38:51
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Installation from another repo has references and services for systemd, not for our init systems

So, the case differs for daemon activation per init (below is Runit).

(https://imgur.com/dGOZWQo.png)


Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: exoticmeiz on 03 February 2021, 16:59:43
I cannot run spotifyd, how does trying to activate it help?

I also cannot locate the service? Do I need to create it manually?

Once again, I get the error:

thread 'main' panicked at 'Couldn't initialize logger: Error(Initialization, State { next_error: Some(Error(Io(Os { code: 2, kind: NotFound, message: "No such file or directory" }), State { next_error: None, backtrace: None })), backtrace: None })', src/main.rs:38:51
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I don't understand how trying to activate the daemon will help, when i cannot do it via cmd?
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: exoticmeiz on 03 February 2021, 17:02:18
thread 'main' panicked at 'Couldn't initialize logger: Error(Initialization, State { next_error: Some(Error(Io(Os { code: 2, kind: NotFound, message: "No such file or directory" }), State { next_error: None, backtrace: Some(stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: main
  10: __libc_start_main
  11: <unknown>
) })), backtrace: Some(stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: main
  10: __libc_start_main
  11: <unknown>
) })', src/main.rs:38:51
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: linuxer on 03 February 2021, 17:07:13
You have not yet described how you run spotifyd daemon

The daemon command line is shown above:
Code: [Select]
spotifyd -b pulseaudio --no-daemon

This is been executed as a service, if you install spotifyd and sporifyd-<init> service from universe.

<init> : openrc or runit or s6

After that, just enable the service as per our wiki (https://wiki.artixlinux.org/) for your init.

Do so, so to have a common base.
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: exoticmeiz on 03 February 2021, 17:10:21
I cannot run:

spotifyd -b pulseaudio --no-daemon

It errors with the error shown above ^
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: linuxer on 03 February 2021, 17:15:09
I cannot run:

spotifyd -b pulseaudio --no-daemon

It errors with the error shown above ^

^ therefore install our packages from Universe, we did not build them for fun

On runit with rsm:
(https://imgur.com/PsaM9IN.png)
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: exoticmeiz on 03 February 2021, 17:17:34
I have already done this, yet the same occurs.

I'm not sure what you expect to happen?
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: linuxer on 03 February 2021, 17:20:22
send the output of service spotifyd, is it up?
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: exoticmeiz on 03 February 2021, 17:22:24
It is not in: 'sudo rsm'.

But that's cause the startup, run won't work? Is it not?

If the exec for run doesn't work manually.
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: linuxer on 03 February 2021, 17:34:09
if you use runit and you have rsm installed, use

Code: [Select]
sudo rsm enable spotifyd
sudo rsm start spotifyd
sudo rsm status spotifyd

rsm wiki (https://gitea.artixlinux.org/linuxer/Runit-Service-Manager)
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: exoticmeiz on 03 February 2021, 17:37:15
The service is down, when I try to start it, it says:

~ ⬢  sudo rsm start spotifyd
[rsm] Running sv command (SVDIR=/run/runit/service/ sv start spotifyd):
timeout: down: spotifyd: 1s, normally up, want up
[rsm] [sv start spotifyd], exit code: 1
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: linuxer on 03 February 2021, 17:43:36
this should be the output of
Code: [Select]
 sudo rsm status spotifyd
(https://imgur.com/6TyjTTU.png)

Was spotifyd also installed, from Universe?

Is pulseaudio available and running, on your installation?

Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: exoticmeiz on 03 February 2021, 17:47:33
My output was:

~ ✖  sudo rsm status spotifyd
>  filtering out 'NetworkManager' because match 'spotifyd'
>  filtering out 'agetty-tty1' because match 'spotifyd'
>  filtering out 'agetty-tty2' because match 'spotifyd'
>  filtering out 'agetty-tty3' because match 'spotifyd'
>  filtering out 'agetty-tty4' because match 'spotifyd'
>  filtering out 'agetty-tty5' because match 'spotifyd'
>  filtering out 'agetty-tty6' because match 'spotifyd'
>  filtering out 'dbus' because match 'spotifyd'
>  filtering out 'elogind' because match 'spotifyd'
>  filtering out 'udevd' because match 'spotifyd'
> [rsm] - zachens (/run/runit/service) - 1 service

   SERVICE              STATE   ENABLED   PID      COMMAND           TIME
 X spotifyd             down    true      ---      ---               1 second

I installed spotifyd via pacman, and the only repo that has it is universe.
I do have pulseaudio.

Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: linuxer on 03 February 2021, 17:50:44
My output was:

~ ✖  sudo rsm status spotifyd
>  filtering out 'NetworkManager' because match 'spotifyd'
>  filtering out 'agetty-tty1' because match 'spotifyd'
>  filtering out 'agetty-tty2' because match 'spotifyd'
>  filtering out 'agetty-tty3' because match 'spotifyd'
>  filtering out 'agetty-tty4' because match 'spotifyd'
>  filtering out 'agetty-tty5' because match 'spotifyd'
>  filtering out 'agetty-tty6' because match 'spotifyd'
>  filtering out 'dbus' because match 'spotifyd'
>  filtering out 'elogind' because match 'spotifyd'
>  filtering out 'udevd' because match 'spotifyd'
> [rsm] - zachens (/run/runit/service) - 1 service

   SERVICE              STATE   ENABLED   PID      COMMAND           TIME
 X spotifyd             down    true      ---      ---               1 second

I installed spotifyd via pacman, and the only repo that has it is universe.
I do have pulseaudio.


Is pulseaudio running?

spotifyd needs also dbus, is it available?
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: exoticmeiz on 03 February 2021, 17:52:57
I have dbus, and when I try to activate pulseaudio's daemon, it says it is already running.
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: linuxer on 03 February 2021, 17:55:19
very strange, reboot the machine and check again
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: exoticmeiz on 03 February 2021, 17:58:18
Mm, it still does the same thing.

Quite confusing.

I haven't been able to find any solutions around the web either, not sure what to make of it.
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: linuxer on 03 February 2021, 17:58:59
Is pulseaudio running?

spotifyd needs also dbus, is it available?
please reenable the service

Code: [Select]
sudo rsm start spotifyd
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: linuxer on 03 February 2021, 17:59:57
there is something wrong with your installation (not of spotifyd)
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: exoticmeiz on 03 February 2021, 18:01:10
I have done fresh reinstalls of artix 4 times now.

followed the guide, etc.

I can make a fresh, and reinstall again? I have backups on git.
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: linuxer on 03 February 2021, 18:03:44
I have done fresh reinstalls of artix 4 times now.

followed the guide, etc.

I can make a fresh, and reinstall again? I have backups on git.
how did you install it? base?
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: exoticmeiz on 03 February 2021, 18:07:12
yes, base runit.

I basically only have a tiling manager, and a few other minor packages installed.

I've followed the guide, besides the DE parts, etc.
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: linuxer on 03 February 2021, 18:11:28
maybe you missed a point there, or something.

I would suggest you to try a Weekly Desktop ISO installation, instead of base, cause I cannot figure out what it may be missing.

Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: exoticmeiz on 03 February 2021, 18:13:14
https://github.com/Spotifyd/spotifyd/blob/master/src/main.rs

It errors at '38:51'. Which is about logging, etc.

I don't know if I have someone done something to some form of logging?

This is the error I am getting.

I will check into what you said.
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: linuxer on 03 February 2021, 18:16:20
https://github.com/Spotifyd/spotifyd/blob/master/src/main.rs

It errors at '38:51'. Which is about logging, etc.

I don't know if I have someone done something to some form of logging?

This is the error I am getting.

I will check into what you said.

yep, this is the error, but in your case, spotifyd does not even start

therefore, how the logger will be triggered?
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: exoticmeiz on 04 February 2021, 21:32:45
I solved my problem.

It was the silliest thing.

I just installed syslog-ng, and it all worked after that.

Appreciate your time linuxer, have a good one!
Title: Re: spotifyd panics `Couldn't initialize logger`
Post by: linuxer on 04 February 2021, 21:41:10
Nice!

I am marking this as solved.