My ""solution"" for this issue is that I automatically backup the whatsapp data partition using swift backup (paid version is 7 euros and allows you to set a daily automatic schedule). The backup happens every night at 1:30 pm, then at 2:00 pm Whatsapp crashes. Unfortunately, swift backup does not have an automated restore function, so I used macrodroid app to automatically unlock my screen at 4pm , open swift backup, navigate to the whatsapp backup and restore it.Yep, I have been having problems with my chat history since looong ago, seems that something must be corrupted because every day at 2AM when it performed the local backup always crashed. So I ended up with the habit of powering down the device before 2AM so that it would not crash every day.
But from time to time I would forget to power down, and also being too much time without performing the backup is also call for trouble in case something goes wrong again, so from time to time I would let it do the backup and then crash, because I learned that at that point when I was prompted to restore a backup I could always succeed by clicking OK, let it do it's work with the latest msgstore.db.crypt14 file in the Databases folder and when the WhatsApp internal storage reached a certain amount of data I knew it was ok (1.03 GB in my case), force close the app and the chats would be magically there, all of them that I can tell, back to 2011 (I posted about this in this thread or some similar back in 2019 and also many other people confirmed this).
However since early July I just cannot do this anymore. Now it seems as there is an additional 'preparing data' step (in the "post-activation" state of the app, more on this later) where it checks for integrity or something, and I would never succeed with the force-close method again. I also noticed that the storage used during the restore goes beyond what I used to see before. I don't have a clue about how the WA works internally but to me it seems as if previously this worked because chats where actually restored during the 0-24% portion of the process, and from 24%-31% and/or beyond it was about the references to media, and the two processes were somehow separated and force-closing during the 24% allowed to get up and running again, but now it wants it to complete all the process or otherwise it rolls back (?). It's either this, or my backup just got even more corrupted than before, I don't really know.
The other thing that I noticed (fortunately?) is that if you try the force-close method during the "pre-activation" step, it can still work and you end up with the chats restored... but in that case the app will only run OK for as long I have it in memory. As soon as it closes and the process restarts, does this kind of check again and the chat gets corrupted again... the problem here is that activating every day is not possible as you know because of the cumulative delays that WhatsApp imposes in each attempt... I have been trying to get it to work for a few days days now without success (even trying to restore the unencrypted msgstore.db in an Android VM to see if I can extract a "clean" backup again, without success) and now I have to wait for 36h to activate again and I do not have much hope that I will be able to come up with a solution this time.
Guys, a lot of people has trouble with restoring their/our chat history as you all know first hand, we need to keep this updated or come with a megathread or something, with whatever procedures that any of us find that might still work post July 2022.
I've disabled the notifications of these apps, and even used macrodroid to navigate to homescreen, kill background apps and relock my screen after the restore.
Result: swift backup makes a whatsapp backup of the chat history of today (and everything before it), whatsapp crashes an halfhour later, and then after that the chat history gets restored again.
In the morning when I wake up whatsapp works perfectly fine again, all chats are there. And I dont have to actively be bothered by it again, there's not a trace of all the **** that had happened while I was asleep.
It's ridiculous that I have to take these steps because whatsapp has such a ****ty restore process.