Conversation
supportHello, after we installed the plugin, we get PHP Fatal error in frontend pages. This should be handled gracefully in plugin in try catch block and never cause exception. PHP message: PHP Fatal error: Uncaught FacebookAds\Http\Exception\ServerException: An unknown error occurred in /home/website/webapps/website/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-business-sdk/src/FacebookAds/Http/Exception/RequestException.php:177\nStack trace:\n#0 /home/website/webapps/website/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-business-sdk/src/FacebookAds/Http/Client.php(226): FacebookAds\Http\Exception\RequestException::create()\n#1 /home/website/webapps/website/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-business-sdk/src/FacebookAds/Http/Request.php(286): FacebookAds\Http\Client->sendRequest()\n#2 /home/website/webapps/website/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-business-sdk/src/FacebookAds/Api.php(152): FacebookAds\Http\Request->execute()\n#3 /home/website/webapps/website/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-busin…’, Could you please fix it in next plugin update? Best regards, Ovidijus.
Hi @ovidijusk – thanks for reaching out! We are aware of this issue and are working on a fix, which will be included in the coming releases. Please let us know if there’s anything else we can help you out with. Kind regards, Marija
Same issue here. I see other threads with same problem, so it is a serious bug and this is a long-standing problem. Can you provide me the Github repo’s link?
Temporary solution: make a file in the mu-plugins folder, add any name e.g. facebook-pixel-fix.php Add this code: <?php /** * Facebook Pixel temporary error fix */ // Temporarily disable the faulty async task add_filter('facebook_pixel_server_events_use_async', '__return_false'); // Or alternative solution: catch shutdown errors register_shutdown_function(function() { $error = error_get_last(); if ($error && strpos($error['message'], 'FacebookAds\Http\Exception\ServerException') !== false) { // Clear the error message error_clear_last(); // Log it but don't display it error_log('Facebook Pixel API error caught: ' . $error['message']); // Prevent fatal error from being displayed if (!headers_sent()) { header('HTTP/1.1 200 OK'); } } }); // Increase Facebook API timeout value add_filter('facebook_pixel_api_timeout', function($timeout) { return 30; // 30 seconds timeout });
Received a fatal error this morning and have disabled plugin until resolved. Error Details ============= An error of type E_ERROR was caused in line 177 of the file /home/qo8uysg/public_html/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-business-sdk/src/FacebookAds/Http/Exception/RequestException.php. Error message: Uncaught FacebookAds\Http\Exception\ServerException: An unknown error occurred in /home/qo8uysg/public_html/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-business-sdk/src/FacebookAds/Http/Exception/RequestException.php:177 This reply was modified 6 months, 4 weeks ago by mfidelis .
Hi everyone, This issue is a top priority, we will share an update here as soon as the fix has been implemented and released. Kind regards, Marija
My previous temporary fix is worth nothing. Sorry.
Hi @ovidijusk – thanks for reaching out! We are aware of this issue and are working on a fix, which will be included in the coming releases. Please let us know if there’s anything else we can help you out with. Kind regards, Marija
Same issue here. I see other threads with same problem, so it is a serious bug and this is a long-standing problem. Can you provide me the Github repo’s link?
Temporary solution: make a file in the mu-plugins folder, add any name e.g. facebook-pixel-fix.php Add this code: <?php /** * Facebook Pixel temporary error fix */ // Temporarily disable the faulty async task add_filter('facebook_pixel_server_events_use_async', '__return_false'); // Or alternative solution: catch shutdown errors register_shutdown_function(function() { $error = error_get_last(); if ($error && strpos($error['message'], 'FacebookAds\Http\Exception\ServerException') !== false) { // Clear the error message error_clear_last(); // Log it but don't display it error_log('Facebook Pixel API error caught: ' . $error['message']); // Prevent fatal error from being displayed if (!headers_sent()) { header('HTTP/1.1 200 OK'); } } }); // Increase Facebook API timeout value add_filter('facebook_pixel_api_timeout', function($timeout) { return 30; // 30 seconds timeout });
Received a fatal error this morning and have disabled plugin until resolved. Error Details ============= An error of type E_ERROR was caused in line 177 of the file /home/qo8uysg/public_html/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-business-sdk/src/FacebookAds/Http/Exception/RequestException.php. Error message: Uncaught FacebookAds\Http\Exception\ServerException: An unknown error occurred in /home/qo8uysg/public_html/wp-content/plugins/official-facebook-pixel/vendor/facebook/php-business-sdk/src/FacebookAds/Http/Exception/RequestException.php:177 This reply was modified 6 months, 4 weeks ago by mfidelis .
Hi everyone, This issue is a top priority, we will share an update here as soon as the fix has been implemented and released. Kind regards, Marija
My previous temporary fix is worth nothing. Sorry.