Showing posts with label procedure entry point sqlite3_file_control could not be located. Show all posts
Showing posts with label procedure entry point sqlite3_file_control could not be located. Show all posts

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!