我有一个使用Laravel编写的后端服务器。最近我开始收到以下错误(我显示完整的追溯):
#0 /var/app/current/bootstrap/cache/compiled.php(7547): Illuminate\Routing\RouteCollection->match(Object(Illuminate\Http\Request))
#1 /var/app/current/bootstrap/cache/compiled.php(7512): Illuminate\Routing\Router->findRoute(Object(Illuminate\Http\Request))
#2 /var/app/current/bootstrap/cache/compiled.php(7504): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#3 /var/app/current/bootstrap/cache/compiled.php(2310): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#4 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#5 /var/app/current/bootstrap/cache/compiled.php(9642): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#6 /var/app/current/app/Http/Middleware/DecryptRequest.php(32): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#7 [internal function]: Garagesocial\Http\Middleware\DecryptRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#8 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#9 /var/app/current/app/Http/Middleware/ValidProxies.php(20): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#10 [internal function]: Garagesocial\Http\Middleware\ValidProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#11 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#12 /var/app/current/vendor/lucadegasperi/oauth2-server-laravel/src/Middleware/OAuthExceptionHandlerMiddleware.php(36): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#13 [internal function]: LucaDegasperi\OAuth2Server\Middleware\OAuthExceptionHandlerMiddleware->handle(Object(Illuminate\Http\Request), Object(Closure))
#14 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#15 /var/app/current/app/Http/Middleware/SplAutoLoader.php(20): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#16 [internal function]: Garagesocial\Http\Middleware\SplAutoLoader->handle(Object(Illuminate\Http\Request), Object(Closure))
#17 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#18 /var/app/current/bootstrap/cache/compiled.php(12993): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#19 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#20 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#21 /var/app/current/bootstrap/cache/compiled.php(11585): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#22 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#23 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#24 /var/app/current/bootstrap/cache/compiled.php(12730): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#25 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#26 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#27 /var/app/current/bootstrap/cache/compiled.php(12667): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#28 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#29 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#30 /var/app/current/bootstrap/cache/compiled.php(2982): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#31 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#32 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#33 /var/app/current/app/Http/Middleware/OAuth.php(46): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#34 [internal function]: Garagesocial\Http\Middleware\OAuth->handle(Object(Illuminate\Http\Request), Object(Closure))
#35 /var/app/current/bootstrap/cache/compiled.php(9634): call_user_func_array(Array, Array)
#36 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#37 /var/app/current/bootstrap/cache/compiled.php(9624): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#38 /var/app/current/bootstrap/cache/compiled.php(2257): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#39 /var/app/current/bootstrap/cache/compiled.php(2240): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#40 /var/app/current/public/index.php(65): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#41 {main}
起初我认为这是存储目录的权限问题,因此我尝试应用此修复程序 - PHP Beanstalk with laravel permission denied on storage/framework/cache当它没有帮助时,我尝试将缓存驱动程序从文件移动到数据库,但是也没有帮助。
查看错误的追溯,不是来自Laravel代码的第一个有用错误是#7,在DecryptRequest中。但是,这只是因为这是我的中间件列表中的最后一个类,如果我使用ValidProxies更改它,则错误最后显示ValidProxies。
该错误不会影响用户体验(除非我假设,因为问题似乎是缓存,因此速度方面)。该应用程序仍在正常运行。
对于我如何解决这个问题有任何想法。
答案 0 :(得分:0)
事实证明,该问题与许可无关。显然,当找不到路线时会发生错误。它没有说404并提供如此糟糕的信息,因为问题实际上发生在生成的优化文件bootstrap / cache / compiled.php中