illegal offset type in tests

I have many of my tests fail with the same error, and not sure why.

As an example test that is failing, its complaining about the ->test line
    public function test_missing_fields_when_creating_user(): void
    {
        $this->tempUser->assignRole(RoleConstants::SUPER_ADMIN);

        Livewire::actingAs($this->tempUser)
            ->test(UserResource\Pages\CreateUser::class)
            ->call('create')
            ->assertHasErrors(['data.name', 'data.email', 'data.password', 'data.password_confirmation']);

        $this->tempUser->removeRole(RoleConstants::SUPER_ADMIN);
    }
image.png
Solution
I Finally found it.

So basically where im creating the temp users, I have to cast the uuid as a string when creating
        $user->id = (string) Str::uuid();


Else it was detecting as a LazyLoadFromUuid or some named object
Was this page helpful?