Friday, February 10, 2012

Your iPad/iPhone/iPod not showing up on wireless sync on iTunes in Windows XP?

UPDATE: This solution appears to work for Windows 7 as well. As the problem is likely in the Apple software, the solution should work across Windows operating systems.
Last year for my mom's birthday, we bought her an iPad 2. When iOS 5 came out, she took advantage of the cool wireless sync feature to iTunes running on her Windows XP machine. It worked great for a few months, but then suddenly her iPad stopped showing up in the sync list unless it was physically plugged into her computer. On the iPad, it said it couldn't see her computer.

After tweaking some settings and doing a few reboots, I managed to get her computer to start wireless sync'ing again. I had an idea about what it was, but I wasn't sure.

Then, after a few weeks, I hear from her that it has started again. So I did a little more searching, and after combining multiple people's error reports and extracting the common thing that seemed to fix them all, I think I came up with the fix. It's a simple fix, and she's able to do it herself whenever the iPad loses connectivity. For the last few weeks, every time the iPad stops talking to her computer, she's able to recover immediately. So I think we've figured it out.

The fix? Restart the Apple Mobile Device service. Here's how:
  1. Quit iTunes.
  2. Right-click on "My Computer" and go to "Manage".
    • Alternatively (e.g., on Windows 7), open up your "Control Panel". Then click to see "All Items." Then look for "Administrative Tools." You should find "Services" in there. That's the ultimate destination we're heading to.
    • Alternatively, click on "Start" and then "Run" and type "services.msc" (without the quotes) and hit enter.
  3. Click on "Services and Applications" inside the "Computer Management" console.
  4. Double-click on the "Services" that shows up.
  5. Find the "Apple Mobile Device" service in the list and select it by clicking on it.
  6. Click the link that says "Restart the service".
    • Alternatively, you can right-click on the service and select "Restart."
    • Alternatively, you can double-click on the service and then click the "Stop" button and then the "Start" button.
  7. Close the management console.
Now that you've restarted the "Apple Mobile Device", your system should start working like normal again (you may want to start up iTunes again though). Eventually when your iOS device starts looking again, it will find your system and sync as needed.

This problem appears to be caused by some sort of race condition dealing with the Apple Mobile Device and the network. As the computer starts, the order in which things start is non-deterministic. Due to some random delays, the network may not come up quick enough. Consequently, the Apple Mobile Device gets confused by the network being in this state. Re-starting it manually later when the network is definitely up and running seems to fix this problem every time.

Thursday, February 02, 2012

What it means for GMail's web interface to use a different grammar for labeling and searching...

I have been having a hard time explaining this to the Google Apps support team. I originally contacted them because I had a lot of labels with leading special characters that I use to affect their sort order. For example, I have a "?Bulk" label grouped together with other "?Bulk/sublabels" (e.g., "?Bulk/Facebook"). The leading question mark prevents them from showing up in the middle of other labels I have that start with "B". Moreover, using leading special characters lets me put certain important labels at the top of my list where they are easy to see and access.

Now, the search bar at the top of the GMail web interface doesn't have much problem with this. It will match such labels regardless of whether I include the leading special character:



Note that it's not just finding partial matches in the middle of a label. If you drop the first alphanumeric character after the special characters, you get no matches:


Now, you would expect the "Move To" and "Copy To" quick searches to behave the same way. At first, it seems like they do. They'll do partial matches from the front of the label if you include the special character:


But if you drop the special character, you're doomed.


Pretty annoying, huh? See, "Move To" and "Copy To" are using some special grammar to extract information from the list of labels. Apparently this grammar is overly simple. Now, I might be able to live with that if it wasn't the case that GMail Search knows how to get labels right. In fact, Gmail Search can even handle nested labels with leading special characters. Check it out:



See? It was able to recognize that the "/" in big version of the label name separated parent from child label (which actually can be a problem if you're not intending to use nested labels). It then looks for matches at the start of the sublabel, which is in the middle of the big label shown. Pretty cool. Moreover, if you drop the leading alphanumeric character, the match fails:


Now, apparently "Move To" and "Copy To" have some of this matching behavior. That is, they'll properly chop the label into parent and child and look for matches in just the child part:


Unfortunately, you need the special character for the match to work:


So, again, for some reason GMail has developed the quick search for "Move To" and "Copy To" independently from GMail Search in general. Maybe this was an optimization, but it seems like it wouldn't be too slow to call out to GMail Search to find these labels. Then everything would be consistent.

Now, I tried explaining this to the Google Apps support team initially. You know what they told me? That "Gmail Search" doesn't do partial matches, and so it's the expected behavior. Can you believe they actually had the nerve to forward me to a GMail Search page when the real problem is that "Move To" and "Copy To" are in fact acting DIFFERENTLY than GMail Search? IF ONLY the issue was with GMail Search; I could live with that.

Well, Thunderbird gets it right. I guess that's a nice workaround.