"All Assets" page is blank (No matching records found)
Please confirm you have done the following before posting your bug report:
- [X] I have enabled debug mode
- [X] I have read checked the Common Issues page
Describe the bug Snipe-IT is on a pinned tab in Chrome. I lost my tabs and had to re-open them. When I opened up Snipe-IT, the "All Assets" page is blank with a "No matching records found" error. When typing anything in the "Search" bar, the list of assets that contains that word comes up e.g. if I type in a person's name, all the assets under that person's name shows up. Deleting the search and the results stay the same.
I've cleared my browser's cookies, I've run the the following commands:
composer dump-autoload composer clear-compiled php artisan config:clear php artisan view:clear php artisan cache:clear php artisan route:clear
I've searched the net and found 1 similar issue on Github but without any real explanation on how to fix this. I've enabled "debug mode" but don't see the debug screen nor the debug icon to expand the debug screen. I've done quite a few things without any success.
Under "Console" when Inspecting on Chrome I'm getting a 500 (Internal Server Error) for the following URL: https://sub.domain.com/public/api/v1/hardware?status=&order_number=&company_id=&status_id=&search=&sort=name&order=asc&offset=0&limit=20
Even clicking on "All Deployed" or "All Ready to Deploy" gives the same result = no results
When I click on "Dashboard" it shows the total amount of assets on the system.


To Reproduce Steps to reproduce the behavior:
- Go to the domain it is installed under
- Login
- Click on List All under Assets
- "No matching records found"
Expected behavior When I click on "All Assets" I normally could have seen all the assets that I've submitted. This includes deployed, ready to deployed assets.
Screenshots If applicable, add screenshots to help explain your problem.
Server (please complete the following information):
- Snipe-IT Version : v4.6.15
- OS: Debian GNU/Linux 8 (jessie)
- Web Server: Apache
- PHP Version: 5.6.40
Desktop (please complete the following information):
- OS: macOS Mojave 10.14.3
- Browser: Chrome
- Version: 73.0.3683.103
Error Messages
- WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error
- If a stacktrace is provided in the error, include that too.
- Any errors that appear in your browser's error console.
- Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo : NO
- Include any additional information you can find in
storage/logsand your webserver's logs. laravel.txt
Additional context
- Is this a fresh install or an upgrade?: Fresh install
- What OS and web server you're running Snipe-IT on: GNU/Linux 8 (jessie) with Apache
- What method you used to install Snipe-IT: terminal ssh get github...
- Include what you've done so far in the installation, and if you got any error messages along the way: Installation went well, added assets without problems and now
- Indicate whether or not you've manually edited any data directly in the database: No I haven't touched the database
Add any other context about the problem here.
This sounds like a permission issue, a colleague of mine had the similar issue and after I made him superadmin he was able to see the assets
This sounds like a permission issue, a colleague of mine had the similar issue and after I made him superadmin he was able to see the assets
I installed it on a shared server and I am a SuperAdmin and still seeing it.
I've made a clean installation of Snipe-IT on another domain on a completely different server. I exported the Database from the original installation and imported it into the new installation and the results were the same. Again, no results on the "All Assets" page.
Might it be a problem with the database?
I can't seem to export the list from within Snipe-IT as the CSV gives me the same result.
I seemed to get the "debug" working on the new installation and get the following error:
production.ERROR: ErrorException: date_interval_create_from_date_string(): Unknown or bad format ( months) at position 0 (m): The timezone could not be found in the database in /usr/www/users/username/app/Presenters/AssetPresenter.php:396
Can you tell me what date format you're using in the "Time and Date Display" field in Admin Settings > Localization screen?
Also what timezone do you have set in your .env?
My date format in my .env file is set to 'Africa/Johannesburg' and my date in localisation is set to dd/mm/yyyy which is standard date format used in my country.
Hm, I'm not able to reproduce this at all. It's clearly complaining about the timezone/time format, but when I switch my .env timezone to Africa/Johannesburg, switch to d/m /Y, and load the assets page with no issues.

I know... I've done the changes on the demo, but couldn't reproduce the problem. It was working fine for a week and I could see all assets until I had to reopen the app a few days back.
Did anything get updated on the server? New versions of software, security updates, etc?
Did anything get updated on the server? New versions of software, security updates, etc?
No nothing that I know of. It is located on a shared server hosted by my hosting company, but nothing was updated or changed to my knowledge. Normally they send out notifications when they do.
Can you try a different timezone in your .env (and clear the config cache) and see if that changes anything? I'm really trying to determine whether it's the time format method or the timezone itself that PHP doesn't like.
Can you try a different timezone in your .env (and clear the config cache) and see if that changes anything? I'm really trying to determine whether it's the time format method or the timezone itself that PHP doesn't like.
I've tried using "America/Detroit" and ran the php artisan config:clear in terminal every time I make changes to my .env file but that didn't work either. I've also updated the timezones in Localization to correspond with my .env file, also without success.
Okay, so it sounds like the env timezone isn't the issue here, but the date formatter. Is d/m/Y the only one that doesn't work?
Okay, so it sounds like the env timezone isn't the issue here, but the date formatter. Is d/m/Y the only one that doesn't work?
I've tried all of the date formatters without success. Chrome's console keeps on giving me a 500 error for the following URL: https://sub.domain.co.za/public/api/v1/hardware?status=&order_number=&company_id=&status_id=&sort=custom_fields._snipeit_mac_address_1&order=desc&offset=0&limit=20
Aha... looks like the issue relates to the EOL:
public function eol_date()
{
if (( $this->purchase_date ) && ( $this->model )) {
$date = date_create($this->purchase_date);
date_add($date, date_interval_create_from_date_string($this->model->model->eol . ' months'));
return date_format($date, 'Y-m-d');
}
}
Do you have an EOL set for those models? If so, what is it?
Some of my assets was setup for 60 months
In /usr/www/users/username/app/Presenters/AssetPresenter.php, can you replace the first line of the existing eol_date() method with this:
if (( $this->purchase_date ) && ( $this->model ) && ( $this->model->model->eol ) ) {
Clear all your caches and hard reload that page.
(If it still gives you an error, let me know what the new error is.)
Seems to be working now. I do have some limited PHP experience and knowledge and is quite interested and curious what the problem might have been