Failed to extract the request port. Ensure the log line contains a valid port: [Wed Dec 18 18:57:35
hello, i keep getting this error and the
php artisan serve
stops working and i have to re-run it, this error appeared only after i installed filamentphp. has anyone experiened this error?
i tried to use different ports but it happens randomly and i have to re-run the artisan serve until the error randomly happens againSolution:Jump to solution
i couldn't find why this problem is occuring, but this custom function inside laravel's ServeCommand.php somehow minimized the problematics. so i'm gonna close this.
11 Replies
Looks like Artisan Serve expects a 4-digit port, but was assigned a 5-digit port π€
the port im using is 8000, but i also tried port 80 and 5000. i still get this error. could it be because im also running
npm run dev
for my vue+inertia front-end?
nope i stopped the npm run dev
i still get this errorWhat's
:64153
from the error message then? π€uhh i have no idea actually, i said maybe it's
npm run dev
because vite sends js and css files on different ports from what i see in the network tab in inspect tab of the browserim not sure if it helps, here's a video where i just simply refresh the same page until the error happens
i dont even know what to look for to diagnose this
so i added this echo to this function where the error occurs, it looks like this error only happens when the text contains this text
Closed without sending a request; it was probably just an unused speculative preconnection
i dont know what's the underlying problem, i managed to prevent that error using this function, but when the error happens laravel returns an empty page with the below error
at least now i dont have to re-run the php artisan serve command each time, i just have to reload
Solution
i couldn't find why this problem is occuring, but this custom function inside laravel's ServeCommand.php somehow minimized the problematics. so i'm gonna close this.