Fixing “Trust this computer” Problem

I had a strange problem crop up on my iMac running Yosemite and both of my iDevices (iPhone 6, iPad 4). When I plugged either in, I would get a dialog on the iMac saying photos could not be imported because the device was locked. On the devices themselves, I would be asked to Trust this computer. This happened every. single. time.

In the system.log, there were error messages to the tune of:

11/7/14 7:16:52.086 AM usbmuxd[57]: AMDeviceConnect (thread 0x1002fe000): Could not connect to lockdown port (62078) on device 1076 - [long ID number here]: 0xe8000084.

Digging further, I discovered that there is a directory, /var/db/lockdown, that contains a plist for each device connected to the Mac over the years (and since I have been leading an iOS Dev Team for Ozmott, I had a lot of devices listed in there!) and it seems that, for some reason, changes were no longer taking. I am not sure why. There were no errors related to permissions or otherwise.

On the advice of a thread I found online after some extensive Googling, I removed the lockdown directory. Theoretically, it would be recreated by the system. However, it wasn’t. Now when I connected my devices, I got the following errors:

11/7/14 7:22:44.510 AM com.apple.usbmuxd[57]: WriteDataToPath unable to create file /var/db/lockdown//SystemConfiguration.plist.tmp: No such file or directory.
11/7/14 7:22:44.510 AM com.apple.usbmuxd[57]: CreateAndStoreBUID WriteDataToPath failed: No such file or directory

So, I created a new lockdown directory using sudo mkdir lockdown. Then the errors changed to:

11/7/14 7:27:09.767 AM com.apple.usbmuxd[57]: WriteDataToPath unable to create file /var/db/lockdown//SystemConfiguration.plist.tmp: Permission denied.
11/7/14 7:27:09.767 AM com.apple.usbmuxd[57]: CreateAndStoreBUID WriteDataToPath failed: Permission denied

The directory was owned by root (because I created it using sudo) and clearly needed to belong to the usbmuxd process. Directories belonging to processes are named for the process preceded by an underscore. So I executed: sudo chown _usbmuxd lockdown.

That worked. Plugging in my devices resulted in the same dialogs as before but once I told the iDevices to trust the computer, new plist files were created for each and subsequent connects/disconnects have not had the errors recur. We’ll see if this sticks over time but at least I know how to fix it, even if temporarily.

Update 18 December 2014: The problem routinely returns. After I leave my computer running for a day or so, the problem comes back. I haven’t needed to resort to the fix above as simply rebooting my computer fixes it. It’s safe to say that something I am running on my machine is responsible. Now for the sleuthing…

Update 15 January 2015: Solved! Thanks to this thread on Stack Overflow, I have a solution that works! When this happens, open up a terminal and type

sudo launchctl stop com.apple.usbmuxd

And it restarts the broken usbmuxd process and things are happy again.

Something is Wrong with This…

In August, I ordered my son’s books for school. His school uses an online bookstore and he wanted digital versions where possible so he didn’t have to carry around a heavy bag. So, I ordered what I could digitally and the rest on paper. After about the first week of school was over, he came to me and said that his history teacher said that he really needed the current textbook (he had been using a loaner of last year’s version). I told him that I’d ordered it and thought the teacher would have the online license code to grant him access because I had gotten an email to that effect. Turns out, that was for his science book.

So, I checked the online bookstore (Follett) and found the order was incomplete and that one item was backordered and would ship when available. You guessed it, the license code for his history book from Pearson. I wrote to Follett and said that I’d never heard of license codes being back ordered. It takes a second to generate a new code and email it to someone. They gave me a polite brush-off reply that, indeed, codes can be backordered and they would ship when available.

Last week I got an email that his license codes had shipped. Via FedEx. And would arrive late the following week. Again, I boggled that license codes had to be shipped.

2014-09-18 10.38.25

Then they arrived yesterday. They came in a ridiculously large, flat package. Inside where two sets of codes (for two years of access). I felt like redirecting the package to the school just to complete the absurdity of the whole thing but texted him the code for the first year instead.

In 2014 unlock codes for digital books have to be mailed in a package via conventional shipping. The mind boggles.