Hi everyone,
I do not know why this error message appears.
I am checking that the email address is not empty and besides the photo of the user is showing correctly.

This is the formula to get the picture:
If(
!IsBlank(CurrentUserEmail.Text)
And Office365Users.UserPhotoMetadata(CurrentUserEmail.Text).HasPhoto,
Office365Users.UserPhotoV2(CurrentUserEmail.Text)
)
In the Powerapps designer the error is not showing.
Thanks for any help!