That usually happens when you have two or more Tinode browser tabs at the same time.
Another reason could be moving back and forth between two versions of the database, for example during development.
When that happens, log out and delete IndexedDB in your browser.