sjinks / wp-two-factor-provider-webauthn

WebAuthn Provider for Two Factor plugin
https://wordpress.org/plugins/two-factor-provider-webauthn/
MIT License
15 stars 7 forks source link

Publishing WooCommerce products fail when plugin is active. #36

Open LBDenny opened 2 years ago

LBDenny commented 2 years ago

When publishing a product within WooCommerce, an error is returned and the process is halted.

When the plugin is deactivated and the product is published without the activated plugin, the process is successful.

This is the error information...

Error Details

An error of type E_ERROR was caused in line 113 of the file /home/467030.cloudwaysapps.com/ydutxvzwvn/public_html/wp-content/plugins/two-factor-provider-webauthn/vendor/guzzlehttp/guzzle/src/Utils.php. Error message: Uncaught Error: Undefined class constant 'MAJOR_VERSION' in /home/467030.cloudwaysapps.com/ydutxvzwvn/public_html/wp-content/plugins/two-factor-provider-webauthn/vendor/guzzlehttp/guzzle/src/Utils.php:113
Stack trace:
#0 /home/467030.cloudwaysapps.com/ydutxvzwvn/public_html/wp-content/plugins/two-factor-provider-webauthn/vendor/guzzlehttp/guzzle/src/functions.php(71): GuzzleHttp\Utils::defaultUserAgent()
#1 /home/467030.cloudwaysapps.com/ydutxvzwvn/public_html/wp-content/plugins/google-indexing-api-by-rank-math/vendor/guzzlehttp/guzzle/src/Client.php(194): GuzzleHttp\default_user_agent()
#2 /home/467030.cloudwaysapps.com/ydutxvzwvn/public_html/wp-content/plugins/google-indexing-api-by-rank-math/vendor/guzzlehttp/guzzle/src/Client.php(75): GuzzleHttp\Client->configureDefaults()
#3 /home/467030.cloudwaysapps.com/ydutxvzwvn/public_html/wp-content/plugins/google-indexing-api-by-rank-math/vendor/google/apiclient/src/Google/Client.php(1068): GuzzleHttp\Client->__construct()
#4 /home/467030.cloudwaysapps.com/ydutxvz
sjinks commented 2 years ago

I think there is a conflict with the google-indexing-api-by-rank-math plugin; it requires guzzlehttp/guzzle 6.5.5, WebAuthn library uses Guzzle 7.4.1.

Unfortunately, it is nearly impossible to have multiple versions of the same package in the PHP world :-(

I can only suggest to build the plugin manually to see if it works:

  1. Clone the repository
  2. Find the file bin/build-archive.sh
  3. Replace this line:
    (cd /var/tmp/two-factor-provider-webauthn && composer install --no-dev --no-interaction && composer remove --update-no-dev --no-interaction composer/installers && rm -f composer.lock) && \

    with this one:

    (cd /var/tmp/two-factor-provider-webauthn && composer install --no-dev --no-interaction && composer remove --update-no-dev --no-interaction composer/installers && composer update --no-dev --prefer-lowest && rm -f composer.lock) && \
  4. Run the updated build-archive.sh. It will generate two-factor-provider-webauthn.zip in the repository root.
  5. Uninstall the already plugin and install it from the built zip archive.

Hope that helps.

Nikschavan commented 2 years ago

@sjinks I wonder if using something like imposter will fix this?

sjinks commented 2 years ago

Last time I tried that, it didn't work ☹️

Will try again.

sjinks commented 2 years ago

There is a test version with the bug fix: https://downloads.wordpress.org/plugin/two-factor-provider-webauthn.2.0.0.zip

LBDenny commented 2 years ago

Hello,

Initially, it appeared to work on Brave (Chrome), but when a modification is made to a WooCommerce product, and the product is updated, the system throws up an unrecoverable error...

Following deactivation and removal, the error is absent for the same process.

Respectfully,

Lee Denny e. @.*** p. (310) 597-1709

On 10/13/2022 7:05 PM, Volodymyr Kolesnykov wrote:

There is a test version with the bug fix: https://downloads.wordpress.org/plugin/two-factor-provider-webauthn.2.0.0.zip

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

sjinks commented 2 years ago

Do you happen to have the error message and/or stacktrace, please?