Livewire/filament bug?

I all of a sudden encounter; Livewire\Exceptions\CorruptComponentPayloadException POST /livewire/message/app.filament.resources.vending-machine-resource.pages.view-vending-machine Livewire encountered corrupt data when trying to hydrate the [app.filament.resources.vending-machine-resource.pages.view-vending-machine] component. Ensure that the [name, id, data] of the Livewire component wasn't tampered with between requests. When opening an action modal. I didn't update anything on the page. I'm on the latest version of filament v2.
5 Replies
toeknee
toeknee2y ago
This is usally caused by you adjusting the data in the form from the phpside and not livewire
Robin
RobinOP2y ago
The action I have is this one:
Action::make('Update')
->color('secondary')
->requiresConfirmation()
->modalHeading('Update')
->modalSubheading('The device will pull the latest changes from the git repo and restart the service. During restart, the device is unresponsive.')
->action(function (): void {
event(new Update($this->record));
}),
Action::make('Update')
->color('secondary')
->requiresConfirmation()
->modalHeading('Update')
->modalSubheading('The device will pull the latest changes from the git repo and restart the service. During restart, the device is unresponsive.')
->action(function (): void {
event(new Update($this->record));
}),
Nothing else that's fancy on that page
toeknee
toeknee2y ago
That looks like why, what is new Update() ? Is it changing $this->record which is used as the livewire component? Are you trying to refresh the data on the the page? $this->refresh is usually how you refresh the data, as changing the data directly in record will fall over since it does not match what is in the browser
Robin
RobinOP2y ago
Aha! Yep, so apparently, the data of the whole model gets loaded then, so there was an "append" added on the model that didn't work. That's why it crashed when opening. Stupid mistake, thanks for rubberducking 😅
toeknee
toeknee2y ago
Yep! no problem

Did you find this page helpful?