I already had this problem with laravel sanctium, it happens sometimes when you don't pass through your middleware (for my example i wasn't authenticated and tried to access to an auth route). I suggest you to put some logs in your middleware to make sure this doesn't happen.