If you're seeing the error "Whoops. Something went wrong" with no other output on the screen and a status code of 500, you'll need to turn on debug mode or look at the log file in
It's generally not a good idea to enable debugging in a production app. Instead look at the error logs in
There are many reasons why you might trigger a 500 error (misconfigured
.env file, etc), but we won't be able to help you unless you can provide us with a stacktrace, either by enabling debug mode, or by looking in your app logs, located at
To enable debug mode:
- Open your
.envfile and change
- From the command line at your Snipe-IT project root, run
php artisan config:clear
It is quite literally impossible for us to be able to assist you with a 500 "Whoops" error without additional information. The stack trace tells us where the error is occurring, and what might have triggered it.
When debug is enabled, you'll see a long stack trace on your screen:
In order to be able to see what's happening on your install (what specific errors you're triggering), we need the entire stack trace from that page, or as much of the app error log as is possible.
When opening a Github issue and providing the stack trace, please copy+paste the errors into the Github issue. Do not attach them as files. If you're not familiar with GH Markdown, we'll reformat it for you to make it more readable.
If for some reason you cannot enable debug but you have access to the app logs, the easiest way to provide us with ONLY the relevant information (which will make it easier for us to troubleshoot your issue), is to tail the log file and then trigger the error.
Tailing a Log File on Linux/OSX
Type the following into a Linux command line prompt at your Snipe-IT project root:
tail -f storage/logs/laravel.log
Then trigger the error again, which would give you output like this:
You can then copy and paste that, or you can tail the error log and output the relevant information into a file:
tail -f storage/logs/laravel.log > snipe-logfile.txt
Tailing the Log File on IIS:
To tail a log file on IIS, you can use Powershell:
Get-Content C:\inetpub\wwwroot\snipe-it\storage\logs\laravel.log -Wait
If you're not comfortable with Powershell, see the other options available to Windows users at this StackOverflow article.
Then copy and paste the contents of that file into the Github issue. (Remember, don't attach it, paste it in.) Be sure to redact any personal or sensitive data before including it in Github. Information such as database passwords, email passwords, app keys, etc should NEVER be exposed on Github.
REMEMBER TO TURN DEBUGGING BACK OFF
Once your issue is resolved, ALWAYS turn APP_DEBUG back to false, and clear your config cache again. Leaving debug mode on in a production environment can expose sensitive information about your filesystem and database. Debug should NEVER be left enabled on systems exposed to the outside world.
Updated almost 4 years ago