New information.
It appears the "crash" may (I.e. I am not yet certain) be caused by running a Speak Annlouncement command with incorrect permissions set on the plugin directory.
I had previously run the command
- Code: Select all
sudo xattr -rd com.apple.quarantine /Library/Application\ Support/Perceptive\ Automation/Indigo\ 2022.2/Plugins
But, perhaps installing some plugin update reset that. In any case, from the desktop of the Indigo server I tried to run an action which: 1, set the volume, 2, played a local mp3, and, 3, spoke an announcement. That is when I noticed the plugin crashed and macOS displayed

- Screen Shot 2023-03-09 at 13.35.08.png (22.33 KiB) Viewed 321 times
Here is the log of the speak request.
- Code: Select all
***** Play Status Debug *****
Playstatus Media type: Music
Device state: Playing
Position: 0/4s (0.0%)
PlayState Title None
09-03-2023 13:17:56.710 DEBUG Plugin.process_playstatus:plugin.py:1435: App Playing and App Name None
09-03-2023 13:17:57.099 DEBUG Plugin.speakText:plugin.py:1372: You have mail
09-03-2023 13:17:57.099 DEBUG Plugin.speakText:plugin.py:1373: say return code:0 output:None error:None
09-03-2023 13:17:57.100 DEBUG Plugin.speakText:plugin.py:1381: "./ffmpeg/ffmpeg" -y -i "/Library/Application Support/Perceptive Automation/Indigo 2022.2/Preferences/Plugins/com.GlennNZ.indigoplugin.appleTV/speak/139647395.aiff" -f mp3 "/Library/Application Support/Perceptive Automation/Indigo 2022.2/Preferences/Plugins/com.GlennNZ.indigoplugin.appleTV/speak/139647395.mp3"
09-03-2023 13:18:00.400 DEBUG Plugin.loop_atv:plugin.py:621: Within main sleep 20 second loop killconnection False
09-03-2023 13:18:02.144 INFO Plugin.speakText:plugin.py:1391: None
09-03-2023 13:18:02.144 WARNING Plugin.speakText:plugin.py:1392: None
09-03-2023 13:18:02.144 DEBUG Plugin.speakText:plugin.py:1396: None
09-03-2023 13:18:02.144 DEBUG Plugin.speakText:plugin.py:1397: None
09-03-2023 13:18:02.144 DEBUG Plugin.speakText:plugin.py:1404: Sending Command stream_file=/Library/Application Support/Perceptive Automation/Indigo 2022.2/Preferences/Plugins/com.GlennNZ.indigoplugin.appleTV/speak/139647395.mp3 to appleTV Device ID 139647395
09-03-2023 13:18:02.144 DEBUG Plugin.speakText:plugin.py:1408: Found correct AppleTV listener/manager. <__main__.appleTVListener object at 0x106adb220> and id 139647395
09-03-2023 13:18:02.144 DEBUG Plugin.send_command:plugin.py:513: Within send_command and command & args - stream_file=/Library/Application Support/Perceptive Automation/Indigo 2022.2/Preferences/Plugins/com.GlennNZ.indigoplugin.appleTV/speak/139647395.mp3 and args /Library/Application Support/Perceptive Automation/Indigo 2022.2/Preferences/Plugins/com.GlennNZ.indigoplugin.appleTV/speak/139647395.mp3
09-03-2023 13:18:02.147 DEBUG Plugin._handle_device_command:plugin.py:410: _handle_device_command called - Args: /Library/Application Support/Perceptive Automation/Indigo 2022.2/Preferences/Plugins/com.GlennNZ.indigoplugin.appleTV/speak/139647395.mp3 Cmd:stream_file=/Library/Application Support/Perceptive Automation/Indigo 2022.2/Preferences/Plugins/com.GlennNZ.indigoplugin.appleTV/speak/139647395.mp3
09-03-2023 13:18:02.148 DEBUG Plugin._handle_device_command:plugin.py:426: cmd and cmd_args extracted and Cmd stream_file and cmd_args ['/Library/Application Support/Perceptive Automation/Indigo 2022.2/Preferences/Plugins/com.GlennNZ.indigoplugin.appleTV/speak/139647395.mp3']
09-03-2023 13:18:02.148 DEBUG Plugin._exec_command:plugin.py:496: General Exception Caught:
Traceback (most recent call last):
File "plugin.py", line 475, in _exec_command
value = await tmp(*args)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyatv/core/facade.py", line 392, in stream_file
await self.relay("stream_file")(file, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyatv/protocols/raop/__init__.py", line 341, in stream_file
self.playback_manager.acquire()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyatv/protocols/raop/__init__.py", line 141, in acquire
raise exceptions.InvalidStateError("already streaming to device")
pyatv.exceptions.InvalidStateError: already streaming to device
09-03-2023 13:18:02.150 INFO Plugin._exec_command:plugin.py:497: Could not run this command at this time.
09-03-2023 13:18:03.400 DEBUG Plugin.playstatus_update:plugin.py:326: Playstatus Update Called for CM-Homepod
09-03-2023 13:18:03.401 DEBUG Plugin.playstatus_update:plugin.py:327: & PlayStatus
Media type: Unknown
Device state: Idle
Repeat: Off
Shuffle: Off
09-03-2023 13:18:03.401 DEBUG Plugin.process_playstatus:plugin.py:1424:
So,
IF this is what is causing the plugin to hang, and
IF this is caused by incorrect permissions,
THEN maybe you can trap the error and log a message with instructions on how to fix the problem.