Page 1 of 2

iTunes plugin disabling itself

PostPosted: Tue May 08, 2018 6:17 am
by mbordas
Has anyone else been having trouble with the iTunes plugin recently? This just started a few week ago, it randomly disables itself sometimes, maybe every few days.

Code: Select all
   iTunes Error                    iTunes stopped due to the following error (will attempt to recover in 10 seconds):

Traceback (most recent call last):
  File "statusThread.py", line 134, in run
  File "itunes.py", line 59, in iTunesLogin
UnknownError: 'ITunesController.iTunesLogin() Error getting initial cache update: Traceback (most recent call last):\n  File "itunes.py", line 57, in iTunesLogin\n  File "itunes.py", line 181, in updateCache\n  File "dacp.py", line 586, in send_cmd\n  File "dacp.py", line 581, in send_raw\nDACPException: 403 - unknown response status code\n'


   iTunes Error                    iTunes has an unknown error - disabling

Re: iTunes plugin disabling itself

PostPosted: Tue May 08, 2018 9:08 am
by jay (support)
That seems to imply that iTunes is randomly deciding to fail the authentication request (which really shouldn't be possible since the pairing process is what does that authentication), and in a very unexpected way. More information: Indigo version, macOS version, iTunes version, is it a local or remote iTunes instance, etc.

Re: iTunes plugin disabling itself

PostPosted: Fri Jul 06, 2018 10:55 am
by t-star
I didn't get that one. I got a different one yesterday.
2018-07-05 14:02:18.984 iTunes Error iTunes - House MacMini stopped due to the following error (will attempt to recover in 10 seconds):

Traceback (most recent call last):
File "statusThread.py", line 253, in run
DACPException: 500 - unknown response status code

2018-07-05 14:02:19.322 iTunes Error iTunes - House MacMini has an unknown error - disabling


But I can't seem to re-enable the plugin. It continues to show the iTunes device as unavailable. Have rebooted, disabled etc..

Any ideas on getting it working?

When I try to play iTunes via the plugin I get:
Action Group iTunes: Play
Ignored device "iTunes - House MacMini" action request (communication is disabled)


itunes 12.7.5.9 on the same computer as Indigo 7.1.1. Running MacOS 10.10.5

Side note: I was getting errors with the airfoil plugin shortly before this error. so not sure what was going on at the time.

2018-07-05 14:02:00.853 Airfoil Pro Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 533, in runConcurrentThread
StandardError: ServerCommunicationError -- timeout waiting for response

Re: iTunes plugin disabling itself

PostPosted: Fri Jul 06, 2018 11:23 am
by jay (support)
Have you rebooted both the Indigo server Mac and the Mac that's running iTunes (assuming they are different)?

Is the plugin disabled on only the iTunes Server device? Make sure the Communication Enabled checkbox is checked in the device list for that device or edit it and make sure the Enable Indigo Communication checkbox is checked.

Re: iTunes plugin disabling itself

PostPosted: Fri Jul 06, 2018 11:23 am
by t-star
I found how to re-establish the plugin device talking with iTunes. I right clicked on the device and selected "Enable Indigo Communication".

Seems to have me back up and running.

Re: iTunes plugin disabling itself

PostPosted: Fri Jul 06, 2018 11:30 am
by t-star
Thanks Jay. Good to note on the additional columns . I hardly ever scroll to the right in the main Indigo display to see those additional columns. I have the columns sized and arranged to what I need most and I forgot they were out there. I just don't have that many issues. This is the first time in 5+ years that I remember having an issue like this. Keep up the good work!

Re: iTunes plugin disabling itself

PostPosted: Mon Jul 23, 2018 4:40 pm
by manwithavan
I've been having the same problem. But despite re-enabling Indigo communication and restarting the server a few times, it keeps happening.
High Sierra 10.13.6
Indigo 7.1.1 (local server)
iTunes 12.8.0.150

Here's some info from the log:

Code: Select all
23 Jul 2018 at 6:30:00 am
   Schedule                        Classic FM 6:30am Airplay to 20

23 Jul 2018 at 6:32:00 am
   iTunes Local Control Error      applescript:shuffle_state_set, args:(False,)
   iTunes Local Control Error      iTunes got an error: AppleEvent timed out. (-1712) app=u'iTunes' range=74-89

23 Jul 2018 at 6:34:00 am
   iTunes Local Control Error      applescript:playlist_play, args:(u'Classic',)
   iTunes Local Control Error      iTunes got an error: AppleEvent timed out. (-1712) app=u'iTunes' range=73-109

23 Jul 2018 at 7:01:35 am
   iTunes Error                    iTunes stopped due to the following error (will attempt to recover in 10 seconds):

Traceback (most recent call last):
  File "statusThread.py", line 134, in run
  File "itunes.py", line 59, in iTunesLogin
UnknownError: 'ITunesController.iTunesLogin() Error getting initial cache update: Traceback (most recent call last):\n  File "itunes.py", line 57, in iTunesLogin\n  File "itunes.py", line 181, in updateCache\n  File "dacp.py", line 586, in send_cmd\n  File "dacp.py", line 575, in send_raw\nDACPException: 503 - server went offline\n'


   iTunes Error                    iTunes has an unknown error - disabling

Re: iTunes plugin disabling itself

PostPosted: Mon Jul 23, 2018 5:25 pm
by jay (support)
Given the error above from the iTunes Local Control plugin (which is separate from the iTunes plugin), it looks like you've got some systemic issue going on with iTunes. This error:

Code: Select all
File "dacp.py", line 575, in send_raw\nDACPException: 503 - server went offline\n


means that iTunes itself returned a 503 error when the iTunes plugin tried to talk to it. I don't know what could cause that other than iTunes failing in some unexpected way. Note that your error, while similar to the OP (and t-star's), is different.

