docker / buildx

Docker CLI plugin for extended build capabilities with BuildKit
Apache License 2.0
3.56k stars 481 forks source link

No alsa.conf and audio sink error #2052

Closed sensysx closed 1 year ago

sensysx commented 1 year ago

Contributing guidelines

I've found a bug and checked that ...

Description

Tried connecting to spotifyd using spotify connect and it didnt work.

Expected behaviour

I expected anyone connect to wifi in my house to be able to connect to spotifyd to play songs

Actual behaviour

I try to connect to spotifyd and it either connects me and kicks me off or connects me and i play a song then it kicks me off

Buildx version

github.com/docker/buildx v0.11.2 9872040

Docker info

Client: Docker Engine - Community
 Version:    24.0.6
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.21.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 5
  Running: 4
  Paused: 0
  Stopped: 1
 Images: 9
 Server Version: 24.0.6
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8165feabfdfe38c65b599c4993d227328c231fca
 runc version: v1.1.8-0-g82f18fe
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 5.15.0-83-generic
 Operating System: Ubuntu 22.04.3 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 15.18GiB
 Name: cs
 ID: 1c0e81dd-3c47-4610-8144-ecfabafc22d7
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Builders list

NAME/NODE DRIVER/ENDPOINT STATUS  BUILDKIT             PLATFORMS
default * docker                                       
  default default         running v0.11.6+616c3f613b54 linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/amd64/v4, linux/386

Configuration

Docker compose config file:

version: '3.0'

services:
  spotifyd:
    container_name: spotify
    restart: always
    image: hvalev/spotifyd-alsa
    network_mode: host
    devices:
      - /dev/snd:/dev/snd
    volumes:
      - /usr/share/alsa:/usr/share/alsa
      - /etc/spotifyd/spotifyd.conf:/etc/spotifyd.conf
      - /etc/asound.conf:/etc/asound.conf
    group_add:
      - audio

Build logs

