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

Error appears at the end of crawling #898

Closed
Olwyne opened this issue May 4, 2023 · 2 comments
Closed

Error appears at the end of crawling #898

Olwyne opened this issue May 4, 2023 · 2 comments

Comments

@Olwyne
Copy link

Olwyne commented May 4, 2023

Describe the bug
On WP2Static 7.2, the following error appears at the end of crawling :

PHP Fatal error:  Uncaught TypeError: WP2Static\Crawler::WP2Static\{closure}(): Argument #1 ($reason) must be of type WP2StaticGuzzleHttp\Exception\RequestException, WP2StaticGuzzleHttp\Exception\ConnectException given in /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/src/Crawler.php:235
Stack trace:
#0 [internal function]: WP2Static\Crawler->WP2Static\{closure}(Object(WP2StaticGuzzleHttp\Exception\ConnectException), 10, Object(WP2StaticGuzzleHttp\Promise\Promise))
#1 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/EachPromise.php(191): call_user_func(Object(Closure), Object(WP2StaticGuzzleHttp\Exception\ConnectException), 10, Object(WP2StaticGuzzleHttp\Promise\Promise))
#2 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(204): WP2StaticGuzzleHttp\Promise\EachPromise->WP2StaticGuzzleHttp\Promise\{closure}(Object(WP2StaticGuzzleHttp\Exception\ConnectException))
#3 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(153): WP2StaticGuzzleHttp\Promise\Promise::callHandler(2, Object(WP2StaticGuzzleHttp\Exception\ConnectException), NULL)
#4 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/TaskQueue.php(48): WP2StaticGuzzleHttp\Promise\Promise::WP2StaticGuzzleHttp\Promise\{closure}()
#5 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlMultiHandler.php(158): WP2StaticGuzzleHttp\Promise\TaskQueue->run()
#6 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlMultiHandler.php(183): WP2StaticGuzzleHttp\Handler\CurlMultiHandler->tick()
#7 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(248): WP2StaticGuzzleHttp\Handler\CurlMultiHandler->execute(true)
#8 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(224): WP2StaticGuzzleHttp\Promise\Promise->invokeWaitFn()
#9 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(269): WP2StaticGuzzleHttp\Promise\Promise->waitIfPending()
#10 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(226): WP2StaticGuzzleHttp\Promise\Promise->invokeWaitList()
#11 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(62): WP2StaticGuzzleHttp\Promise\Promise->waitIfPending()
#12 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/EachPromise.php(115): WP2StaticGuzzleHttp\Promise\Promise->wait()
#13 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(248): WP2StaticGuzzleHttp\Promise\EachPromise->WP2StaticGuzzleHttp\Promise\{closure}(true)
#14 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(224): WP2StaticGuzzleHttp\Promise\Promise->invokeWaitFn()
#15 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(62): WP2StaticGuzzleHttp\Promise\Promise->waitIfPending()
#16 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/src/Crawler.php(246): WP2StaticGuzzleHttp\Promise\Promise->wait()
#17 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/src/Crawler.php(95): WP2Static\Crawler->crawlSite('/var/www/cdv-re...')
#18 /var/www/cdv-refonte/wordpress/wp-includes/class-wp-hook.php(308): WP2Static\Crawler::wp2staticCrawl('/var/www/cdv-re...', 'wp2static')
#19 /var/www/cdv-refonte/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
#20 /var/www/cdv-refonte/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#21 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/src/Controller.php(821): do_action('wp2static_crawl', '/var/www/cdv-re...', 'wp2static')
#22 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/src/CLI.php(714): WP2Static\Controller::wp2staticCrawl()
#23 [internal function]: WP2Static\CLI->crawl(Array, Array)
#24 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func(Array, Array, Array)
#25 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array, Array)
#26 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(491): call_user_func(Object(Closure), Array, Array)
#27 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(419): WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array)
#28 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(442): WP_CLI\Runner->run_command(Array, Array)
#29 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1256): WP_CLI\Runner->run_command_and_exit()
#30 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
#31 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))
#32 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()
#33 phar:///usr/local/bin/wp/php/boot-phar.php(11): include('phar:///usr/loc...')
#34 /usr/local/bin/wp(4): include('phar:///usr/loc...')
#35 {main}
  thrown in /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/src/Crawler.php on line 235
