F
Filament2mo ago
Hedi

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 again
No description
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.
Jump to solution
11 Replies
Dennis Koch
Dennis Koch2mo ago
Looks like Artisan Serve expects a 4-digit port, but was assigned a 5-digit port 🤔
Hedi
HediOP2mo ago
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 error
Dennis Koch
Dennis Koch2mo ago
What's :64153 from the error message then? 🤔
Hedi
HediOP2mo ago
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 browser
Hedi
HediOP2mo ago
im not sure if it helps, here's a video where i just simply refresh the same page until the error happens
Hedi
HediOP2mo ago
i dont even know what to look for to diagnose this
Hedi
HediOP2mo ago
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
No description
Hedi
HediOP2mo ago
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
No description
Hedi
HediOP2mo ago
No description
Hedi
HediOP2mo ago
at least now i dont have to re-run the php artisan serve command each time, i just have to reload
Solution
Hedi
Hedi2mo ago
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.

Did you find this page helpful?