Valet: Valet shows blank page in the browser

Created on 19 Jul 2018  路  4Comments  路  Source: laravel/valet

When i open [any project].test in the browser, it just shows a blank screen. Inspecting the page shows some empty boilerplate:

<html>
  <head></head>
  <body></body>
</html>

And "view page source" brings up a completely blank document, not even boilerplate. No errors in the console, Symptoms seem similar to #462 except that I never ran valet secure (only installed valet last week for the first time). There are no errors in the browser console and no logs in /valet/Log/nginx-error.log

Valet was working fine initially, but stopped working at some point while I was troubleshooting some issues with mysql. While I was troubleshooting, I updated my php from 7.1.[something, can't remember] to 7.2.7

I also uninstalled and reinstalled homebrew. My best guess is that one or both of those two actions broke valet.

I can still serve normally using php artisan serve. When I do that with phpinfo(), it shows 7.2.7. I haven't been able to double-check phpinfo() with valet, because valet can't serve any files.

I've already tried various solutions found on SO & github:

  • stopping and starting valet
  • uninstalling and installing laravel and valet
  • brew unlink and brew link php versions
  • brew services stop and brew services start php versions

My info:
Homebrew 1.7.0
php 7.2.7
Valet 2.0.12
Laravel 5.6.27
Composer 1.6.5
High Sierra 10.13.6

Most helpful comment

I know this thread is over a year old, but in case any one else comes across this and has the same problem: I had the same thing happen and realized it was because I had an error in my .env file. (I had forgotten to put quotes around a value that had a space in it, i.e. MAIL_FROM_NAME=Jane Doe vs MAIL_FROM_NAME="Jane Doe"). Correcting the .env fixed this behavior.

All 4 comments

This error appears to have resolved itself.

Only reason I can think of is that I ran brew cleanup the other day when working on a different project. I don't recall running that when I was troubleshooting before, so if anyone finds this issue, try brew cleanup

I had the same problem, after updating php 7.0 to php 7.2 (and valet to 2.x etc). In my case a simple reboot fixed it.

it seems its laravel problem . laravel cache:clear command cant remove views generated files . go to storage-> framework->views then remove all generated files manually

I know this thread is over a year old, but in case any one else comes across this and has the same problem: I had the same thing happen and realized it was because I had an error in my .env file. (I had forgotten to put quotes around a value that had a space in it, i.e. MAIL_FROM_NAME=Jane Doe vs MAIL_FROM_NAME="Jane Doe"). Correcting the .env fixed this behavior.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TimOgilvy picture TimOgilvy  路  3Comments

marianvlad picture marianvlad  路  5Comments

EHLOVader picture EHLOVader  路  4Comments

hsleewis picture hsleewis  路  5Comments

Flimm picture Flimm  路  5Comments