Posting here because I'm not sure this qualifies as a formal bug.
If your joplin installation gets completely munged after a failed sync, like mine, the obvious thing to do is to delete the whole thing and, perhaps, try a clean, fresh installation.
So - on Windows 10 - I uninstall the Joplin app. Then I went to check that the $USER.config\joplin-desktop folder was gone as well. This is what you are told to remove when starting afresh. But the uninstallation program had not touched it. The old, corrupt database was still there. ANy fresh install of Joplin would presumably pick it up and have the same problems.
[Poking around the sqlite db revealed that, yes, I have two or three copies of almost all my notebooks in it now]
So I renamed that installation, which should be enough to keep it as evidence but stop any new installation from picking it up. And I have a .jex backup of the original folders imported from Evernote.
But surely the uninstallation process should automatically remove all the program's data and not just the app itself>