I am migrating a project and found an issue I can’t resolve.
Here are the details:
Versions after migration
Filament: v4.0 (from v3.2.117)
PHP: 8.3 (from 8.2)
Laravel: 12.26.3 (from 11.44.0)
Livewire: 3.6.4 (from 3.5.6)
Problem
When loading the login route, I get the following error:
local.ERROR: IlluminateSupportViewErrorBag::put():
Argument #2 ($bag) must be of type IlluminateContractsSupportMessageBag, null given,
called in /vendor/livewire/livewire/src/Features/SupportValidation/SupportValidation.php on line 21
Trace points to SupportValidation->render() and ViewErrorBag->put() receiving null instead of a MessageBag.
Temporary workaround
To bypass this, I temporarily patched SupportValidation and SupportTesting in the vendor/ folder so that a new MessageBag instance is created when getErrorBag() is null. Example (simplified):
if (! $bag instanceof MessageBag) {
$bag = new MessageBag((array) $bag);
if (method_exists($this->component, 'setErrorBag')) {
$this->component->setErrorBag($bag);
}
}
**With this hack:
The login page renders correctly.
Authentication works (confirmed via browser dev tools and Laravel logs).
But the redirect after login does not happen** — the user stays on the login page even though authentication is successful.
What I tried:
-
Verified that the user is authenticated (Auth::check() returns true).
-
Logs confirm login success (tail -f storage/logs/laravel.log).
-
Without patching the vendor files, the login page never renders (due to the null MessageBag error).
-
With patching, page renders but redirect is broken.
Questions
1 – Is this a known issue with Filament v4 + Livewire 3.6.x during login?
2 – Should I be initializing the MessageBag in a different way rather than patching vendor code?
3 – Why would the redirect fail even though authentication succeeds?
Unfortunately, my project is private, but I can try to create a minimal reproduction repo if needed.
Any help or guidance would be appreciated.