频繁刷新就会出现Call to undefined method getRealIp()
Error: Call to undefined method Workerman\Protocols\Http\Request::getRealIp() in /www/wwwroot/webman/vendor/workerman/webman-framework/src/Exception/ExceptionHandler.php:68 Stack trace: #0 /www/wwwroot/webman/vendor/workerman/webman-framework/src/support/exception/Handler.php(35): Webman\Exception\ExceptionHandler->report() #1 /www/wwwroot/webman/vendor/workerman/webman-framework/src/App.php(280): support\exception\Handler->report() #2 /www/wwwroot/webman/vendor/workerman/webman-framework/src/App.php(354): Webman\App::exceptionResponse() #3 /www/wwwroot/webman/vendor/workerman/webman-framework/src/App.php(663): Webman\App::{closure:{closure:Webman\App::getCallback():349}:350}() #4 /www/wwwroot/webman/vendor/workerman/webman-framework/src/App.php(158): Webman\App::findRoute() #5 /www/wwwroot/webman/vendor/workerman/workerman/src/Connection/TcpConnection.php(679): Webman\App->onMessage() #6 /www/wwwroot/webman/vendor/workerman/workerman/src/Events/Swoole.php(288): Workerman\Connection\TcpConnection->baseRead() #7 [internal function]: Workerman\Events\Swoole->{closure:Workerman\Events\Swoole::safeCall():286}() #8 {main}
🤔🤔🤔🤔🤔🤔🤔
迷惑的很!!!!!求大佬神解释!!!!!
2025.10.12发现新问题:
如果出现以上报错。只需要访问一下其他页面就可以了。或者ctrl+f5刷新一下缓存也可以。
2025.10.12-19:22:58
老大说workerman更新了5.1.4。要我去试试。
目前还没出现Call to undefined method getRealIp()应该是稳了!!!!
等明天或者再次出现之后我再来更新
报错时发下调用栈
老大。发了!!!🤔🤔🤔
swoole作为驱动时有一定概率触发这个,刚发了workerman 5.1.4,更新后restart试下。
辛苦老大了!!!😊😊😊😊