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

PHP用語集

カテゴリー: エラーメッセージ  閲覧数:80 配信日:2023-12-23 11:30


エラーメッセージ


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


週間人気ページランキング / 1-30 → 2-5
順位 ページタイトル抜粋 アクセス数
1 Parse error: syntax error, unexpected 'public' (T_PUBLIC) | Parse error(エラーメッセージ) 10
2 ブラウザを閉じたらセッションデータはどうなるの? | セッション 9
3 curl で Cookie を使用する 4
3 Fatal error: Access level to ▲::$△ must be protected (as in class ●) or weaker | Fatal error(エラーメッセージ) 4
3 PHPで定数を定義する方法は2種類ある / 配列定数の定義 4
4 コード例 … 「例外処理」はネストすることができる 3
4 Warning: PDO::query(): LOAD DATA LOCAL INFILE forbidden | Warning(エラーメッセージ) 3
4 http_build_queryとは? / 構文 /パラメータ 3
4 Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting | エラーメッセージ 3
5 Fatal error: Cannot redeclare 関数名() (previously declared in ファイル名:○○) in ファイル名 | Fatal error(エラーメッセージ) 2
5 Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[28000] [1045] Access denied for user 'データベースユーザー名'@'localhost' (using password: YES)' | phpMyAdmin(データベース関連) 2
5 ( ! ) Fatal error: Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined | Fatal error(エラーメッセージ) 2
5 new clone違い | 演算子 2
5 オブジェクト関係マッピング | データベース関連 2
5 array_filter | 配列 2
6 Fatal error: Uncaught Error: Call to a member function modify() on string | Fatal error(エラーメッセージ) 1
6 Fatal error: require_once(): Failed opening required 'PEAR.php' | Fatal error(エラーメッセージ) 1
6 セッション単位 | セッション 1
6 htmlspecialchars / htmlentities / addslashes / mysql_real_escape_string / mysqli_real_escape_string | セキュリティ 1
6 dirname() / (__FILE__ ) / basename( dirname( __FILE__ ) ); | 関数 1
2025/2/6 1:02 更新
指定期間人気ページランキング / 2020-5-28 → 2025-2-5
順位 ページタイトル抜粋 アクセス数
1 PHP用語 6672
2 ブラウザを閉じたらセッションデータはどうなるの? | セッション 2434
3 Parse error: syntax error, unexpected 'public' (T_PUBLIC) | Parse error(エラーメッセージ) 2362
4 ブラウザを閉じたらセッションデータはどうなるの? | セッション 1607
5 【テスト投稿】テスト | 1133
6 セッション管理が必要な理由は、HTTPプロトコルには状態を保持する機能がないため | セッション 1006
7 PHPで定数を定義する方法は2種類ある / 配列定数の定義 880
8 Fatal error: Access level to ▲::$△ must be protected (as in class ●) or weaker | Fatal error(エラーメッセージ) 830
9 Fatal error: Uncaught Error: Call to a member function modify() on string | Fatal error(エラーメッセージ) 805
10 コード例 … 「例外処理」はネストすることができる 803
11 Fatal error: require_once(): Failed opening required 'PEAR.php' | Fatal error(エラーメッセージ) 788
12 curl で Cookie を使用する 772
13 定数 711
14 Fatal error: Uncaught RuntimeException: SplFileObject::__construct(): failed to open stream: Permission denied in | Fatal error(エラーメッセージ) 700
15 インターフェイス | クラスとオブジェクト 693
16 Fatal error: Uncaught HeadlessChromium\Exception\OperationTimedOut: Operation timed out (3sec) in | Fatal error(エラーメッセージ) 664
17 メンバー | クラスとオブジェクト 644
18 Warning: include() [function.include]: Failed opening '**.php' for inclusion (in | Warning(エラーメッセージ) 621
19 ( ! ) Fatal error: Uncaught PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column | Fatal error(エラーメッセージ) 591
20 Composer | 依存関係マネージャ 563
2025/2/6 1:02 更新