No username_cmd specified
No password specified. Checking password_cmd
No password_cmd specified
No proxy specified
Using software volume controller.
no usable credentials found, enabling discovery
Ignoring blacklisted access point ap-gue1.spotify.com:4070
Ignoring blacklisted access point ap-gue1.spotify.com:443
Ignoring blacklisted access point ap-gue1.spotify.com:80
Ignoring blacklisted access point ap-gew4.spotify.com:4070
Connecting to AP "ap-guc3.spotify.com:443"
Authenticated as "fz4bl1tg19hxk8l6k2gdgy7jl" !
Mixing with softvol and volume control: Log(60.0)
Country: "US"
Converting with ditherer: tpdf
Using AlsaSink with format: S16
Loading <Consume (feat. Goon Des Garcons)> with Spotify URI <spotify:track:0X2bh8NVQ8svDQIn2AdCbW>
<Consume (feat. Goon Des Garcons)> (267920 ms) loaded
Audio Sink Error Connection Refused: <AlsaSink> Device default May be Invalid, Busy, or Already in Use, ALSA function 'snd_pcm_open' failed with error 'ENOENT: No such file or directory'
ALSA lib conf.c:3956:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM default
No config file specified. Running with default values
No username specified. Checking username_cmd
No username_cmd specified
No password specified. Checking password_cmd
No password_cmd specified
No proxy specified
Using software volume controller.
no usable credentials found, enabling discovery
Ignoring blacklisted access point ap-gue1.spotify.com:4070
Ignoring blacklisted access point ap-gue1.spotify.com:443
Ignoring blacklisted access point ap-gue1.spotify.com:80
Ignoring blacklisted access point ap-gew4.spotify.com:80
Connecting to AP "ap-gae2.spotify.com:443"
Authenticated as "fz4bl1tg19hxk8l6k2gdgy7jl" !
Mixing with softvol and volume control: Log(60.0)
Country: "US"
Converting with ditherer: tpdf
Using AlsaSink with format: S16
Loading <Consume (feat. Goon Des Garcons)> with Spotify URI <spotify:track:0X2bh8NVQ8svDQIn2AdCbW>
<Consume (feat. Goon Des Garcons)> (267920 ms) loaded
Audio Sink Error Connection Refused: <AlsaSink> Device default May be Invalid, Busy, or Already in Use, ALSA function 'snd_pcm_open' failed with error 'ENOENT: No such file or directory'
ALSA lib conf.c:3956:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM default
No config file specified. Running with default values
No username specified. Checking username_cmd
No username_cmd specified
No password specified. Checking password_cmd
No password_cmd specified
No proxy specified
Using software volume controller.
no usable credentials found, enabling discovery
Ignoring blacklisted access point ap-gue1.spotify.com:4070
Ignoring blacklisted access point ap-gue1.spotify.com:443
Ignoring blacklisted access point ap-gue1.spotify.com:80
Ignoring blacklisted access point ap-gew4.spotify.com:80
Connecting to AP "ap-gae2.spotify.com:443"
Authenticated as "fz4bl1tg19hxk8l6k2gdgy7jl" !
Mixing with softvol and volume control: Log(60.0)
Country: "US"
Converting with ditherer: tpdf
Using AlsaSink with format: S16
Loading <Consume (feat. Goon Des Garcons)> with Spotify URI <spotify:track:0X2bh8NVQ8svDQIn2AdCbW>
<Consume (feat. Goon Des Garcons)> (267920 ms) loaded
Audio Sink Error Connection Refused: <AlsaSink> Device default May be Invalid, Busy, or Already in Use, ALSA function 'snd_pcm_open' failed with error 'ENOENT: No such file or directory'
ALSA lib conf.c:3956:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM default
No config file specified. Running with default values
No username specified. Checking username_cmd
No username_cmd specified
No password specified. Checking password_cmd
No password_cmd specified
No proxy specified
Using software volume controller.
no usable credentials found, enabling discovery
Ignoring blacklisted access point ap-gue1.spotify.com:4070
Ignoring blacklisted access point ap-gue1.spotify.com:443
Ignoring blacklisted access point ap-gue1.spotify.com:80
Ignoring blacklisted access point ap-gew4.spotify.com:443
Failed to resolve Access Point: Unable to resolve any viable access points.
Using fallback "ap.spotify.com:443"
Connecting to AP "ap.spotify.com:443"
Authenticated as "fz4bl1tg19hxk8l6k2gdgy7jl" !
Mixing with softvol and volume control: Log(60.0)
Country: "US"
Converting with ditherer: tpdf
Using AlsaSink with format: S16
Loading <Consume (feat. Goon Des Garcons)> with Spotify URI <spotify:track:0X2bh8NVQ8svDQIn2AdCbW>
<Consume (feat. Goon Des Garcons)> (267920 ms) loaded
ALSA lib conf.c:3956:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM default
Audio Sink Error Connection Refused: <AlsaSink> Device default May be Invalid, Busy, or Already in Use, ALSA function 'snd_pcm_open' failed with error 'ENOENT: No such file or directory'
No config file specified. Running with default values
No username specified. Checking username_cmd
No username_cmd specified
No password specified. Checking password_cmd
No password_cmd specified
No proxy specified
Using software volume controller.
no usable credentials found, enabling discovery

Additional info

im already running portainer homeassistant and mosquito (an mqtt broker) in the same stack. I am using spotifyd-alsa and downloaded the docker file through docker compose. the first issue i encountered was the audio group. it says that in the read me if your are running a pi use 29 type id and use the number next to audio neither the root or my personal user have an audio group. so i tried 29 and ${29} and the first time it said it didnt expect an integer and wanted a string and the seocnd it said "parsing /opt/docker-compose.yaml: invalid interpolation format for services.spotifyd.group_add.[]. You may need to escape any $ with another $." which i dont even know what that means but i tried audio and it worked fine when i used docker compose up -d and after that i could not find any volumes relating to spotify d in my stack and when i tried to connect it said it cant find alsa.conf or any of its volumes and it was saying how there was no permissions and its going back to discovery.

Please help im very lost

crazy-max commented 1 year ago

Hum I don't see anything related to buildx here.

"parsing /opt/docker-compose.yaml: invalid interpolation format for services.spotifyd.group_add.[]. You may need to escape any $ with another $."

Looking at this error, it seems related to your compose stack. Suggest to open an issue on https://github.com/docker/compose.

Or if it's related to the usage of hvalev/spotifyd-alsa image, I suggest to open one on https://github.com/hvalev/spotifyd-docker.