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
Jyrki
Jyrki13mo ago
Check that you are on the latest versions, because it seems you are on an older Laravel version
Dennis Koch
Dennis Koch13mo ago
Doesn't even sound Filament related. Did you modify the EncryptCookies Middleware? Or do you have a custom middleware before that?
ianclemence
ianclemenceOP13mo ago
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.
Dennis Koch
Dennis Koch13mo ago
It just looks like on of your middlewares is passing or returning null instead of a response.
ianclemence
ianclemenceOP13mo ago
Finally fixed it. Problem was in the Handler.php
Want results from more Discord servers?
Add your server