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

Spotify: PulseAudio: Unable to connect: Connection refused #2169

Open
xexpanderx opened this issue Oct 2, 2018 · 14 comments

Comments

Projects
None yet
5 participants
@xexpanderx
Copy link

commented Oct 2, 2018

Slackware current

Flatpak version 1.0.2

See title

Steps to reproduce

Before starting spotify I issue this in shell:
exportxprop -root -notype PULSE_SERVER | tr -d ' '``

and then

flatpak run com.spotify.Client/x86_64/stable

which gives me this:


ALSA lib ../../pulse/pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib ../../src/dlmisc.c:170:(snd_dlsym_verify) unable to verify version for symbol _snd_pcm_plug_open
ALSA lib ../../src/dlmisc.c:296:(snd1_dlobj_cache_get) symbol _snd_pcm_plug_open is not defined inside [builtin]

No idea how to fix this. I have Spotify opened, but no sound.

@TingPing

This comment has been minimized.

Copy link
Member

commented Oct 2, 2018

Does this happen with other Flatpaks?

@xexpanderx

This comment has been minimized.

Copy link
Author

commented Oct 2, 2018

This is the first time I try to use Flatpak, do you have any other package I may try that requires pulseaudio?

@TingPing

This comment has been minimized.

Copy link
Member

commented Oct 2, 2018

@alexlarsson

This comment has been minimized.

Copy link
Member

commented Oct 3, 2018

flatpak is supposed to read the PULSE_SERVER env var, see the code at:
https://github.com/flatpak/flatpak/blob/master/common/flatpak-run.c#L344

Maybe its some form it can't accept though, it can only do unix: ones atm? What is the value of the env var for you?

@xexpanderx

This comment has been minimized.

Copy link
Author

commented Oct 3, 2018

Hi,

The value is:

echo $PULSE_SERVER 
"{ca2c3d36d123493d9a89cae35b7c676a}unix:/tmp/pulse-cKwRHHS8pmwY/native"
@CrashyBang

This comment has been minimized.

Copy link

commented Dec 19, 2018

@xexpanderx did you find a solution? I am experiencing the same problem.

@xexpanderx

This comment has been minimized.

Copy link
Author

commented Dec 19, 2018

@xexpanderx did you find a solution? I am experiencing the same problem.

No, I gave up, too much of a hassle.

@CrashyBang

This comment has been minimized.

Copy link

commented Dec 19, 2018

Fair enough I will comment here if I find anything simple.

@refi64

This comment has been minimized.

Copy link
Contributor

commented Dec 19, 2018

Based on #878, this seems to occur if $XDG_RUNTIME_DIR is empty when PulseAudio was started. Try adding:

export XDG_RUNTIME_DIR=/run/user/$(id -u)
@CrashyBang

This comment has been minimized.

Copy link

commented Dec 19, 2018

Hey @kirbyfan64,

I added that to my .zshrc and now I get the following error:

error: Unable to allocate instance id

I also tried install xdg-utils in case this was required but it made no difference.

@CrashyBang

This comment has been minimized.

Copy link

commented Dec 21, 2018

After reading a little more I tried adding:

export XDG_RUNTIME_DIR=/run/user/$(id -u)

To my /etc/profile this stopped the above error, but did not resolve the issues.

@refi64

This comment has been minimized.

Copy link
Contributor

commented Dec 21, 2018

Now, what's the value of $PULSE_SERVER?

@CrashyBang

This comment has been minimized.

Copy link

commented Dec 21, 2018

Hey Kirby so I actually got it by running:

PULSE_SERVER=unix:/tmp/pulse-PKdhtXMmr18n/native flatpak run com.discordapp.Discord

However I did notice when I run it without:

export XDG_RUNTIME_DIR=/run/user/$(id -u)

Added to the /etc/profile
I get the following errors:

sh: xdg-mime: command not found

Any idea what that may be? And what it may effect?

@refi64

This comment has been minimized.

Copy link
Contributor

commented Dec 22, 2018

(commenting on the new issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.