Fatal error: Uncaught Wrench\Exception\HandshakeException: No accept header receieved on handshake response in ★★★ headless-chromium-php/vendor/wrench/wrench/lib/Wrench/Protocol/Protocol.php

エラーメッセージ

目次一覧

 状態:完了  閲覧数:73  投稿日:2023-12-23  更新日:2023-12-23  
エラーメッセージ / エラー原因 / エラー対応

エラーメッセージ / エラー原因 / エラー対応

 閲覧数:20 投稿日:2023-12-23 更新日:2023-12-23 

エラーメッセージ


Fatal error: Uncaught Wrench\Exception\HandshakeException: No accept header receieved on handshake response in ★★★ headless-chromium-php/vendor/wrench/wrench/lib/Wrench/Protocol/Protocol.php

エラー原因


「Chrome PHP」のバージョンが低いから
This issue has been resolved in chrome-php/chrome v1.8.1
PHP chrome-php / headless-chromium-php error

This issue has been resolved in v1.8.1 of chrome-php/chrome.
Fatal error: No accept header received on handshake response · Issue #11 · chrome-php/wrench

エラー対応


「Chrome PHP」をバージョンアップ
Composerを使用してchrome-php/chromeパッケージを特定のバージョンにアップデートするには、以下のコマンドを使用します。
具体的には、composer requireコマンドを使用してバージョン1.8.1を指定します。
$ composer require chrome-php/chrome:^1.8.1
./composer.json has been updated
Running composer update chrome-php/chrome
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
6 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found


このコマンドは、composer.jsonファイルのrequireセクションを更新し、chrome-php/chromeパッケージを指定したバージョンにアップデートします。
その後、必要に応じて依存関係を解決して更新します。
なお、^はキャレット演算子で、指定されたメジャーバージョンの変更を許可します。

$ less composer.json
{
   "require": {
       "chrome-php/chrome": "^1.8.1"
   }
}

ファイルの最後に到達したら q キーを押して閉じることができます。
q

$ composer show chrome-php/chrome
name     : chrome-php/chrome
descrip. : Instrument headless chrome/chromium instances from PHP
keywords : browser, chrome, chromium, crawl, headless, pdf, puppeteer, screenshot
versions : * v1.10.0
type     : library
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
homepage :
source   : [git] https://github.com/chrome-php/chrome.git 2b7cb13e618602d13bdede20b6b7ae478f3f6eaa
dist     : [zip] https://api.github.com/repos/chrome-php/chrome/zipball/2b7cb13e618602d13bdede20b6b7ae478f3f6eaa 2b7cb13e618602d13bdede20b6b7ae478f3f6eaa
path     : /var/www/html/w4c.work/php-demo.w4c.work/demo/screen-capture/headless-chromium-php/vendor/chrome-php/chrome
names    : chrome-php/chrome

support
issues : https://github.com/chrome-php/chrome/issues
source : https://github.com/chrome-php/chrome/tree/v1.10.0

autoload
psr-4
HeadlessChromium\ => src/

requires
chrome-php/wrench ^1.5
evenement/evenement ^3.0.1
monolog/monolog ^1.27.1 || ^2.8 || ^3.2
php ^7.4.15 || ^8.0.2
psr/log ^1.1 || ^2.0 || ^3.0
symfony/filesystem ^4.4 || ^5.0 || ^6.0 || ^7.0
symfony/polyfill-mbstring ^1.26
symfony/process ^4.4 || ^5.0 || ^6.0 || ^7.0

requires (dev)
bamarni/composer-bin-plugin ^1.8.2
phpunit/phpunit ^9.6.3 || ^10.0.12
symfony/var-dumper ^4.4 || ^5.0 || ^6.0 || ^7.0



( ! ) Deprecated: implode(): Passing glue string after array is deprecated. Swap the parameters in ★★★ headless-chromium-php/vendor/wrench/wrench/lib/Wrench/Protocol/Protocol.php

T_CONSTANT_ENCAPSED_STRING

コメント投稿(ログインが必要)



類似度ページランキング
順位 ページタイトル抜粋
1 Fatal error: Uncaught exception 'ImagickException' with message 'WriteBlob Failed 19
2 Fatal error: Uncaught Error: Class 'Mecab_Tagger' not found in /var/www/ 19
3 Fatal error: Uncaught Wrench\Exception\HandshakeException: No accept header receieved on handshake response in 18
4 Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting 18
5 ( ! ) Fatal error: Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined 18
6 ( ! ) Fatal error: Uncaught Abraham\TwitterOAuth\TwitterOAuthException: timed out before SSL handshake 18
7 ( ! ) Fatal error: Uncaught Abraham\TwitterOAuth\TwitterOAuthException 18
8 ( ! ) Warning: Declaration of xxxx should be compatible with 18
9 Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused 17
10 Fatal error: Uncaught Error: Class 'Stripe\Checkout\Session' not found 17
11 Fatal error: Using $this when not in object context in /○○.php on line △△ 17
12 Fatal error: Uncaught HeadlessChromium\Exception\OperationTimedOut: Operation timed out (3sec) in 17
13 Fatal error: Uncaught exception 'ImagickException' with message 'unable to open image ` 17
14 Fatal error: Uncaught Dotenv\Exception\InvalidFileException: Dotenv values containing spaces must be surrounded by quotes. 17
15 Fatal error: Function name must be a string in /○○.php on line △△ 16
16 Fatal error: Call-time pass-by-reference has been removed in 16
17 ( ! ) Fatal error: Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens 16
18 ( ! ) Fatal error: Uncaught Abraham\TwitterOAuth\TwitterOAuthException: 現在この機能は一時的にご利用いただけません 16
19 Parse error: syntax error, unexpected T_INCLUDE, expecting T_FUNCTION 16
20 Parse error: syntax error, unexpected T_REQUIRE, expecting T_FUNCTION 16
2024/4/27 16:18 更新
週間人気ページランキング / 4-20 → 4-26
順位 ページタイトル抜粋 アクセス数
1 Parse error: syntax error, unexpected 'public' (T_PUBLIC) | Parse error(エラーメッセージ) 16
2 ブラウザを閉じたらセッションデータはどうなるの? | セッション 14
3 PHPで定数を定義する方法は2種類ある / 配列定数の定義 8
4 curl で Cookie を使用する 7
5 Fatal error: Access level to ▲::$△ must be protected (as in class ●) or weaker | Fatal error(エラーメッセージ) 5
5 Warning: strlen() expects parameter 1 to be string, array given in ○○.php on line △△ | Warning(エラーメッセージ) 5
6 コード例 … 「例外処理」はネストすることができる 4
6 Composer | 依存関係マネージャ 4
6 ブラウザを閉じたらセッションデータはどうなるの? | セッション 4
7 型の種類 | 型 3
7 例外処理 | 制御構造 3
7 or(||) | 演算子 3
7 セッション名 | セッション 3
7 セッション管理が必要な理由は、HTTPプロトコルには状態を保持する機能がないため | セッション 3
7 register_shutdown_function | 関数処理 関数 3
7 Fatal error: Uncaught Error: Call to a member function modify() on string | Fatal error(エラーメッセージ) 3
7 ( ! ) Fatal error: Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined | Fatal error(エラーメッセージ) 3
8 SHA-1(Secure Hash Algorithm 1) | 関数 2
8 スコープ | 変数 2
8 static修飾子 | クラスとオブジェクト 2
2024/4/27 1:01 更新