Re: iTunes plugin disabling itself

PostPosted: Mon Jul 23, 2018 5:30 pm
by jay (support)
jay (support) wrote:
Given the error above from the iTunes Local Control plugin (which is separate from the iTunes plugin), it looks like you've got some systemic issue going on with iTunes. This error:

Code: Select all
File "dacp.py", line 575, in send_raw\nDACPException: 503 - server went offline\n


means that iTunes itself returned a 503 error when the iTunes plugin tried to talk to it. I don't know what could cause that other than iTunes failing in some unexpected way. Note that your error, while similar to the OP (and t-star's), is different.


I just tried here with all the same versions and it's working fine. I think you've got something else going on with your system and/or iTunes.

Re: iTunes plugin disabling itself

PostPosted: Mon Jul 23, 2018 5:38 pm
by manwithavan
Thanks Jay.
Thinking it could be that it's trying to play an internet stream (radio station) and having latency issues. Will try with some local music.
Out of interest, is there any way to prevent it disabling itself? Then if it's a latency issue it might be able to retry and work a few moments later.

Re: iTunes plugin disabling itself

PostPosted: Mon Jul 23, 2018 6:40 pm
by Different Computers
I have also seen this device disabled thing happening.

10.13.6/Up to date Indigo.

Re: iTunes plugin disabling itself

PostPosted: Tue Jul 24, 2018 8:56 am
by jay (support)
manwithavan wrote:
Out of interest, is there any way to prevent it disabling itself? Then if it's a latency issue it might be able to retry and work a few moments later.


I'll look at it for a future release, but not making any promises.

Re: iTunes plugin disabling itself

PostPosted: Sat Jul 28, 2018 7:27 am
by Different Computers
Discovered iTunes device was disabled again today.

Re: iTunes plugin disabling itself

PostPosted: Sat Jul 28, 2018 10:23 am
by jay (support)
You could try triggering on iTunes errors, and when one happens attempt to reenable it (maybe after a delay). May or may not work depending on what the underlying issue that's causing iTunes to freak out is.

Re: iTunes plugin disabling itself

PostPosted: Sat Jul 28, 2018 10:59 am
by Different Computers
Not a bad idea, but in hunting around to build such a trigger, I see "Status is error" but I don't see "enable iTunes device" or anything similar.

Where is that?