Description
Trying to open the blueprint from the gallery theme-ally-test in Playground multiple errors occurred:
Error message: 'https://wpthemetestdata.files.wordpress.com/2008/06/dcp_2082.jpg' from origin 'https://playground.wordpress.net/' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Error: Error when executing the blueprint step #3 ({"step":"importWxr","file":{"resource":"url","url":"https://github.com/WordPress/theme-test-data/blob/master/themeunittestdata.wordpress.xml"}}) : memory access out of bounds
To double-check on the import file, the content imported after a while into a new site in Studio locally.
It never got to the "All done" screen, but all 37 images, 23 pages and 57 posts made it into the site.
Activity
bgrgicak commentedon Feb 10, 2025
This is caused by the WP.com server not allowing CORS requests.
@brandonpayton do you maybe know what's the standard way of enabling CORS on WP.com sites like https://wpthemetestdata.wordpress.com/?
brandonpayton commentedon Feb 14, 2025
@bgrgicak I don't know of a standard way to do this with a wpcom simple site. I would think we could use the CORS proxy to work around the CORS errors.
brandonpayton commentedon Feb 14, 2025
@bgrgicak it turns out we are indeed asking the CORS proxy for the files and getting them. When I look in the dev tools Network tab for some of the CORS errors, I see requests like these that receive an image with a 200 response status.
https://wordpress-playground-cors-proxy.net/?https://wpthemetestdata.wordpress.com/wp-content/uploads/2014/01/dsc20050315_145007_132.jpg
So it seems like the CORS errors might be a red herring.
brandonpayton commentedon Feb 15, 2025
It turns out that, after @bgrgicak's work on "Move DNS polyfills to a PHP extension and add missing constants", there is no more memory-access-out-of-bounds-error. That is interesting. 🤔 I wonder what might have been going wrong before.
@adamziel, this is an interesting thing to know about.
adamziel commentedon Feb 19, 2025
Oh huh, interesting. I wonder whether the problem was about the DNS implementation OR if the DNS work shifted the memory layout in some way that will make the issue pop up in another place. Since it was a CORS-related problem, I'm happy with assuming it was the former and closing this issue. Let's keep an eye out for related problems, though.
brandonpayton commentedon Mar 26, 2025
I'm going to reopen this for now because merging the DNS implementation change hasn't landed yet in #2165. There are some CI failures I need to look into. When that PR lands, it is marked to close this issue again automatically.
adamziel commentedon Jun 13, 2025
Out of memory issue is back again :( Here's a reproduction link:
https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/beta-rc/blueprint.json
brandonpayton commentedon Jun 19, 2025
I'll grab this one. Thanks for reopening, @adamziel.