Hello. I had encountered the same error. Was searching for the solution online and bumped into this post. I had managed to solve it. Thought of sharing how I solved the issue here. Hopefully it will help others who encountered the same issue.
What I did:
1. Make sure update the whatsapp app to the latest version from playstore.
2. Take a backup via whatsapp. Go to Whatapps>Chats>Chat backup>Backup.
3. Copy all content of whatsapp folder from old phone to new phone. Copy using OTG (via external SD card) and not thru PC as PC not able to see all the files.
4. Install whatsapp on new phone.
5. Press yes when asked if you want to restore from backup.
It will mention restore from google drive. Which I found it confusing as I was expecting there should be an option to restore from local backup.
Initially I pressed skip hoping it will lead to option to restore from local backup. Pressing skip will skip the skip the whole restoration process.
Restoration will start but not able to pass 24%.
Here is what I did:
1. When it was stucked at 24% it will ask if you want to continue restore using older backup. Do not press anything. Just to go Application under phone's setting and force close whatsapp.
If you press yes, it will restore from a backup which you do not want. Then you will need to reinstall whatsapp and request for verification code if you want to attempt to restore again from local backup. By force closing whatsapp, whatsapp will prompt you to restore from backup as soon as you open whatsapp again. With this you do not need to request for the verification code again. Saves waiting time for the verification code.
2. Removed all google accounts from my phone except for the one which I've used to backup whatsapp.
2. Turn off sync for the google account under phone setting.
3. Remove the whatsapp backup in google drive. Since whatsapp will not be able to find any backup in google drive, it will look for local backup instead.
4. Reboot the phone.
5. Open whatsapp and it will prompt you to restore.
After that, I was able to complete the restoration process successfully.
Just that I missed 1 day of messages (between the time I stopped using whatsapp on the old phone and time till I managed to get it working in the new phone). This was because I was online on whatsapp after each restoration attempt during that period and message keeps coming in. Because whatsapp backup was not restored successfully, I had to keep re-installing whatsapp. Message which came in was not in my whatsapp backup database.
Hopefully this helps.