I created a small web application with Next.js and it works fine. Now I need to index that on google. It has dynamic pages too. So I created a dynamic sitemap using Sitemap npm module. But when I tried to add it to the search console it displays an error saying that the sitemap couldn't read. After that, I validated it using this website and it says my sitemap has no issues. What should I do to get rid of this error? I have added a photo of my error below.
A way to test and find the source of the problem is to generate another sitemap and introduce it to Google Search Console. If that new one submitted successfully, you can conclude the first one really had some sort of issues. I suggest to use Yoast SEO plugin to generate a new one because of it's easily usage. Hope to be helpful.