For those of you still trying to get Xmarks to work with Firefox 58, I may have found a solution. I got the notion that the extension itself might not be the only problem. The way Xmarks works is that it keeps two things in sync: the bookmarks file(s) for your application(s) (on your computer) and a record of your bookmarks on its servers (i.e., "in the cloud"). So what if the problem isn't (or isn't only) that the extension can't manage the syncing? What if the record on the Xmarks servers is corrupt? After all, repeated errors like duplicating bookmarks and folders or failing to complete syncs does sound like the kind of thing that could either be caused by a corrupt file or could cause a file to become corrupt.
So what I did was to log out of Xmarks (both the extension and xmarks.com) and then create a brand new Xmarks account, thereby getting a completely new, empty, certainly not corrupt file on the server. Then I signed in and the extension easily synced my Firefox bookmarks with the server. Now I have a full, correct set of my bookmarks in both locations. And, so far, it seems to be working just fine. And what's nice is that creating a new Xmarks account left my old Xmarks account intact, so if at any point I need access to the version of my bookmarks that is sitting in my old account, it's there for me.
You might want to give this a try but if you do, remember that what I did required me to have a full, accurate set of my bookmarks in Firefox that the server extension could copy into the new account on the server. In other words, if your local bookmarks are messed up but the bookmarks on the server are not, then what I tried will not help you.
One more thought: If you use Xmarks with any other browsers in addition to Firefox, and you do not have problems with syncing those browsers, or if you have a good local copy of your bookmarks in Google Chrome, let's say, but not in Firefox, then you could try implementing my new-account strategy using your other browser first. So if your Chrome bookmarks are fine but your Firefox bookmarks are bad, you'd sign out everywhere, then create a new Xmarks account in Chrome and get it synced up with the server. Then, to make sure your Firefox bookmarks file is not corrupt in any way you'd create a new Firefox profile, then install Xmarks, sign into the new account (which now has your Chrome bookmarks) and sync.
I have no idea whether I've found the solution for myself or for you. All I know for sure is that everything seems to be working properly now. Time will tell whether it's just an illusion.