That can be expected. And so you solve all errors until the migration succeeds without one.
Your duplication error might also be caused by restarting the migration without having cleaned up the flarum database. Eg if you installed flarum with admin username Toby and your vanilla forum had a username with the same name, it might throw this error.