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

Error while installing #655

Closed
notjedi opened this issue Aug 5, 2020 · 19 comments
Closed

Error while installing #655

notjedi opened this issue Aug 5, 2020 · 19 comments
Labels
bug A functionality or parts of a program that do not work as intended

Comments

@notjedi
Copy link

notjedi commented Aug 5, 2020

Compiling librespot v0.1.3
Compiling spotifyd v0.2.24 (/home/jedi/src/spotifyd)
error[E0063]: missing field gapless in initializer of librespot_playback::config::PlayerConfig
--> src/config.rs:732:24
|
732 | player_config: PlayerConfig {
| ^^^^^^^^^^^^ missing gapless

error[E0560]: struct librespot_core::config::ConnectConfig has no field named linear_volume
--> src/main_loop.rs:172:25
|
172 | linear_volume: self.linear_volume,
| ^^^^^^^^^^^^^ librespot_core::config::ConnectConfig does not have this field
|
= note: available fields are: name, device_type, volume, volume_ctrl, autoplay

error[E0027]: pattern does not mention fields play_request_id, position_ms
--> src/process.rs:65:9
|
65 | PlayerEvent::Started { track_id } => {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing fields play_request_id, position_ms

error[E0027]: pattern does not mention field play_request_id
--> src/process.rs:69:9
|
69 | PlayerEvent::Stopped { track_id } => {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing field play_request_id

error[E0560]: struct librespot_core::config::ConnectConfig has no field named linear_volume
--> src/setup.rs:97:13
|
97 | linear_volume,
| ^^^^^^^^^^^^^ librespot_core::config::ConnectConfig does not have this field
|
= note: available fields are: name, device_type, volume, volume_ctrl, autoplay

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0027, E0063, E0560.
For more information about an error, try rustc --explain E0027.
error: failed to compile spotifyd v0.2.24 (/home/jedi/src/spotifyd), intermediate artifacts can be found at /home/jedi/src/spotifyd/target

Caused by:
could not compile spotifyd.

To learn more, run the command again with --verbose.

i solved it by adding --locked to the command cargo install --path . --locked
but i'm not able to use pulseaudio as backend
using alsa does not show my pc as a device in spt even while spotifyd in running.

@notjedi notjedi added the bug A functionality or parts of a program that do not work as intended label Aug 5, 2020
@mainrs
Copy link
Member

mainrs commented Aug 5, 2020

The readme should by now mention that you have to use --locked like you already discovered.
Does pulseaudio not produce any sound at all? Alsa is a whole beast in itself and it has almost always been a wrong configuration from the user side that it didn't work properly. Sadly, it's super hard to help out on that as audio setups differ a lot between OS and hardware as well.

If you have trouble with any of the backends you could always use rodio by compiling it yourself. That backend is afaik guaranteed to work on any system without any additional configuration. Take a look at the readme to see how to compile the binary yourself :)

I don't think that we currently provide binaries for linux that contain rodio. #610 has been merged today and some work is being done in #653. After that I will probably trigger a new build to generate new binaries. Those will actually contain all audio backends on all systems if you select the all-flavor binary :)

@notjedi
Copy link
Author

notjedi commented Aug 5, 2020

okay i'll give rodio a try. but i wanna try one last time.
can you check if my config is correct and spotifyd i detected on my phone but when i choose spotifyd i cannot hear any sound although it shows as the song is currently playing. a weird thing is that i set the device name to a different name but even then it shows up as spotifyd

i'm running Ubuntu 20.04 if that helps

image

@mainrs
Copy link
Member

mainrs commented Aug 5, 2020

Looks right. You sure that you installed pulseaudio on your system? The other parameters (mixer) shouldn't be needed. You can remove it. But I doubt that that will make a difference :)

@notjedi
Copy link
Author

notjedi commented Aug 5, 2020

yeah i do have pulseaudio installed on my system.
i found the problem i guess, spotifyd does not even startup.

image

@mainrs
Copy link
Member

mainrs commented Aug 5, 2020

Try to run spotifyd --no-daemon --verbose. Maybe more information is in there.

@notjedi
Copy link
Author

notjedi commented Aug 5, 2020

Here is the output:

image

@mainrs
Copy link
Member

mainrs commented Aug 5, 2020

Do you see the panic message? Caught panic with message: unknown backend pulseaudio. Pretty sure the linux build is not available with pulseaudio. #610 fixed this but I didn't create new builds yet.

If you run spotifyd -h you probably only get the alsa backend listed. You have to compile it yourself sadly. It should work with pulseaudio though. Just need to compile it with that.

@notjedi
Copy link
Author

notjedi commented Aug 5, 2020

yeah i do get alsa backend listed
and here is the output
https://termbin.com/hx8m

it seems like there is a problem with the port or something
i even tried to run it with a different port number but the output is same

@mainrs
Copy link
Member

mainrs commented Aug 5, 2020

You need to remove the proxy entry in the configuration file.

Using proxy "http://proxy.example.org:8080/"
Caught panic with message: called Result::unwrap() on an Err value: Custom { kind: Other, error: "failed to lookup address information: Name or service not known" }

@notjedi
Copy link
Author

notjedi commented Aug 5, 2020

man i'm so dumb i just now noticed that and i removed that but it still doesn't work when i run spotifyd
but now it is working if i run spotifyd --no-daemon

@notjedi
Copy link
Author

notjedi commented Aug 5, 2020

any solutions?

@mainrs
Copy link
Member

mainrs commented Aug 5, 2020

Good question. A lot of people had that problem. I had no time to investigate it though. You might be missing a syslog logger on your system, which causes this issue. The log should contain a line telling you that it failed to initialize logging.
#576

For now you just have to run it using no-daemon until I fix it :)

@notjedi
Copy link
Author

notjedi commented Aug 5, 2020

okay, alr cool. and one more thing every time i start spotifyd it sets the volume level to 94% which is annoying as i'm using earphones and it just blows my head out. is there a fix? and also i'm now able to control the playback using media control keys or playerctl or alsamixer even though i added the feature flags for media controls

@mainrs
Copy link
Member

mainrs commented Aug 5, 2020

it depends on your environment if the media keys do indeed send commands through your running DBUS instance. You'd have to check yourself to see if they do and if not try to find a fix for it. There is not much I can do for you on that department.

Regarding the volume: It's a known issue and I remember merging a PR that fixes it but maybe it broke again (or my mind plays on me). I'll take a look.

@notjedi
Copy link
Author

notjedi commented Aug 5, 2020

alr cool thanks, i'll close this issue now

@notjedi notjedi closed this as completed Aug 5, 2020
@notjedi
Copy link
Author

notjedi commented Aug 5, 2020

running the command from this comment outputs:
qdbus: could not find a Qt installation of ''. do you think you can help me on that?

@mainrs
Copy link
Member

mainrs commented Aug 6, 2020

Sorry, no clue on that one!

@notjedi
Copy link
Author

notjedi commented Aug 6, 2020

@sirwindfield does the snap package version support playerctl and other stuff or does it just support alsa?

@mainrs
Copy link
Member

mainrs commented Aug 6, 2020

Just alsa, it's broken though. I don't have rights to push to the registry :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A functionality or parts of a program that do not work as intended
Projects
None yet
Development

No branches or pull requests

2 participants