If you’re using Mac OS X Tiger and you’re trying to sync your mobileme account and it says

There was a problem with the sync operation

.Mac login failed

Here’s the solution

Open Finder and highlight the Mac HDD and then on the search bar type “dotmac” without the quotes. There will be 3 files under Other with the plist extension. Drag those 3 files to trash, empty trash, and then restart your Mac.

Then repeat the resyncing process.