Works for me too, but I have no clue how libpulse obtains this address:
IIRC, pulse can also find the socket via an X property on the X11 root window.
I can confirm the patch works. Thanks for walking me through on how to apply the patch
I think the PR looks fine, but I don’t know enough about pulse to feel comfortable approving it. I’ve asked @jamesh to look at the PR.
I had the same problem in Chromium.
$ snap info chromium --verbose
name: chromium
summary: Chromium web browser, open-source version of Chrome
publisher: canonical
contact: https://forum.snapcraft.io/
description: |
An open-source browser project that aims to build a safer, faster, and more
stable way for all Internet users to experience the web.
snap-id: XKEcBqPM06H1Z7zGOdG5fbICuf8NWK5R
commands:
- chromium
notes:
private: false
confinement: strict
devmode: false
jailmode: false
trymode: false
enabled: true
broken: false
ignore-validation: false
tracking: stable
installed: 62.0.3202.94 (128) 147MB
refreshed: 2017-11-16 13:38:05 +0100 CET
channels:
stable: 62.0.3202.94 (128) 147MB -
candidate: 63.0.3239.108 (192) 164MB -
beta: 64.0.3282.39 (205) 168MB -
edge: 65.0.3298.3 (201) 168MB -
Starting by default gave me the ALSA problem:
$ which chromium
/snap/bin/chromium
$ chromium
ATTENTION: default value of option force_s3tc_enable overridden by environment.
[20729:20729:0112/001149.575987:ERROR:desktop_window_tree_host_x11.cc(1880)] Not implemented reached in void views::DesktopWindowTreeHostX11::MapWindow(ui::WindowShowState)
[20729:20729:0112/001149.586112:ERROR:desktop_window_tree_host_x11.cc(1880)] Not implemented reached in void views::DesktopWindowTreeHostX11::MapWindow(ui::WindowShowState)
[1:22:0112/001154.986990:ERROR:adm_helpers.cc(62)] Failed to query stereo recording.
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM plug:default
[1:22:0112/001234.851449:ERROR:stunport.cc(88)] Binding request timed out from 0.0.0.x:39313 (any)
Using the right debug flags I got:
$ PULSE_LOG=4 SNAPD_DEBUG=1 SNAP_CONFINE_DEBUG=1 chromium
<snip>
Parsing configuration file '/etc/pulse/client.conf'
/etc/pulse/client.conf.d does not exist, ignoring.
Using shared memory pool with 1024 slots of size 64,0 KiB each, total size is 64,0 MiB, maximum usable slot size is 65472
Trying to connect to /run/user/1000/snap.chromium/pulse/native...
connect(): No such file or directory (2)
Trying to connect to /var/run/pulse/native...
connect(): No such file or directory (2)
As I can’t really modify the desktop-launch script I created a link which solved my issue (of course, it currently requires me to redo that after any boot):
$ sudo ln -s /run/user/1000/pulse/native /run/user/1000/snap.chromium/pulse/
With that I can now use hangouts and youtube without issues.
So, the pending questions is, where should this be reported?
by some bizarre workings on my chrome-browser when I click on spotify community page
& then click on web-player,
I can still access my web-interface, although I don’t know why @popey ??
drum-roll - I have spotify.
sorry if this is’t the right way to do it.
although - all I hear is silence is a touch of very little.
As mentioned earlier in this thread, we landed a change to snapcraft-desktop-helpers to fix problems with apps finding the PulseAudio socket (we settled on setting an environment variable rather than the symlink though). Unfortunately this requires snaps using the cloud part to be rebuilt.
Looking at the build numbers for chromium
, the stable channel build seems a lot older than the others (128 for stable vs. 192 for candidate), so I wonder if it was build prior to the snapcraft-desktop-helpers fix? Perhaps you could try one of the newer releases with a command like:
snap refresh --channel=candidate chromium
… and see if that fixes the problem.
Via the X11 root window
Thanks, I saw there were new versions but haven’t tried then until today. The candidate still had the same issues, but Chromium beta did work.
For future reference, there are the current versions:
$ snap info chromium
<snip>
channels:
stable: 62.0.3202.94 (128) 147MB -
candidate: 63.0.3239.108 (192) 164MB -
beta: 64.0.3282.39 (205) 168MB -
edge: 65.0.3298.3 (201) 168MB -
@mvo somewhere in charlotte, carolina - there is someone playing Spotify
but I cannot.
Here is your paste cut .
colors- red, black green blue.
I found the same bug attempting to setup spotify using snap in my Mint 18.1. (upgraded, not fresh installed from 18.0)
In spotify installed for the software repo, spotify straight up crashes on startup.
In spotify installd with snap, the gui starts but local sound devices fail to work.
In spotify, choosing devices other than the local soundcard work.
I see the same error accessing “/usr/share/alsa/alsa.conf”…
A perm change to 666 on that file didn’t fix it.
Also, spotify prints “This song is not available, bla bla bla import it” with local speakers.
So with local audio it just cycles through songs, each printing an error
Snap version///////
snap --version
snap 2.30
snapd 2.30
series 16
linuxmint 18.1
kernel 4.4.0-104-generic
Attempting to launch…
spotify
Gtk-Message: Failed to load module “gail”
Gtk-Message: Failed to load module “atk-bridge”
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
FIX: (in my case)
I fixed it temporarily by creating a link to “native” in snap.spotify, as snap.chromium didn’t exist either.
sudo ln -s /run/user/1000/pulse/native /run/user/1000/snap.spotify/pulse/
Creating the link, tracks play to local soundcard as expected.
Apparently, sound system detection is buggy and rather than throwing an exception spotify just plunders on.
This has been fixed in the candidate release, so you could refresh your snap for that channel.
Yay @j605 !!
Confirming… , after refreshing the candidate for spotify the “no sound” bug is gone on my Mint 18.1 install.
The working spotify snap is 1.0.72.117.g6bd7cc73-35 .
Audio from soundcard speakers works as it should.
Great, since the spotify included in the 18.1 software repo is broken and crashes on startup.
I’m still hitting this on the edge channel with the 1.0.83.316.ge96b6e67-5 version. When running the app with PULSE_LOG=4 SNAPD_DEBUG=1 SNAP_CONFINE_DEBUG=1 /snap/bin/spotify
, I got the following output errors:
DEBUG: execv(/usr/lib/snapd/snap-exec, /usr/lib/snapd/snap-exec...)
DEBUG: argv[1] = spotify
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
realpath: '': No such file or directory
Gtk-Message: Failed to load module "overlay-scrollbar"
Parsing configuration file '/etc/pulse/client.conf'
/etc/pulse/client.conf.d does not exist, ignoring.
And:
Trying to connect to /run/user/1664627069/snap.spotify/pulse/native...
connect(): No such file or directory (2)
Trying to connect to /var/run/pulse/native...
connect(): No such file or directory (2)
And:
[0802/083739.925917:ERROR:web_plugin_impl.cc(38)] Widevine registration is not supported after context initialization
Parsing configuration file '/etc/pulse/client.conf'
/etc/pulse/client.conf.d does not exist, ignoring.
And:
Trying to connect to /run/user/1664627069/snap.spotify/pulse/native...
connect(): No such file or directory (2)
Trying to connect to /var/run/pulse/native...
connect(): No such file or directory (2)
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
And then if I strip down to the console error when hitting play, you specifically get:
Parsing configuration file '/etc/pulse/client.conf'
/etc/pulse/client.conf.d does not exist, ignoring.
Using shared memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65472
Trying to connect to /run/user/1664627069/snap.spotify/pulse/native...
connect(): No such file or directory (2)
Trying to connect to /var/run/pulse/native...
connect(): No such file or directory (2)
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
So looking at that file:
ls -al /usr/share/alsa/alsa.conf
-rw-r--r-- 1 root root 9663 Jan 3 2016 /usr/share/alsa/alsa.conf
I temporarily put the file perms to 777 - same error.
The symlinking option does not work as suggested above as native
does not exist on my system (Ubuntu Budgie 18.04).
sudo find / -iname native | grep pulse
Also checked manually:
cd /run/user/1664627069/snap.spotify/pulse/
ls
cd /var/run/
ls | grep pulse
Anyone else experiencing this on the spotify snap w/ 18.04?
This sounds like it is honoring XDG_RUNTIME_DIR as exported to the environment when it should be looking for /run/user/1664627069/pulse/native. @jamesh, should desktop-launch be adjusted to create a compatibility symlink from /run/user/<uid>/snap.<name>/pulse/native
to /run/user/<uid>/pulse/native
?
We set PULSE_SERVER
with path pointing to $XDG_RUNTIME_DIR/../$pulsenative
, so inside the snap that should end up being /run/user/<uid>/snap.spotify/../pulse/native
. Looking at the log it does not appear to be used anymore or am I missing something there?
I’ll try out symoinkjbg that new path once I get back to they machine.
(mobile fail)
I’ll try symlinking the new path when I get back to the machine.
In my case, /run/user/<uid>/snap.spotify
does not even exist. There is however a /run/user/<uid>/pulse
directory, however, that is empty…
There should be a /run/user/<uid>/pulse/native
socket there. Is pulseaudio even running?