One of the users of my app have complained on losing data, but not entirely. For example, he was on level 27 and had 240 coins, and somehow he was sent back to level 12 with less coins. It has nothing to do with the code, and it happened only to him and today, it happened to me as well.
I used to play around with the saving of data to local storage with clearing it first and then saving my data, but how come the value for the level, coins and all progress is reverted to some value that was stored before?
I am also having a problem with huge data size See this link
Is it possible that my data is accumulating every time it saves? For example, the values for levels are not replaced but saved as new instead of only saving the highest level, so in the data there are multiple level values (1,2,3,4....20) and they sometimes conflict and load a wrong (lower level) value. This would explain the huge data size, but what may cause it?