-
Notifications
You must be signed in to change notification settings - Fork 777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Call to a member function forceFill() on null" Error when calling $user->createToken('Foo')->accessToken #713
Comments
Closing this issue because it's already solved, old or not relevant anymore. Feel free to reply if you're still experiencing this issue. |
Mention fix is already in new laravel update but i am still facing this issue. |
I'll try to look at this at a later time. In the meantime feel free to check if you can provide a failing test. |
what laravel update is supposed to fix this? I'm having the same issue. I'm on laravel 5.6.39 |
Yes i have also laravel 5.6.39, same issue here. The solution mention above is this #467. But you look in vendor TokenRepository, mention fix is already there, but issue still persist. |
Also i like to mention here that it is working fine in my local system, issue occurs on live server on production. May be some issue with timing, production server is fast so it try to executing something which is not initialize may be. |
Yes, same here. this error is only happening to me on a production server about 15-20 times per day. It does not happen every single time a user tries to log in, only intermittently. |
Any Update on this? |
@Ravi1990 still haven't found time yet. Can you please try upgrading to Laravel 5.7 and the latest Passport version and see if the problem persists? |
upgraded to Laravel 5.7 still same issue. |
Hi, i have found the issue it was because of Read & Write Connections i am using and was not using " 'sticky'=>true", so it write from one connection and read from another connection which was not updated as it was happening so fast on server. |
Sorry for the late reply! Yes that was the same issue me |
I also had the error on Laravel 5.6 using MySQL 5.7. so to describe main reason behind this cause is Read & Write Connections. |
My file have already 'sticky' => true but still show same error i am using laravel 6 . |
I added 'sticky' => true in my databse.php file but still, show the same error. I am using Laravel 7.21 and Postgres. |
I'm on Laravel 5.4 and MySQL 5.7 and this error still occur, but very rarely (like once/twice a month). Does anyone have the explaination for this? |
Same issue here as well |
Same issue as the one below link.
https://laracasts.com/discuss/channels/laravel/call-to-a-member-function-forcefill-on-null-error-when-calling-user-createtokentoken-accesstoken
This happens sometimes. It's not every time.
Do you have any idea of reason and solution?
The text was updated successfully, but these errors were encountered: