I am also having this exact same problem! It started happening yesterday, whereas it was working perfectly fine the week before; the error is getting thrown on my custom auth middleware on the
return $next($request);
line. I'm going out of my mind trying to figure out what I did wrong!
Update: I kind of fixed it?? At least I'm not getting the error in my custom auth anymore... What I had to do was manipulate what was being returned by my API endpoint that I was hitting, as what it was trying to send back was the wrong datatype that my code was expecting. Check your route that you're hitting that's causing that error and try changing it to return something else. It sounds like it's coming from a redirect, so maybe the problem is in your web.php file??
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community