yuanzhihai / easyhttp

轻量级、语义化、对IDE友好的HTTP客户端
MIT License
37 stars 3 forks source link

Call to a member function getHeaders() on null #16

Open iYting opened 2 months ago

iYting commented 2 months ago

系统偶尔报错Call to a member function getHeaders() on null, 重启下webman就好了,但是过了一会又报相同的错。下面是报错信息 "Error: Call to a member function getHeaders() on null in /app/vendor/yzh52521/easyhttp/src/Request.php:381\nStack trace:\n#0 [internal function]: yzh52521\\EasyHttp\\Request->yzh52521\\EasyHttp\\{closure}(Object(GuzzleHttp\\Psr7\\Request), NULL, Object(GuzzleHttp\\Exception\\ConnectException))\n#1 /app/vendor/yzh52521/easyhttp/src/Logger.php(178): call_user_func(Object(Closure), Object(GuzzleHttp\\Psr7\\Request), NULL, Object(GuzzleHttp\\Exception\\ConnectException))\n#2 /app/vendor/yzh52521/easyhttp/src/Logger.php(141): yzh52521\\EasyHttp\\Logger->getLogMessage(Object(GuzzleHttp\\Psr7\\Request), NULL, Object(GuzzleHttp\\Exception\\ConnectException))\n#3 /app/vendor/yzh52521/easyhttp/src/Logger.php(244): yzh52521\\EasyHttp\\Logger->log(Object(GuzzleHttp\\Psr7\\Request), NULL, Object(GuzzleHttp\\Exception\\ConnectException))\n#4 /app/vendor/guzzlehttp/promises/src/RejectedPromise.php(49): yzh52521\\EasyHttp\\Logger->yzh52521\\EasyHttp\\{closure}(Object(GuzzleHttp\\Exception\\ConnectException))\n#5 /app/vendor/guzzlehttp/promises/src/TaskQueue.php(52): GuzzleHttp\\Promise\\RejectedPromise::GuzzleHttp\\Promise\\{closure}()\n#6 /app/vendor/guzzlehttp/promises/src/Promise.php(251): GuzzleHttp\\Promise\\TaskQueue->run(true)\n#7 /app/vendor/guzzlehttp/promises/src/Promise.php(227): GuzzleHttp\\Promise\\Promise->invokeWaitFn()\n#8 /app/vendor/guzzlehttp/promises/src/Promise.php(272): GuzzleHttp\\Promise\\Promise->waitIfPending()\n#9 /app/vendor/guzzlehttp/promises/src/Promise.php(229): GuzzleHttp\\Promise\\Promise->invokeWaitList()\n#10 /app/vendor/guzzlehttp/promises/src/Promise.php(69): GuzzleHttp\\Promise\\Promise->waitIfPending()\n#11 /app/vendor/guzzlehttp/guzzle/src/Client.php(189): GuzzleHttp\\Promise\\Promise->wait()\n#12 /app/vendor/yzh52521/easyhttp/src/Request.php(579): GuzzleHttp\\Client->request('POST', 'https://open.do...', Array)\n#13 /app/vendor/yzh52521/easyhttp/src/Request.php(442): yzh52521\\EasyHttp\\Request->request('POST', 'https://open.do...', Array)\n#14 /app/app/common/tiktok/TikTok.php(102): yzh52521\\EasyHttp\\Request->post('https://open.do...', Array)\n#15 /app/app/common/tiktok/TikTok.php(82): app\\common\\tiktok\\TikTok::httpPost('https://open.do...', Array)\n#16 /app/plugin/admin/app/controller/qualificationsController.php(42): app\\common\\tiktok\\TikTok->getQualifications(10, 1, NULL)\n#17 /app/vendor/workerman/webman-framework/src/App.php(319): plugin\\admin\\app\\controller\\QualificationsController->select(Object(support\\Request))\n#18 /app/vendor/workerman/webman-framework/src/App.php(349): Webman\\App::Webman\\{closure}(Object(support\\Request))\n#19 /app/plugin/admin/app/middleware/Init.php(18): Webman\\App::Webman\\{closure}(Object(support\\Request))\n#20 /app/vendor/workerman/webman-framework/src/App.php(341): plugin\\admin\\app\\middleware\\Init->process(Object(support\\Request), Object(Closure))\n#21 /app/plugin/admin/app/middleware/AccessControl.php(47): Webman\\App::Webman\\{closure}(Object(support\\Request))\n#22 /app/vendor/workerman/webman-framework/src/App.php(341): plugin\\admin\\app\\middleware\\AccessControl->process(Object(support\\Request), Object(Closure))\n#23 /app/vendor/workerman/webman-framework/src/App.php(168): Webman\\App::Webman\\{closure}(Object(support\\Request))\n#24 /app/vendor/workerman/workerman/Connection/TcpConnection.php(646): Webman\\App->onMessage(Object(Workerman\\Connection\\TcpConnection), Object(support\\Request))\n#25 [internal function]: Workerman\\Connection\\TcpConnection->baseRead(Resource id #414, 2, Resource id #414)\n#26 /app/vendor/workerman/workerman/Events/Event.php(193): EventBase->loop()\n#27 /app/vendor/workerman/workerman/Worker.php(1638): Workerman\\Events\\Event->loop()\n#28 /app/vendor/workerman/workerman/Worker.php(1429): Workerman\\Worker::forkOneWorkerForLinux(Object(Workerman\\Worker))\n#29 /app/vendor/workerman/workerman/Worker.php(1403): Workerman\\Worker::forkWorkersForLinux()\n#30 /app/vendor/workerman/workerman/Worker.php(1788): Workerman\\Worker::forkWorkers()\n#31 /app/vendor/workerman/workerman/Worker.php(1724): Workerman\\Worker::monitorWorkersForLinux()\n#32 /app/vendor/workerman/workerman/Worker.php(562): Workerman\\Worker::monitorWorkers()\n#33 /app/vendor/workerman/webman-framework/src/support/App.php(131): Workerman\\Worker::runAll()\n#34 /app/start.php(4): support\\App::run()\n#35 {main}"