I have a sitemap generated by a built-in Opencart extension. I submitted it to Google, but it fails to read it, saying:
Couldn't fetch Sitemap could not be read
Needless to say, the URL is public and works just fine.
The common advice is to try again and/or wait:
Waiting and hoping for the best didn't solve it for me. Submitting a reindex request didn't help either. Instead, the solution in my case was to create a rewrite rule pointing /sitemap.xml to my dynamically-generated Opencart sitemap, and feeding /sitemap.xml into the Google Search Console, which has worked immediately.
Here's the Nginx rewrite rule that I used:
rewrite ^/sitemap.xml$ /index.php?route=extension/feed/google_sitemap break;
Of course, yours does not have to point to the same exact URL I have, point it to your script that generates the sitemap. Just make sure it opens under /sitemap.xml.
The benefit of doing it like this is you can change the backend script as many times as you want without having to resubmit to Google - as long as you keep updating the rewrite rule.