Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All Assets page is blank. It is not EOL related. #14625

Open
2 tasks done
Rousik23 opened this issue Apr 22, 2024 · 14 comments
Open
2 tasks done

All Assets page is blank. It is not EOL related. #14625

Rousik23 opened this issue Apr 22, 2024 · 14 comments
Labels
🚫 not a bug This issue is not a bug

Comments

@Rousik23
Copy link

Debug mode

Describe the bug

All Assets page is blank and every other page with multiple assets is blank also. Seems like lot of people had this issue.

Reproduction steps

  1. Log in to SnipeIT
  2. Go to All Assets -> no data but it is showing 300+ assets

...

Expected behavior

Show all assets

Screenshots

image

Snipe-IT Version

v6.1.2 - build 10938

Operating System

Windows

Web Server

Apache

PHP Version

8.1.21

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

[2024-04-19 09:51:59] production.ERROR: Attempt to read property "months" on null {"userId":798,"exception":"[object] (ErrorException(code: 0): Attempt to read property \"months\" on null at /var/www/snipe-it/app/Models/Depreciable.php:77)

Additional context

No response

Copy link

welcome bot commented Apr 22, 2024

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@snipe
Copy link
Owner

snipe commented Apr 22, 2024

I'm not aware of a lot of people having this issue. That error is because it's apparently trying to find the months property on a non-existent asset. Without more information on your data, it's impossible for us to say what's going on there. (You may also want to try updating, as that version is from nearly a year ago.

@snipe
Copy link
Owner

snipe commented Apr 22, 2024

Question: have you deleted any deprecations? It might be related to a deleted depreciation.

@snipe
Copy link
Owner

snipe commented Apr 22, 2024

(We handle this better in more recent versions - I'd still suggest upgrading.)

@snipe snipe added the 🚫 not a bug This issue is not a bug label Apr 22, 2024
@Rousik23
Copy link
Author

hey hey, did the upgrade but unfortunately I got this error.
Sorry but I have very limited knowledge about SnipeIT
image

@snipe
Copy link
Owner

snipe commented Apr 22, 2024

How did you do the upgrade exactly? What steps did you take?

@Rousik23
Copy link
Author

from folder snipe-it: php upgrade.pho
That's it

@snipe
Copy link
Owner

snipe commented Apr 22, 2024

Please paste the output of running that script.

You're not really giving me much to work with here. I'm trying to help, but I need information in order to do so.

@Rousik23
Copy link
Author

@asset:~$ cd /var/www/snipe-it/
@asset:/var/www/snipe-it$ php upgrade.php

WELCOME TO THE SNIPE-IT UPGRADER!

This script will attempt to:

  • validate some very basic .env file settings
  • check your PHP version and extension requirements
  • check directory permissions
  • do a git pull to bring you to the latest version
  • run composer install to get your vendors up to date
  • run migrations to get your schema up to date
  • clear out old cache settings

Launching using branch: master
Found PHP requirements, will check for PHP > 7.4.0 and < 8.2.0
Proceed with upgrade? [Y/n]: y


STEP 1: Checking .env file:

  • Your .env is located at /var/www/snipe-it/.env

√ Your APP_KEY is not blank.
√ Your APP_URL is not null or blank. It is set to https://snipeit.zentity.com
√ Your APP_URL is set to https://snipeit.zentity.com and starts with the protocol (https:// or http://)
√ Your APP_URL (https://snipeit.zentity.com) does not have a trailing slash.


STEP 2: Checking PHP requirements: (Required PHP >=7.4.0 - <8.2.0)

√ Current PHP version: (8.1.21) is at least 7.4.0 and less than 8.2.0! Continuing...
FYI: The php.ini used by this PHP is: /etc/php/8.1/cli/php.ini

Checking Required PHP extensions...

√ bcmath is installed!
√ curl is installed!
√ fileinfo is installed!
√ gd is installed!
√ json is installed!
√ ldap is installed!
√ mbstring is installed!
√ mysqli is installed!
√ openssl is installed!
√ PDO is installed!
√ sodium is installed!
√ tokenizer is installed!
√ xml is installed!
√ zip is installed!


STEP 3: Checking directory permissions:

√ /var/www/snipe-it/bootstrap/cache is writable
√ /var/www/snipe-it/storage is writable
√ /var/www/snipe-it/storage/logs is writable
√ /var/www/snipe-it/storage/logs/laravel.log is writable
√ /var/www/snipe-it/storage/framework is writable
√ /var/www/snipe-it/storage/framework/cache is writable
√ /var/www/snipe-it/storage/framework/sessions is writable
√ /var/www/snipe-it/storage/framework/views is writable
√ /var/www/snipe-it/storage/app is writable
√ /var/www/snipe-it/storage/app/backups is writable
√ /var/www/snipe-it/storage/app/backup-temp is writable
√ /var/www/snipe-it/storage/private_uploads is writable
√ /var/www/snipe-it/public/uploads is writable


STEP 4: Backing up database:

PHP Fatal error: Uncaught Error: Interface "Symfony\Component\HttpKernel\HttpKernelInterface" not found in /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:29
Stack trace:
#0 /var/www/snipe-it/vendor/composer/ClassLoader.php(571): include()
#1 /var/www/snipe-it/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile()
#2 /var/www/snipe-it/bootstrap/app.php(14): Composer\Autoload\ClassLoader->loadClass()
#3 /var/www/snipe-it/artisan(18): require_once('...')
#4 {main}
thrown in /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Application.php on line 29

Something went wrong with your backup. Aborting!

@snipe
Copy link
Owner

snipe commented Apr 22, 2024

Have you tried clearing all of your caches and re-running the upgrader? https://snipe-it.readme.io/docs/common-issues#quick-tip-handy-commands

Snipe-IT Documentation
🚧Problem Installing/Upgrading?We've moved the the most common installation/upgrade issues to their own page. If you're having an issue installing or upgrading Snipe-IT, please check the Installation/Upgrading Issues page before opening a ticket on Github.Quick Tip: Handy Commands👍Many issues can b...

@Rousik23
Copy link
Author

I had only this file so I deleted it "bootstrap/cache/services.php" but if I try to run "composer dump-autoload" it just instantly fail 'cuz the error I already sent same with the upgrader:
image
If I check the url it says this (29 line starting with class):
image

@snipe
Copy link
Owner

snipe commented Apr 23, 2024

I had only this file so I deleted it

Did you run those commands at the URL I sent tho?

@Rousik23
Copy link
Author

I cannot even run any it finished with the same error, I used the one-liner.
I am gonna restore it from backup from now because this seems like deadend.

@snipe
Copy link
Owner

snipe commented Apr 23, 2024

I'd try deleting the vendors directory and its contents, and re-run composer install --no-dev. If that doesn't work, you can try composer update. I normally never recommend that, but if it gets you closer, we can handle the repercussions later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚫 not a bug This issue is not a bug
Projects
None yet
Development

No branches or pull requests

2 participants