Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activating woocommerce returns an error #392

Closed
cpapazoglou opened this issue May 19, 2023 · 2 comments
Closed

Activating woocommerce returns an error #392

cpapazoglou opened this issue May 19, 2023 · 2 comments
Labels
[Aspect] Asyncify [Feature] PHP.wasm [Type] Bug An existing feature does not function as intended

Comments

@cpapazoglou
Copy link

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_network_connect_socket
    * php_tcp_sockop_set_option
    * php_openssl_sockop_set_option
    * _php_stream_set_option
    * _php_stream_xport_create
    * zif_stream_socket_client
    * ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER
    * execute_ex
    * zend_call_function
    * zif_array_filter

    at _NodePHP.#handleRequest (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:67743:24)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at runNextTicks (node:internal/process/task_queues:65:3)
    at listOnTimeout (node:internal/timers:526:9)
    at processTimers (node:internal/timers:500:7)
    at async _NodePHP.run (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:67518:12)
    at async PHPRequestHandler.#dispatchToPHP (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:67130:14)
    at async PHPRequestHandler.request (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:67038:12)
    at async PHPBrowser.request (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:66832:22)
    at async file:///Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/main.js:759:20 {
  cause: Error: Rethrown
      at EventTarget.errorListener (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:67710:28)
      at EventTarget.[nodejs.internal.kHybridDispatch] (node:internal/event_target:562:20)
      at EventTarget.dispatchEvent (node:internal/event_target:504:26)
      at runtime.asm.<computed> (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:66636:18)
      at invoke_iiiii (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:24598:14)
      at php_execute_script (wasm://wasm/026cde66:wasm-function[10322]:0x55d5cf)
      at dynCall_ii (wasm://wasm/026cde66:wasm-function[11718]:0x5dec98)
      at ret.<computed> (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:23851:33)
      at runtime.asm.<computed> (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:66617:18)
      at invoke_ii (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:24587:14)
      at wasm_sapi_handle_request (wasm://wasm/026cde66:wasm-function[9024]:0x4f557a)
      at ret.<computed> (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:23851:33)
      at runtime.asm.<computed> (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:66617:18)
      at Object.ccall (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:24021:20)
      at exitCode (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:67719:53)
      at new Promise (<anonymous>) {
    cause: RuntimeError: unreachable
        at zend_call_function (wasm://wasm/026cde66:wasm-function[432]:0x2d2bb)
        at zif_array_filter (wasm://wasm/026cde66:wasm-function[8501]:0x4d9329)
        at ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER (wasm://wasm/026cde66:wasm-function[12978]:0x638502)
        at execute_ex (wasm://wasm/026cde66:wasm-function[11537]:0x5d5e6d)
        at zend_call_function (wasm://wasm/026cde66:wasm-function[432]:0x2ce58)
        at zif_array_filter (wasm://wasm/026cde66:wasm-function[8501]:0x4d9329)
        at ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER (wasm://wasm/026cde66:wasm-function[12978]:0x638502)
        at execute_ex (wasm://wasm/026cde66:wasm-function[11537]:0x5d5e6d)
        at zend_execute (wasm://wasm/026cde66:wasm-function[3251]:0x2060a7)
        at zend_execute_scripts (wasm://wasm/026cde66:wasm-function[8642]:0x4e2dea)
        at dynCall_iiiii (wasm://wasm/026cde66:wasm-function[11715]:0x5dea31)
        at ret.<computed> (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:23851:33)
        at runtime.asm.<computed> (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:66617:18)
        at invoke_iiiii (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:24598:14)
        at php_execute_script (wasm://wasm/026cde66:wasm-function[10322]:0x55d5cf)
        at dynCall_ii (wasm://wasm/026cde66:wasm-function[11718]:0x5dec98) {
      cause: Error
          at Object.Asyncify.handleSleep (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:24793:45)
          at _wasm_poll_socket (/Users/cpap/.nvm/versions/node/v16.13.2/lib/node_modules/@wp-now/wp-now/node_modules/@php-wasm/node/index.cjs:23705:21)
          at php_pollfd_for (wasm://wasm/026cde66:wasm-function[946]:0x8b1ef)
          at php_network_connect_socket (wasm://wasm/026cde66:wasm-function[5215]:0x36ad5f)
          at php_tcp_sockop_set_option (wasm://wasm/026cde66:wasm-function[10026]:0x543f1f)
          at php_openssl_sockop_set_option (wasm://wasm/026cde66:wasm-function[10154]:0x54e64b)
          at _php_stream_set_option (wasm://wasm/026cde66:wasm-function[484]:0x326e7)
          at _php_stream_xport_create (wasm://wasm/026cde66:wasm-function[1643]:0xe7165)
          at zif_stream_socket_client (wasm://wasm/026cde66:wasm-function[7550]:0x463415)
          at ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER (wasm://wasm/026cde66:wasm-function[12978]:0x638502)
          at execute_ex (wasm://wasm/026cde66:wasm-function[11537]:0x5d5e6d)
          at zend_call_function (wasm://wasm/026cde66:wasm-function[432]:0x2ce58)
          at zif_array_filter (wasm://wasm/026cde66:wasm-function[8501]:0x4d9329)
          at ZEND_DO_FCALL_BY_NAME_SPEC_RETVAL_USED_HANDLER (wasm://wasm/026cde66:wasm-function[12978]:0x638502)
          at execute_ex (wasm://wasm/026cde66:wasm-function[11537]:0x5d5e6d)
          at zend_call_function (wasm://wasm/026cde66:wasm-function[432]:0x2ce58)
@adamziel
Copy link
Collaborator

Thank you for reporting @cpapazoglou! I’m surely glad to have these verbose error messages in place. The fix will be quite easy (more context in #253)

@adamziel adamziel added [Type] Bug An existing feature does not function as intended [Feature] PHP.wasm [Aspect] Asyncify labels May 19, 2023
adamziel added a commit that referenced this issue May 30, 2023
Adds `zif_array_filter` to Asyncify list to fix the WooCommerce error
reported in #392
@adamziel
Copy link
Collaborator

@cpapazoglou This is fixed as of #397. Feel free to reopen this ticket if you'll experience any other related issues.

Pookie717 added a commit to Pookie717/wordpress-playground that referenced this issue Oct 1, 2023
Adds `zif_array_filter` to Asyncify list to fix the WooCommerce error
reported in WordPress/wordpress-playground#392
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Aspect] Asyncify [Feature] PHP.wasm [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants