[X] I'm not trying to run Raspotify on a ARMv6 device
Compatible OS
[X] I'm running Raspotify on a compatible OS
Compatible Configuration
[X] I'm running Raspotify on a compatible Configuration
Latest Version
[X] I'm running the latest version of Raspotify
Are you sure?
[X] I'm not running Raspotify 0.31.8.1 on a on a Pi v1 or Pi Zero
Due Diligence
[ ] I have done my due diligence
What happened?
I'm using the option:
LIBRESPOT_ONEVENT="/usr/bin/python /home/pi/mrp/mrpc.py"
to start a python script and to process spotify player events. This option worked fine in raspotify version 0.31.1. Running the actual version I get the error:
librespot[2768]: /usr/bin/python: can't open file '/home/pi/mrp/mrpc.py': [Errno 13] Permission denied
Looking to the raspotify.service file I recognized that librespot is now started with the DynamicUser=yes option.
For testing I changed the service file to the old content of raspotify@0.31.1 and the --onevent option is working as expected. So it seems that the approach with the dynamic user leads to that permission issue. It would be great if the actual service file could be analysed and reworked so that the LIBRESPOT_ONEVENT option can be used.
Relevant log output
Nov 23 07:50:59 mozart librespot[2726]: [2022-11-23T06:50:59Z INFO librespot] librespot 0.4.2 1975727 (Built on 2022-11-18, Build ID: D64mrIuL, Profile: rel ease)
Nov 23 07:50:59 mozart librespot[2726]: [2022-11-23T06:50:59Z TRACE librespot] Environment variable(s):
Nov 23 07:50:59 mozart librespot[2726]: [2022-11-23T06:50:59Z TRACE librespot] LIBRESPOT_NAME="raspotify (mozart)"
Nov 23 07:50:59 mozart librespot[2726]: [2022-11-23T06:50:59Z TRACE librespot] LIBRESPOT_BACKEND="alsa"
Nov 23 07:50:59 mozart librespot[2726]: [2022-11-23T06:50:59Z TRACE librespot] LIBRESPOT_CACHE="/var/cache/raspotify"
Nov 23 07:50:59 mozart librespot[2726]: [2022-11-23T06:50:59Z TRACE librespot] LIBRESPOT_SYSTEM_CACHE="/var/lib/raspotify"
Nov 23 07:50:59 mozart librespot[2726]: [2022-11-23T06:50:59Z TRACE librespot] LIBRESPOT_ONEVENT="/usr/bin/python /home/pi/mrp/mrpc.py"
Nov 23 07:50:59 mozart librespot[2726]: [2022-11-23T06:50:59Z TRACE librespot] LIBRESPOT_QUIET=
Nov 23 07:50:59 mozart librespot[2726]: [2022-11-23T06:50:59Z TRACE librespot] LIBRESPOT_AUTOPLAY=
Nov 23 07:50:59 mozart librespot[2726]: [2022-11-23T06:50:59Z TRACE librespot] LIBRESPOT_DISABLE_AUDIO_CACHE=
Nov 23 07:50:59 mozart librespot[2726]: [2022-11-23T06:50:59Z TRACE librespot] LIBRESPOT_DISABLE_CREDENTIAL_CACHE=
Nov 23 07:50:59 mozart librespot[2726]: [2022-11-23T06:50:59Z TRACE librespot] LIBRESPOT_ENABLE_VOLUME_NORMALISATION=
Nov 23 07:50:59 mozart librespot[2726]: [2022-11-23T06:50:59Z TRACE librespot] LIBRESPOT_VERBOSE=
...
Nov 23 08:33:14 mozart librespot[2726]: [2022-11-23T07:33:14Z INFO librespot::player_event_handler] Running ["/usr/bin/python", "/home/pi/mrp/mrpc.py"] with environment variables {"TRACK_ID": "2XqqICdvmbnQvbbVYsrt2D", "PLAYER_EVENT": "changed", "OLD_TRACK_ID": "3Z9bMAaCLvkcvkUealsvXB"}
Nov 23 08:33:14 mozart librespot[2726]: [2022-11-23T07:33:14Z INFO librespot::player_event_handler] Running ["/usr/bin/python", "/home/pi/mrp/mrpc.py"] with environment variables {"POSITION_MS": "0", "DURATION_MS": "232773", "PLAYER_EVENT": "playing", "TRACK_ID": "2XqqICdvmbnQvbbVYsrt2D"}
Nov 23 08:33:14 mozart librespot[2891]: /usr/bin/python: can't open file '/home/pi/mrp/mrpc.py': [Errno 13] Permission denied
Compatible Device
Are you sure?
Compatible OS
Compatible Configuration
Latest Version
Are you sure?
Due Diligence
What happened?
I'm using the option: LIBRESPOT_ONEVENT="/usr/bin/python /home/pi/mrp/mrpc.py" to start a python script and to process spotify player events. This option worked fine in raspotify version 0.31.1. Running the actual version I get the error: librespot[2768]: /usr/bin/python: can't open file '/home/pi/mrp/mrpc.py': [Errno 13] Permission denied Looking to the raspotify.service file I recognized that librespot is now started with the DynamicUser=yes option. For testing I changed the service file to the old content of raspotify@0.31.1 and the --onevent option is working as expected. So it seems that the approach with the dynamic user leads to that permission issue. It would be great if the actual service file could be analysed and reworked so that the LIBRESPOT_ONEVENT option can be used.
Relevant log output