The specified command 'bin/pulseaudio' defined in the app 'pulseaudio' is not executable

Hello everyone. I was snapping a new update to our snap. The snap has a built-in pulse server from @ogra 's repository And it worked great. But today i get this error

Launching a container.
Waiting for container to be ready
Waiting for network to be ready...
Skipping pull alsa-lib (already ran)
Skipping pull pulseaudio (already ran)
Skipping pull alsa-plugins (already ran)
'alsa-ucm' has dependencies that need to be staged: alsa-plugins
Skipping pull alsa-plugins (already ran)
Skipping build alsa-plugins (already ran)
Cleaning later steps and re-staging alsa-plugins 
+ snapcraftctl stage
Cleaning later steps and re-pulling alsa-ucm ('alsa-plugins' changed)
+ snapcraftctl pull
Cloning into '/root/parts/alsa-ucm/src'...
remote: Enumerating objects: 4474, done.
remote: Counting objects: 100% (33/33), done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 4474 (delta 16), reused 20 (delta 10), pack-reused 4441
Receiving objects: 100% (4474/4474), 585.73 KiB | 2.31 MiB/s, done.
Resolving deltas: 100% (2795/2795), done.
Note: switching to 'a4cd64da90d01dc801b1887a7f835420512d0f17'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

Skipping pull desktop-qt5 (already ran)
Skipping pull copy-source-code (already ran)
Skipping pull extras (already ran)
Skipping pull pulseaudio-common (already ran)
Skipping build alsa-lib (already ran)
Skipping build pulseaudio (already ran)
Skipping build alsa-plugins (already ran)
Building alsa-ucm 
+ snapcraftctl build
+ cp --archive --link --no-dereference . /root/parts/alsa-ucm/install
Skipping build desktop-qt5 (already ran)
Skipping build copy-source-code (already ran)
Skipping build extras (already ran)
Skipping build pulseaudio-common (already ran)
Skipping stage alsa-lib (already ran)
Skipping stage pulseaudio (already ran)
Skipping stage alsa-plugins (already ran)
Staging alsa-ucm 
+ snapcraftctl stage
Skipping stage desktop-qt5 (already ran)
Skipping stage copy-source-code (already ran)
Skipping stage extras (already ran)
Skipping stage pulseaudio-common (already ran)
Skipping prime alsa-lib (already ran)
Skipping prime pulseaudio (already ran)
Priming alsa-plugins 
+ snapcraftctl prime
+ cd etc/alsa/conf.d
++ find . -type l
+ for link in $(find . -type l)
++ readlink ./60-upmix.conf
++ sed 's;^/;../../../;'
+ newlink=../../../usr/share/alsa/alsa.conf.d/60-upmix.conf
+ ln -sf ../../../usr/share/alsa/alsa.conf.d/60-upmix.conf ./60-upmix.conf
+ for link in $(find . -type l)
++ readlink ./50-pulseaudio.conf
++ sed 's;^/;../../../;'
+ newlink=../../../usr/share/alsa/alsa.conf.d/50-pulseaudio.conf
+ ln -sf ../../../usr/share/alsa/alsa.conf.d/50-pulseaudio.conf ./50-pulseaudio.conf
+ for link in $(find . -type l)
++ readlink ./60-vdownmix.conf
++ sed 's;^/;../../../;'
+ newlink=../../../usr/share/alsa/alsa.conf.d/60-vdownmix.conf
+ ln -sf ../../../usr/share/alsa/alsa.conf.d/60-vdownmix.conf ./60-vdownmix.conf
+ for link in $(find . -type l)
++ readlink ./50-arcam-av-ctl.conf
++ sed 's;^/;../../../;'
+ newlink=../../../usr/share/alsa/alsa.conf.d/50-arcam-av-ctl.conf
+ ln -sf ../../../usr/share/alsa/alsa.conf.d/50-arcam-av-ctl.conf ./50-arcam-av-ctl.conf
+ for link in $(find . -type l)
++ readlink ./98-usb-stream.conf
++ sed 's;^/;../../../;'
+ newlink=../../../usr/share/alsa/alsa.conf.d/98-usb-stream.conf
+ ln -sf ../../../usr/share/alsa/alsa.conf.d/98-usb-stream.conf ./98-usb-stream.conf
+ for link in $(find . -type l)
++ readlink ./50-oss.conf
++ sed 's;^/;../../../;'
+ newlink=../../../usr/share/alsa/alsa.conf.d/50-oss.conf
+ ln -sf ../../../usr/share/alsa/alsa.conf.d/50-oss.conf ./50-oss.conf
+ for link in $(find . -type l)
++ readlink ./10-speexrate.conf
++ sed 's;^/;../../../;'
+ newlink=../../../usr/share/alsa/alsa.conf.d/10-speexrate.conf
+ ln -sf ../../../usr/share/alsa/alsa.conf.d/10-speexrate.conf ./10-speexrate.conf
+ cd -
Priming alsa-ucm 
+ snapcraftctl prime
Skipping prime desktop-qt5 (already ran)
Skipping prime copy-source-code (already ran)
Skipping prime extras (already ran)
Skipping prime pulseaudio-common (already ran)
Failed to generate snap metadata: The specified command 'bin/pulseaudio' defined in the app 'pulseaudio' is not executable.

I think we may need a custom piece of code to make the pulsaeaudio executable after installing it in the snapcraft.yaml. Any help would be really appreciated

Here is the link to the snapcraft.yaml:

Does the same thing happen when you pack ogra’s pulseaudio snap? I couldn’t build your spec because there are components missing, but the original pulseaudio spec worked as expected here.

Snapcraft will copy files with the executable permission set the same way it is in the project directory, when using the dump plugin. So to ensure that the executable bit is set, you can do chmod +x bin/pulseaudio and commit that to your git repository so that any future clones will retain the executable bit. From there you can try building your snap again and hopefully the bin/pulseaudio script will be correctly detected when snapcraft packs your snap file.