Debug method for tampered data

Is there a good method to debug this Exception message?

Livewire encountered corrupt data when trying to hydrate the [form-component] component. Ensure that the [name, id, data] of the Livewire component wasn’t tampered with between requests.

The only time I’ve run into this is when you have an array full of nested objects.

If that’s the case here:
If you need to model anything in js, you will have to manually convert all the nested objects into arrays.
If not, make it a protected property, query it again in hydrate(), and let your view compiler handle it instead of livewire.

1 Like

Thank you for the fast reply! I will try it. I have a form with select2 which get the options via ajax. When I select a value, then the error is thrown.

I could not manage it. What I need is a way to debug it. So what is actually causing this error. As I understand (but I am new to livewire) there is a checksumcheck, so I would like to log the data which are checked and then I could compare and see where the problem lies?

@xxdalexx thanks for this - would have spent hours without figuring out why it happens. Had a model which was not converted to an array in a public property. The message is quite misleading as well …