Fatal error: Uncaught TypeError: WP2Static\Crawler::WP2Static\{closure}(): Argument #1 ($reason) must be of type WP2StaticGuzzleHttp\Exception\RequestException, WP2StaticGuzzleHttp\Exception\ConnectException given in /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/src/Crawler.php:235
Stack trace:
#0 [internal function]: WP2Static\Crawler->WP2Static\{closure}(Object(WP2StaticGuzzleHttp\Exception\ConnectException), 10, Object(WP2StaticGuzzleHttp\Promise\Promise))
#1 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/EachPromise.php(191): call_user_func(Object(Closure), Object(WP2StaticGuzzleHttp\Exception\ConnectException), 10, Object(WP2StaticGuzzleHttp\Promise\Promise))
#2 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(204): WP2StaticGuzzleHttp\Promise\EachPromise->WP2StaticGuzzleHttp\Promise\{closure}(Object(WP2StaticGuzzleHttp\Exception\ConnectException))
#3 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(153): WP2StaticGuzzleHttp\Promise\Promise::callHandler(2, Object(WP2StaticGuzzleHttp\Exception\ConnectException), NULL)
#4 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/TaskQueue.php(48): WP2StaticGuzzleHttp\Promise\Promise::WP2StaticGuzzleHttp\Promise\{closure}()
#5 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlMultiHandler.php(158): WP2StaticGuzzleHttp\Promise\TaskQueue->run()
#6 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticguzzle/src/Handler/CurlMultiHandler.php(183): WP2StaticGuzzleHttp\Handler\CurlMultiHandler->tick()
#7 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(248): WP2StaticGuzzleHttp\Handler\CurlMultiHandler->execute(true)
#8 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(224): WP2StaticGuzzleHttp\Promise\Promise->invokeWaitFn()
#9 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(269): WP2StaticGuzzleHttp\Promise\Promise->waitIfPending()
#10 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(226): WP2StaticGuzzleHttp\Promise\Promise->invokeWaitList()
#11 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(62): WP2StaticGuzzleHttp\Promise\Promise->waitIfPending()
#12 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/EachPromise.php(115): WP2StaticGuzzleHttp\Promise\Promise->wait()
#13 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(248): WP2StaticGuzzleHttp\Promise\EachPromise->WP2StaticGuzzleHttp\Promise\{closure}(true)
#14 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(224): WP2StaticGuzzleHttp\Promise\Promise->invokeWaitFn()
#15 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/vendor/leonstafford/wp2staticpromises/src/Promise.php(62): WP2StaticGuzzleHttp\Promise\Promise->waitIfPending()
#16 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/src/Crawler.php(246): WP2StaticGuzzleHttp\Promise\Promise->wait()
#17 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/src/Crawler.php(95): WP2Static\Crawler->crawlSite('/var/www/cdv-re...')
#18 /var/www/cdv-refonte/wordpress/wp-includes/class-wp-hook.php(308): WP2Static\Crawler::wp2staticCrawl('/var/www/cdv-re...', 'wp2static')
#19 /var/www/cdv-refonte/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
#20 /var/www/cdv-refonte/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#21 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/src/Controller.php(821): do_action('wp2static_crawl', '/var/www/cdv-re...', 'wp2static')
#22 /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/src/CLI.php(714): WP2Static\Controller::wp2staticCrawl()
#23 [internal function]: WP2Static\CLI->crawl(Array, Array)
#24 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func(Array, Array, Array)
#25 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array, Array)
#26 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(491): call_user_func(Object(Closure), Array, Array)
#27 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(419): WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array)
#28 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(442): WP_CLI\Runner->run_command(Array, Array)
#29 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1256): WP_CLI\Runner->run_command_and_exit()
#30 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
#31 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))
#32 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()
#33 phar:///usr/local/bin/wp/php/boot-phar.php(11): include('phar:///usr/loc...')
#34 /usr/local/bin/wp(4): include('phar:///usr/loc...')
#35 {main}
  thrown in /var/www/cdv-refonte/wordpress/wp-content/plugins/wp2static/src/Crawler.php on line 235

To Reproduce
Steps to reproduce the behavior:

  1. Go to your server with terminal
  2. Execute a script with this command :
/usr/local/bin/wp package install wp-media/wp-rocket-cli
/usr/local/bin/wp wp2static detect
/usr/local/bin/wp wp2static crawl
/usr/local/bin/wp wp2static post_process
  1. Wait the end of crawling
  2. See error

Expected behavior
No error should appear on the logs.

Environment (please complete the following information):

  • Hosting OS: MacOS 12.6.3,
  • Web server setup : Docker
  • Hosting company : local computer
@yashumitsu
Copy link

Here is the solution: #866 (comment)

@Olwyne
Copy link
Author

Olwyne commented May 5, 2023

Thanks !

@Olwyne Olwyne closed this as completed May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants