WordPress / wordpress-playground

Run WordPress in the browser via WebAssembly PHP
https://w.org/playground/
GNU General Public License v2.0
1.6k stars 239 forks source link

Invalid blueprint error when accessing via Windows PC on a specific network #1601

Open alansmodic opened 1 month ago

alansmodic commented 1 month ago

When delivering a presentation utilizing WordPress Playground, users at a particular business on Windows PC were unable to load the GitHub hosted presentation powered by Playground. A short link was created to load this: https://bit.ly/vip-pub-play.

Day of the presentation, this worked for all users on a Mac, but not PC. Since then, PC user have been able to access when at home and not on their company network. Full error below, as well as screenshot:

[08-Jul-2024 14:00:38 UTC] JavaScript Erron: PHP.run() failed with exit code 255 and the following output: PHP Fatal error: Uncaught Exception: Could not unzip file in /internal/eval.php:14
Stack trace:
#0 /internal/eval.php(17): unzip('/tep/file.zip', */tap/unzipped-w...')
a1 (main)
thrown in /internal/eval.php on line 14

Error: PHP.run() failed with exit code 255 and the following output: PHP Fatal error: Uncaught Exception: Could not unzip file in /internal/eval.php: 14
Stack trace:
a0 / internal/eval.php(17): unzip(*/tap/file.zip*, */tap/unzipped-w...')
•1 (main)
thrown in /internal/eval.php on line 14

at PHP.run (https://playground.wordpress.net/worker-thread-7675f545.js?
upVersion=6.5&phpVersion=8.08php-extension={conv&php-extension-mbstring&php-
extension-xml-bundle8php-extension=gdinetworking=no&storage=none&site-slug-wordpress:53:1748)
at async unzipfile (https://playground.wordpress.net/worker-thread-7675f545.js?
wpVersion=6.5&phpVersion=8.08php-extension=iconv&php-extension=mbstring&php-
extension-xml-bundle&php-extension-gdinetworking=no&storage=none&site-slug-wordpress:438:204)
at async unzipwordPress (https://playground.wordpress.net/worker-thread-
7675f545.js?wVersion-6.58phpVersion+8.08php-extension-iconv&php-
extensionambstring&php-extension=xml-bundle&php-extension-gd&networking-no&storage-nonessite-slug-wordpress: 648:76) at async bootWordPress (https://playground.wordpress.net/worker-thread-
7675f545.js?wVersion=6.S8phpVersion«8.08php-extension=fconv&php-
extension-mbstring&php-extension=x=l-bundle&php-extension-gdanetworking=noastorage-none&site-slug-wordpress:455:996) at async https://playground.wordpress.net/worker-thread-7675f545.js?
upVersion=6.5&phpVersion=8.06php-extension=iconvaphp-extension-mbstring&php-
extension=xml-bundleaphp-extension=gdänetworking=no&storage=none&site-slug-wordpress: 648:3436

image001

bgrgicak commented 1 month ago

accessing via Windows PC on a specific network

@alansmodic I would be happy to take a look at this and at least improve the error message, but I'm not sure how to recreate it.

Are you still able to reproduce this error? If yes, please check if any network requests are failing.

alansmodic commented 1 month ago

The team is still able to reproduce. They sent along the following screenshots and HAR file. Let me know how else I can help.

image003-1 image002 playground.wordpress.net.har.zip

adamziel commented 1 month ago

Thank you for the HAR archive @alansmodic! Unfortunately, I couldn't find any details about the ZIP file in there. I have a hypothesis, though.

I bet the request to https://raw.githubusercontent.com/alansmodic/wp-pub-play/main/playground/playground.zip gets caught by some security system and instead of a ZIP file, the browser receives an HTML page that says something like "Careful with downloading ZIP files. Are you sure you want to proceed?"

Assuming that's what's happening, here's what we can do:

What happens when they try to download https://raw.githubusercontent.com/alansmodic/wp-pub-play/main/playground/playground.zip directly @alansmodic?

If my guess is wrong, we can find out what is actually happening by exposing the downloaded ZIP file contents in the error log. It doesn't have to mean including the actual bytes. We could expose a "download error report" button that would simply export the entire Playground.