snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.32k stars 3.06k forks source link

Status - 500 Assets do not show in Status #14957

Closed jayavman closed 3 hours ago

jayavman commented 1 week ago

Debug mode

Describe the bug

Updated to latest snipe version. When going to Status now it has 500 assets in a newly credit status. If you click on these assets they do not exist and cannot be reassigned to another status.

Reproduction steps

  1. go to status label Screenshot 2024-06-25 135109
  2. Click on the one with 500 assets Screenshot 2024-06-25 135122

Tried another one, Screenshot 2024-06-25 135102

Screenshot 2024-06-25 135122

Expected behavior

I cannot remove these status as they have 500 assets in each of these labels but they dont exist. Not sure why

Screenshots

No response

Snipe-IT Version

v7.0.5 build 14092 (g294fb1f77)

Operating System

almalinux

Web Server

apache

PHP Version

8.1.29

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

No response

Additional context

No response

jayavman commented 1 week ago

@snipe

  • select * from `users` where `id` = 1 and `users`.`deleted_at` is null limit 1890μsfredons_assetEloquentUserProvider.php#59 Bindings | 0: 1 -- | -- Hints | 0: Use SELECT * only if you need all columns from table1: LIMIT without ORDER BY causes non-deterministic results, depending on the query execution plan Backtrace | 16. vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php:5917. vendor/laravel/passport/src/PassportUserProvider.php:4218. vendor/laravel/passport/src/Guards/TokenGuard.php:25719. vendor/laravel/passport/src/Guards/TokenGuard.php:12220. vendor/laravel/framework/src/Illuminate/Auth/GuardHelpers.php:56
  • select `permission_groups`.*, `users_groups`.`user_id` as `pivot_user_id`, `users_groups`.`group_id` as `pivot_group_id` from `permission_groups` inner join `users_groups` on `permission_groups`.`id` = `users_groups`.`group_id` where `users_groups`.`user_id` = 1710μsfredons_assetUser.php#147
  • select * from `custom_fields`610μsfredons_assetAssetsController.php#123
  • select count(*) as aggregate from `assets` inner join `status_labels` as `status_alias` on `status_alias`.`id` = `assets`.`status_id` where `assets`.`status_id` = '22' and `assets`.`deleted_at` is null810μsfredons_assetAssetsController.php#386
  • select count(*) as aggregate from `assets` inner join `status_labels` as `status_alias` on `status_alias`.`id` = `assets`.`status_id` where `assets`.`status_id` = '22' and `assets`.`deleted_at` is null690μsfredons_assetAssetsController.php#389
  • select `assets`.* from `assets` inner join `status_labels` as `status_alias` on `status_alias`.`id` = `assets`.`status_id` where `assets`.`status_id` = '22' and `assets`.`deleted_at` is null order by `name` asc limit 500 offset 500
  • laravel log :

    48 /home/fredons/public_html/asset/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\Http\Middleware\NoSessionStore->handle(Object(Illuminate\Http\Request), Object(Closure))

    49 /home/fredons/public_html/asset/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

    50 /home/fredons/public_html/asset/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\Pipeline\Pipeline->then(Object(Closure))

    51 /home/fredons/public_html/asset/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))

    52 /home/fredons/public_html/asset/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))

    53 {main}

    snipe commented 1 week ago

    Is there anything in your app log? (Please stop including the debugbar output. It almost always offers nothing of value for troubleshooting - useful for developing, but not great for troubleshooting, as all it's doing is showing me queries, not stack traces.)

    Is it possible these items are archived?

    jayavman commented 1 week ago

    I still have Show archived assets in the "all assets" listing ticked.

    How do i get the app log?

    snipe commented 6 days ago

    https://snipe-it.readme.io/docs/getting-help#step-3-check-your-app-and-server-logs

    Snipe-IT Documentation
    Getting Help
    If you're having trouble setting up Snipe-IT, don't worry!
    snipe commented 6 days ago

    The laravel.log output is what we need, but that's too little of it. That's all framework level stuff, which I'm pretty sure isn't the issue here.

    jayavman commented 3 hours ago

    resolved mysteriously.