Monday, April 26, 2010

iPhone 3G Stopped Syncing with iTunes "unable to load provider data"

The other day, my iPhone 3G and iTunes (9.1) decided to stop communicating.

Since Apple refuses to release a Linux version of iTunes, I keep it synced with my Windows 7 x86_64 system. The other day iTunes started popping up a message
"unable to load provider data from sync services"

There are a number of suggested remedies for this error, from removing / reinstalling iTunes, downgrading versions, deleting the SyncServices directory, disabling startup items etc...

Here's what worked for me, renaming C:\windows\SysWOW64\sqlite3.dll

Now, for the debugging process that finally produced the pointer to sqlite3.dll:

First, I searched the web for the error displayed by iTunes. This is either a generic error that covers a range of failures, or it's horribly worded. The search didn't help in my case, although other users reported success using the suggestions.

Next, I dug around until I found the iTunes log files. Perhaps there's a way to view them within iTunes, but I located them under C:\Users\MyId\AppData\Roaming\Apple Computer\Logs

Look for the log with the most recent time stamp and open in your favorite text editor (Geany or Notepad++ are good choices).

I spent time debugging the errors listed at the bottom of the log file to no avail. Those messages were similar to these:
[4368 @ Mon Apr 26 20:05:48 2010] [ASL ASL] windir=C:\Windows
[4368 @ Mon Apr 26 20:05:48 2010] [(unknown facility) iTunes.exe] _receive_message: Could not securely receive message size: SSL_ERROR_ZERO_RETURN
[4368 @ Mon Apr 26 20:05:48 2010] [(unknown facility) iTunes.exe] AMDeviceStopSession: Could not stop session with device: kAMDInvalidResponseError
[4368 @ Mon Apr 26 20:05:48 2010] [(unknown facility) iTunes.exe] _send_message: Could not securely send message size 282: SSL_ERROR_SYSCALL errno (File exists)

[4368 @ Mon Apr 26 20:06:00 2010] [(unknown facility) iTunes.exe] receive_message: Could not receive secure message: -1
[4368 @ Mon Apr 26 20:06:00 2010] [(unknown facility) iTunes.exe] _read_thread: Could not receive message

Then I started reading back in the log file until I found this line:
[728 @ Mon Apr 26 20:05:48 2010] [_ISDVLog AppleMobileDeviceHelper.exe] SyncServer is unavailable: timed out trying to connect

This got me digging around in Windows Services applet (services.msc) looking for a service that controls Apple Mobile Device Helper. The service was started, I stopped it, restarted iTunes and plugged in the phone. A new message appeared almost immediately indicating that the iPhone can't sync without the Mobile Device service. I started it, resynced and was back to the original error.

The files for this service are located under C:\Program Files (x86)\Common Files\Apple\Mobile Device Support

I navigated to that directory and found an executable named AppleSyncPref.exe

Hmm, perhaps my sync prefs got corrupted? I double click that executable and get a message box with the following error:
"The procedure entry point sqlite3_file_control could not be located in  the dynamic link library SQLite3.dll"

Interesting! A search for this error revealed this page on Apple Support message board. In particular, user 'johnporcaro' posted this short helpful comment:
On my HP Pavilion, Windows 7, deleted sqlite3.dll c:\Windows\SysWOW64. WORKED!

Rather than delete the dll, I renamed it to ~sqlite3.dll, restarted iTunes and sync worked right away.

Hope this helps other frustrated iPhone synch'rs!

4 comments:

Anonymous said...

Can you give the non-techie directions to do this? I'm lost on where to even start.

FlakRat said...

Howdy, thanks for the feedback.

You either need to rename or delete this file (I'd recommend renaming it in case you need to restore it):

C:\windows\SysWOW64\sqlite3.dll

Try this:
1. Open a command prompt by holding the Windows key and pressing R. This should open the Run dialog

Type cmd and click OK

2. You should now have a black command window open (like an old DOS console)

3. Type these commands:

cd C:\windows\SysWOW64
ren sqlite3.dll ~sqlite3.dll
exit

That should do it. You can also open My Computer and navigate to C:\windows\SysWOW64

However, you'll probably need to configure My Computer preferences by clicking Tools menu, Folder Options, click the View tab and select "Show hidden files and folders", uncheck "Hide protected operating system files" AND uncheck "Hide extensions for known types". Click OK. Once that's done, double click C:, double click Windows, double click SysWOW64, right click on the file, click Rename and rename to ~sqlite3.dll

If you go that route, make sure to change the My Computer "Folder Options" back to the original settings to help prevent accidental modifications :-)

Hope this helps

Blah to iTunes said...

Hi,

Thanks to your post, I was able to rectify my own problem of iTunes not syncing with my Outlook calendar. I had a similar message but unfortunaley your fix wasn't enough for me. This is what I did after an entire day of searching for a solution:


To be honest, I tried so many things in such a random order, I'm not sure if every step is necessary but these were my actions.

I disabled ESET anitvirus (I now believe that it was ESET that caused the probelem in the first place).
I created a rule to allow the following .exe file to work
C:\Program Files (x86)\Common Files\Apple\Mobile Device Support\com.apple.Outlook.client.exe

I'm not sure if that is enough to fix the problem because I also did the following.

Uninstalled & reinstalled iTunes
Whilst ESET was disabled, I ran every .exe file in the folder:
C:\Program Files (x86)\Common Files\Apple\Mobile Device Support


Initially, I had to run the com.apple.Outlook.client.exe file every time I opened iTunes & then something made it stick. Not sure what. Maybe I had disabled ESET in the meantime.

Anyway, I hope this helps someone out there.

Ethan Smith said...

Buy & sell new and used iPhones.
Wide selection of new and used iPhones for sale.
More at postallads4free.com