Unable to access filament
I just installed Filament in my project and whenever I try to access the admin panel, I get a blank page. So I decided to check the logs and I found this error:
local.ERROR: Illuminate\Cookie\Middleware\EncryptCookies::encrypt(): Argument #1 ($response) must be of type Symfony\Component\HttpFoundation\Response, null given, called in D:\laragon\www\Idea-Voting\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php on line 67 {"exception":"[object] (TypeError(code: 0): Illuminate\\Cookie\\Middleware\\EncryptCookies::encrypt(): Argument #1 ($response) must be of type Symfony\\Component\\HttpFoundation\\Response, null given, called in D:\\laragon\\www\\Idea-Voting\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\EncryptCookies.php on line 67 at D:\\laragon\\www\\Idea-Voting\\vendor\\laravel\\framework\\src\\Illuminate\\Cookie\\Middleware\\EncryptCookies.php:170)
What might be the issue?5 Replies
Check that you are on the latest versions, because it seems you are on an older Laravel version
Doesn't even sound Filament related. Did you modify the EncryptCookies Middleware?
Or do you have a custom middleware before that?
I'm on the latest laravel version.
I haven't modified or added any custom middleware.
I can login into the panel when I visit
/admin/login
. But after I logout and try to access the /admin
it returns a blank page with the error above. Yet I should have been redirected to the login page.It just looks like on of your middlewares is passing or returning
null
instead of a response.Finally fixed it. Problem was in the Handler.php