Uncaught TypeError in log messages, failed customer orders
-
Hi,
I’ve been trying to track down an issue some but not all of my customers have experienced when trying to pay with paypal and found the following error messages in my logs; while it’s possible that they could be related in some way to another plugin, I don’t have any way to figure out which ones because I don’t have any plugins on my site which I can just switch off for a few weeks to see if the issue goes away and I haven’t been able to reliably reproduce it. Additionally there is no indication in the stack trace of any other plugins. There are two traces which I primarily see:
2022-03-10T22:27:57+00:00 CRITICAL
Uncaught TypeError: Argument 2 passed to WooCommerce\PayPalCommerce\Button\Assets\SmartButton::__construct() must be of the type string, object given, called in /var/www/html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/services.php on line 75 and defined in /var/www/html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php:149
Stack trace: #0 /var/www/html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/services.php(75): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->__construct('https://signals...', Object(WooCommerce\PayPalCommerce\Session\SessionHandler), Object(WooCommerce\PayPalCommerce\WcGateway\Settings\Settings), Object(WooCommerce\PayPalCommerce\ApiClient\Factory\PayerFactory), '<redacted>...', Object(WooCommerce\PayPalCommerce\Button\Endpoint\RequestData), Object(WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies), Object(WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper), Object(WooCom in /var/www/html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php on line 149
2022-03-10T22:30:29+00:00 CRITICAL
Uncaught TypeError: Argument 2 passed to WooCommerce\PayPalCommerce\Button\Assets\SmartButton::__construct() must be an instance of WooCommerce\PayPalCommerce\Session\SessionHandler, string given, called in /var/www/html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/services.php on line 75 and defined in /var/www/html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php:141
Stack trace: #0 /var/www/html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/services.php(75): WooCommerce\PayPalCommerce\Button\Assets\SmartButton->__construct('https://signals...', '1.7.0', Object(WooCommerce\PayPalCommerce\Session\SessionHandler), Object(WooCommerce\PayPalCommerce\WcGateway\Settings\Settings), Object(WooCommerce\PayPalCommerce\ApiClient\Factory\PayerFactory), 'AS8VmF85GGQUQn6...', Object(WooCommerce\PayPalCommerce\Button\Endpoint\RequestData), Object(WooCommerce\PayPalCommerce\ApiClient\Helper\DccApplies), Object(WooCommerce\PayPalCommerce in /var/www/html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-button/src/Assets/SmartButton.php on line 141
I find it particularly interesting that one is complaining that argument 2 should be a string and it got an object and the other complains that argument 2 should be an object (of the type the other received) and it got a string… it seems very likely to be a bug in the code.
- The topic ‘Uncaught TypeError in log messages, failed customer orders’ is closed to new replies.