wp-now: crashes when trying to access wp-admin with a remote database
Hello,
I have been trying to configure a local development setup using wp-now but accessing a remote database instead of the default mysqli one.
However when I try to access the admin I get the folllowing message in the console:
WASM ERROR
"unreachable" WASM instruction executed.
The typical reason is a PHP function missing from the ASYNCIFY_ONLY
list when building PHP.wasm.
You will need to file a new issue in the WordPress Playground repository
and paste this error message there:
https://github.com/WordPress/wordpress-playground/issues/new
If you're a core developer, the typical fix is to:
* Isolate a minimal reproduction of the error
* Add a reproduction of the error to php-asyncify.spec.ts in the WordPress Playground repository
* Run 'npm run fix-asyncify'
* Commit the changes, push to the repo, release updated NPM packages
Below is a list of all the PHP functions found in the stack trace to
help with the minimal reproduction. If they're all already listed in
the Dockerfile, you'll need to trigger this error again with long stack
traces enabled. In node.js, you can do it using the --stack-trace-limit=100
CLI option:
* php_pollfd_for
* php_sockop_read
* byn$fpcast-emu$php_sockop_read
* php_openssl_sockop_io
* php_openssl_sockop_read
* byn$fpcast-emu$php_openssl_sockop_read
* _php_stream_fill_read_buffer
* _php_stream_read
* mysqlnd_mysqlnd_vio_network_read_pub
* byn$fpcast-emu$mysqlnd_mysqlnd_vio_network_read_pub
* mysqlnd_mysqlnd_pfc_receive_pub
* byn$fpcast-emu$mysqlnd_mysqlnd_pfc_receive_pub
* mysqlnd_read_packet_header_and_body
* php_mysqlnd_rset_field_read
I am not sure why this happens but decided to follow the instruction provided. Navigating the frontend of the site seems to be working fine.
Any pointers in the right direction would be appreciated.
Thank you for reporting @patareco, this is a really good catch!
For posterity – a fix would involve setting up a reproduction test case in php-asyncify.spec.ts and then running the npm run fix-asyncify command. Perhaps we could actually install MySQL in GitHub CI to merge that test and ensure this feature keeps working. CCing @sejas – would you have any bandwidth to take a look at this?
I'm also receiving this error when trying to use WordPress Studio to connect to a remote MySQL database.