The 521 code is indicating that "The origin server refused connections from Cloudflare. Security solutions at the origin may be blocking legitimate connections from certain Cloudflare IP addresses". Can you check your network to make sure everything is okay there?
If everything checks out with your network, then I have found the "Invalid Play Store credentials" happening is almost always due to a configuration error. Can you confirm you set up your permissions correctly? https://www.revenuecat.com/docs/creating-play-service-credentials
The steps I find are usually missed or done incorrectly are the following:
- https://www.revenuecat.com/docs/creating-play-service-credentials#2c-create-the-service-account-key-credentials
- https://www.revenuecat.com/docs/creating-play-service-credentials#3-grant-financial-access-to-revenuecat
Generally going through these steps again seems to help a lot of people as they might have missed steps. One thing to check is also that you are linking the correct Google Cloud project.
Please double-check those for me. If this still doesn't fix the problem, please let me know!
I check these steps several times but it is not working. I have also another app with different revenuecat account and implement revenuecat on it but it also gives error code 520.
Thank you for letting me know! Our SDK is programmed to automatically retry any 5xx
response, so these requests should get replayed and succeed eventually after the credentials are fixed. With Invalid Credentials, it indicates that RevenueCat is not able to communicate with Google at the moment.
I recommend generating new service credentials to wait out the propagation time (up to 36 hours for new credentials to work). If you have your current service credentials JSON, I also recommend re-entering those credentials inside the RevenueCat settings page. I have seen that sometimes regenerating them and waiting will fix this error.
After waiting for a week it resoved by own.
Hi all,
I am having the exact same issue. I’ve been testing the app for some time and it just started happening out of the blue. I am getting:
Unable to start a network connection due to a network configuration issue: https://api.revenuecat.com/v1/receipts
API request started: POST /receipts
API request completed with status: POST /receipts 521
There was a credentials issue. Check the underlying error for more details.
I created new service accounts. Should I just wait and see if it solves by itself?
Thanks.
Hi all,
I am having the exact same issue. I’ve been testing the app for some time and it just started happening out of the blue. I am getting:
Unable to start a network connection due to a network configuration issue: https://api.revenuecat.com/v1/receipts
API request started: POST /receipts
API request completed with status: POST /receipts 521
There was a credentials issue. Check the underlying error for more details.
I created new service accounts. Should I just wait and see if it solves by itself?
Thanks.
This error continued nearly a week in our case. Hope it is solved earlier for you.
@Bogdan Nistor yes, waiting after regenerating should fix the error. And don’t forget to re-enter those credentials inside the RevenueCat settings page.