Before migrating this project, I migrated another one and everything worked correctly, but in this one, when I log in I get the following error: “Entity::userName(): Return value must be of type string, null returned”
And I do not know what the problem is, can someone help me?
What I did was, I deleted all the folder I had, and let the v2025 create everything, and that’s when the error came up.
Now I had to do the same thing again, delete the whole folder but let the v2024 version generate everything, and with that I fixed the problem, but it is not the solution I am looking for.
There was no userName() method in Entity class of v2024, so there was no similar error. The error message means there is no user name field in your project.
If you are a registered user of v2025, you better send your project file and other required info to support.
Just Curious if you got an answer to this one @DGarza
i have the same issue on logins to an app (new version of 2025.3)
may need to submit a ticket otherwise.
Thanks
Regarding this issue, we’ve found that we get this error only if the users table used for security, and the users field have the same name.
For example, if I have a table “dbo.User”, and the field “User”, the we have the error.
Also, if the table name ends with an “s”, the file on “src/entity/” seems to strip this last “s”. For example, if the table name is “dbo.Users” and the field is “User”, this will also have the error.
You may post complete stack trace for discussion. Eable Debug, generate scripts again, run until you see the error, then copy the stack trace from the log. Also post the source of the error line.
If you are a registered user of v2025, you better send your project file and other required info to support directly.