After upgrading to Magento 2.3.0 a client flagged up an issue with the sitemap.xml. It was no longer automatically regenerating overnight.
Further inspection showed that there were some cron issues, although even after installing https://github.com/kiwicommerce/magento2-cron-scheduler , I couldn’t understand why the sitemap_generate cron was failing to run.
system > Cron Scheduler
#10841 – sitemap_generate
ERROR – Error when running a cron job – Jan 8, 2019 1:54:10 AM
I then tried to manually update the sitemap;
Marketing > Site map
and found this in the system.log;
[2019-01-09 15:31:57] main.ERROR: Environment emulation nesting is not allowed. [] []
Environment emulation nesting is not allowed
Unlike the screengrab, clicking generate always errored, taking me to a blank page and a system.log error. A bit of Googling seemed to connect this with email templates more than sitemap generation, but after looking again at Magento’s generation settings within admin, I found the answer.
How to fix the sitemap generation error – Environment emulation nesting is not allowed
Error email recipient
I removed the error email recipient functionality and the manual regeneration link now works!
Fingers crossed Magento’s cron task list will also now complete without errors.
I’m not sure if this is a bug specific to Magento 2.3.0, so please do let me know if you experience the same issue.