Yet another occurrence of this when setting up a new phone, in this case a OnePlus 5 with the H2OS (Chinese) OS. I installed the current Oxygen OS official 9.0.9 from XDA, used the OnePlus transfer, and despite many strategies, could not get rid of this error. I tried:
Wiping the cache, other data in Google Play
Ditto other Google services
turned off WIFI, turned on, etc.
Reinstalled Google play
Installed Google APK from APK store
I had seen these elsewhere working for some folks.