Sunday, January 17, 2016

Evernote sync error - "the content is invalid"

I've been getting these on and off for months. It's been a pain to try and sort out what's going on and there seems to be nothing in the Evernote forums that's particular to my issue. I have a set of notes that just won't sync with nothing obviously wrong with them. The error in the log looks like this:
-[ENSyncEngine(Errors) addSyncErrorForObjectWithID:title:message:underlyingError:] | Adding error: Error Domain=ENSyncEngineErrorDomain Code=-2000 "The content is invalid." UserInfo=0x... {underlyingError=, NSLocalizedFailureReason=Could not sync note ‘Work Done: 2015-12-09 (Wed)’., localObjectID=0x... , NSLocalizedDescription=The content is invalid.}

So, this makes it sound like there's an issue with a 'TODO' element (checkbox?) and that the tag, for some reason, contains content. Looking at the XML export of that particular note doesn't show anything amiss/unusual around the TODO/checkbox elements.

Solution: In my case, the issue turns out to be the emoticons - I use smileys and Evernote helpfully converts the ASCII versions into lovely little images. These seem to cause the invalid content issue. If I highlight the areas around the emoticons and 'simplify formatting' (Formatting dropdown) the note will now sync just fine.