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

Cannot Save assets with an Asset Custom Fieldset #12965

Closed
2 tasks done
jarrodCoombes opened this issue May 2, 2023 · 12 comments
Closed
2 tasks done

Cannot Save assets with an Asset Custom Fieldset #12965

jarrodCoombes opened this issue May 2, 2023 · 12 comments

Comments

@jarrodCoombes
Copy link

jarrodCoombes commented May 2, 2023

Debug mode

Describe the bug

Created a custom field, then added it to as field set, and triggered #12257 was able to fix it, but then when I tried to add assets with that any fieldset I get a 500 error. I was a few versions behind so I ran the upgrade to get me to the latest (6.1.0), the logs for which are below (I removed step 6 to save characters). I noted on step 9 there was an error when migrating the database:

SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs (SQL: alter table `assets` add `byod` tinyint(1) null default '0')

The new version is installed, everything seems to work fine, except when I try to add or edit an asset to include that fieldset, it results in an error 500.

This error comes out of the laravel.log file, not sure if this existed before the upgrade or not.

[2023-05-02 14:54:47] production.ERROR: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'asset_eol_date' in 'field list' in /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php:522

Next Illuminate\Database\QueryException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'asset_eol_date' in 'field list' (SQL: update `assets` set `name` = jcoombes, `model_id` = 263, `requestable` = 0, `asset_eol_date` = ?, `byod` = 0, `_snipeit_printer_password_12` = ?, `_snipeit_caltronics_tag_11` = ?, `assets`.`updated_at` = 2023-05-02 14:54:47 where `id` = 11460) in /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712

[2023-05-02 14:54:47] production.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'asset_eol_date' in 'field list' (SQL: update `assets` set `name` = name, `model_id` = 263, `requestable` = 0, `asset_eol_date` = ?, `byod` = 0, `_snipeit_printer_password_12` = ?, `_snipeit_caltronics_tag_11` = ?, `assets`.`updated_at` = 2023-05-02 14:54:47 where `id` = 11460) {"userId":5,"exception":"[object] (Illuminate\\Database\\QueryException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'asset_eol_date' in 'field list' (SQL: update `assets` set `name` = name, `model_id` = 263, `requestable` = 0, `asset_eol_date` = ?, `byod` = 0, `_snipeit_printer_password_12` = ?, `_snipeit_caltronics_tag_11` = ?, `assets`.`updated_at` = 2023-05-02 14:54:47 where `id` = 11460) at /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712)

I am not sure where to go to find logs on this, but if you direct me I can post them in this issue.

Reproduction steps

  1. Create a new asset
  2. Select the asset model to include an asset with any custom field set, the custom fields show up, it does not matter if you populate them or not.
  3. Click save, and get a 500 error.

Does not happen when I create an asset with any other fieldset or no field set.

Expected behavior

It should create or allow to save edits to the asset with the custom field set availble.

Screenshots

No response

Snipe-IT Version

6.1.0

Operating System

Ubuntu

Web Server

Apache 2

PHP Version

7.4.3

Operating System

MacOS

Browser

Chrome

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

laravel.log when I click save

[2023-05-02 14:57:14] production.ERROR: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'asset_eol_date' in 'field list' in /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php:522
Stack trace:
#0 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php(522): PDO->prepare()
#1 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php(705): Illuminate\Database\Connection->Illuminate\Database{closure}()
#2 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback()
#3 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php(533): Illuminate\Database\Connection->run()
#4 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php(466): Illuminate\Database\Connection->affectingStatement()
#5 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3063): Illuminate\Database\Connection->update()
#6 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(921): Illuminate\Database\Query\Builder->update()
#7 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1072): Illuminate\Database\Eloquent\Builder->update()
#8 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(987): Illuminate\Database\Eloquent\Model->performUpdate()
#9 /var/www/snipe-it/app/Models/Asset.php(220): Illuminate\Database\Eloquent\Model->save()
#10 /var/www/snipe-it/app/Http/Controllers/Assets/AssetsController.php(381): App\Models\Asset->save()
#11 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\Http\Controllers\Assets\AssetsController->update()
#12 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction()
#13 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Route.php(262): Illuminate\Routing\ControllerDispatcher->dispatch()
#14 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route->runController()
#15 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(721): Illuminate\Routing\Route->run()
#16 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing{closure}()
#17 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php(58): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#18 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\AuthenticateSession->handle()
#19 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#20 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Auth\Middleware\Authenticate->handle()
#21 /var/www/snipe-it/app/Http/Middleware/AssetCountForSidebar.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#22 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\AssetCountForSidebar->handle()
#23 /var/www/snipe-it/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#24 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle()
#25 /var/www/snipe-it/app/Http/Middleware/CheckForTwoFactor.php(42): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#26 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForTwoFactor->handle()
#27 /var/www/snipe-it/app/Http/Middleware/CheckUserIsActivated.php(47): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#28 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckUserIsActivated->handle()
#29 /var/www/snipe-it/app/Http/Middleware/CheckLocale.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#30 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckLocale->handle()
#31 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#32 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
#33 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#34 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#35 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#36 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\EncryptCookies->handle()
#37 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#38 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(723): Illuminate\Pipeline\Pipeline->then()
#39 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(698): Illuminate\Routing\Router->runRouteWithinStack()
#40 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(662): Illuminate\Routing\Router->runRoute()
#41 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(651): Illuminate\Routing\Router->dispatchToRoute()
#42 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Illuminate\Routing\Router->dispatch()
#43 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}()
#44 /var/www/snipe-it/vendor/livewire/livewire/src/DisableBrowserCache.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#45 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Livewire\DisableBrowserCache->handle()
#46 /var/www/snipe-it/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#47 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle()
#48 /var/www/snipe-it/vendor/fruitcake/laravel-cors/src/HandleCors.php(38): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#49 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\Cors\HandleCors->handle()
#50 /var/www/snipe-it/app/Http/Middleware/PreventBackHistory.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#51 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\PreventBackHistory->handle()
#52 /var/www/snipe-it/app/Http/Middleware/SecurityHeaders.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#53 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\SecurityHeaders->handle()
#54 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#55 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#56 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()
#57 /var/www/snipe-it/app/Http/Middleware/CheckForDebug.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#58 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForDebug->handle()
#59 /var/www/snipe-it/app/Http/Middleware/CheckForSetup.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#60 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForSetup->handle()
#61 /var/www/snipe-it/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#62 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle()
#63 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#64 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#65 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#66 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
#67 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\StartSession->handle()
#68 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#69 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#70 /var/www/snipe-it/app/Http/Middleware/NoSessionStore.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#71 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\NoSessionStore->handle()
#72 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#73 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\Pipeline\Pipeline->then()
#74 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#75 /var/www/snipe-it/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle()
#76 {main}

Next Illuminate\Database\QueryException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'asset_eol_date' in 'field list' (SQL: update assets set name = jcoombes, model_id = 263, requestable = 0, asset_eol_date = ?, byod = 0, _snipeit_printer_password_12 = ?, _snipeit_caltronics_tag_11 = ?, assets.updated_at = 2023-05-02 14:57:14 where id = 11460) in /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
Stack trace:
#0 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback()
#1 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php(533): Illuminate\Database\Connection->run()
#2 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php(466): Illuminate\Database\Connection->affectingStatement()
#3 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3063): Illuminate\Database\Connection->update()
#4 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(921): Illuminate\Database\Query\Builder->update()
#5 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1072): Illuminate\Database\Eloquent\Builder->update()
#6 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(987): Illuminate\Database\Eloquent\Model->performUpdate()
#7 /var/www/snipe-it/app/Models/Asset.php(220): Illuminate\Database\Eloquent\Model->save()
#8 /var/www/snipe-it/app/Http/Controllers/Assets/AssetsController.php(381): App\Models\Asset->save()
#9 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\Http\Controllers\Assets\AssetsController->update()
#10 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction()
#11 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Route.php(262): Illuminate\Routing\ControllerDispatcher->dispatch()
#12 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route->runController()
#13 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(721): Illuminate\Routing\Route->run()
#14 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing{closure}()
#15 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php(58): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#16 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\AuthenticateSession->handle()
#17 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#18 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Auth\Middleware\Authenticate->handle()
#19 /var/www/snipe-it/app/Http/Middleware/AssetCountForSidebar.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#20 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\AssetCountForSidebar->handle()
#21 /var/www/snipe-it/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#22 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle()
#23 /var/www/snipe-it/app/Http/Middleware/CheckForTwoFactor.php(42): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#24 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForTwoFactor->handle()
#25 /var/www/snipe-it/app/Http/Middleware/CheckUserIsActivated.php(47): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#26 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckUserIsActivated->handle()
#27 /var/www/snipe-it/app/Http/Middleware/CheckLocale.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#28 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckLocale->handle()
#29 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#30 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
#31 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#32 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#33 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#34 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\EncryptCookies->handle()
#35 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#36 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(723): Illuminate\Pipeline\Pipeline->then()
#37 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(698): Illuminate\Routing\Router->runRouteWithinStack()
#38 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(662): Illuminate\Routing\Router->runRoute()
#39 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(651): Illuminate\Routing\Router->dispatchToRoute()
#40 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Illuminate\Routing\Router->dispatch()
#41 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}()
#42 /var/www/snipe-it/vendor/livewire/livewire/src/DisableBrowserCache.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#43 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Livewire\DisableBrowserCache->handle()
#44 /var/www/snipe-it/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#45 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle()
#46 /var/www/snipe-it/vendor/fruitcake/laravel-cors/src/HandleCors.php(38): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#47 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\Cors\HandleCors->handle()
#48 /var/www/snipe-it/app/Http/Middleware/PreventBackHistory.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#49 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\PreventBackHistory->handle()
#50 /var/www/snipe-it/app/Http/Middleware/SecurityHeaders.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#51 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\SecurityHeaders->handle()
#52 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#53 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#54 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()
#55 /var/www/snipe-it/app/Http/Middleware/CheckForDebug.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#56 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForDebug->handle()
#57 /var/www/snipe-it/app/Http/Middleware/CheckForSetup.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#58 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForSetup->handle()
#59 /var/www/snipe-it/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#60 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle()
#61 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#62 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#63 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#64 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
#65 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\StartSession->handle()
#66 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#67 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#68 /var/www/snipe-it/app/Http/Middleware/NoSessionStore.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#69 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\NoSessionStore->handle()
#70 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#71 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\Pipeline\Pipeline->then()
#72 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#73 /var/www/snipe-it/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle()
#74 {main}
[2023-05-02 14:57:14] production.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'asset_eol_date' in 'field list' (SQL: update assets set name = jcoombes, model_id = 263, requestable = 0, asset_eol_date = ?, byod = 0, _snipeit_printer_password_12 = ?, _snipeit_caltronics_tag_11 = ?, assets.updated_at = 2023-05-02 14:57:14 where id = 11460) {"userId":5,"exception":"[object] (Illuminate\Database\QueryException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'asset_eol_date' in 'field list' (SQL: update assets set name = jcoombes, model_id = 263, requestable = 0, asset_eol_date = ?, byod = 0, _snipeit_printer_password_12 = ?, _snipeit_caltronics_tag_11 = ?, assets.updated_at = 2023-05-02 14:57:14 where id = 11460) at /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712)
[stacktrace]
#0 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback()
#1 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php(533): Illuminate\Database\Connection->run()
#2 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php(466): Illuminate\Database\Connection->affectingStatement()
#3 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3063): Illuminate\Database\Connection->update()
#4 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(921): Illuminate\Database\Query\Builder->update()
#5 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1072): Illuminate\Database\Eloquent\Builder->update()
#6 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(987): Illuminate\Database\Eloquent\Model->performUpdate()
#7 /var/www/snipe-it/app/Models/Asset.php(220): Illuminate\Database\Eloquent\Model->save()
#8 /var/www/snipe-it/app/Http/Controllers/Assets/AssetsController.php(381): App\Models\Asset->save()
#9 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\Http\Controllers\Assets\AssetsController->update()
#10 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction()
#11 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Route.php(262): Illuminate\Routing\ControllerDispatcher->dispatch()
#12 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route->runController()
#13 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(721): Illuminate\Routing\Route->run()
#14 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#15 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php(58): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#16 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\AuthenticateSession->handle()
#17 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#18 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Auth\Middleware\Authenticate->handle()
#19 /var/www/snipe-it/app/Http/Middleware/AssetCountForSidebar.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#20 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\AssetCountForSidebar->handle()
#21 /var/www/snipe-it/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#22 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle()
#23 /var/www/snipe-it/app/Http/Middleware/CheckForTwoFactor.php(42): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#24 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForTwoFactor->handle()
#25 /var/www/snipe-it/app/Http/Middleware/CheckUserIsActivated.php(47): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#26 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckUserIsActivated->handle()
#27 /var/www/snipe-it/app/Http/Middleware/CheckLocale.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#28 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckLocale->handle()
#29 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#30 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
#31 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#32 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#33 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#34 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\EncryptCookies->handle()
#35 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#36 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(723): Illuminate\Pipeline\Pipeline->then()
#37 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(698): Illuminate\Routing\Router->runRouteWithinStack()
#38 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(662): Illuminate\Routing\Router->runRoute()
#39 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(651): Illuminate\Routing\Router->dispatchToRoute()
#40 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Illuminate\Routing\Router->dispatch()
#41 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
#42 /var/www/snipe-it/vendor/livewire/livewire/src/DisableBrowserCache.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#43 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Livewire\DisableBrowserCache->handle()
#44 /var/www/snipe-it/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#45 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle()
#46 /var/www/snipe-it/vendor/fruitcake/laravel-cors/src/HandleCors.php(38): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#47 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\Cors\HandleCors->handle()
#48 /var/www/snipe-it/app/Http/Middleware/PreventBackHistory.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#49 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\PreventBackHistory->handle()
#50 /var/www/snipe-it/app/Http/Middleware/SecurityHeaders.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#51 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\SecurityHeaders->handle()
#52 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#53 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#54 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()
#55 /var/www/snipe-it/app/Http/Middleware/CheckForDebug.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#56 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForDebug->handle()
#57 /var/www/snipe-it/app/Http/Middleware/CheckForSetup.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#58 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForSetup->handle()
#59 /var/www/snipe-it/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#60 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle()
#61 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#62 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#63 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#64 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
#65 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\StartSession->handle()
#66 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#67 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#68 /var/www/snipe-it/app/Http/Middleware/NoSessionStore.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#69 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\NoSessionStore->handle()
#70 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#71 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\Pipeline\Pipeline->then()
#72 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#73 /var/www/snipe-it/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle()
#74 {main}

[previous exception] [object] (PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'asset_eol_date' in 'field list' at /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php:522)
[stacktrace]
#0 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php(522): PDO->prepare()
#1 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php(705): Illuminate\Database\Connection->Illuminate\Database\{closure}()
#2 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback()
#3 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php(533): Illuminate\Database\Connection->run()
#4 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php(466): Illuminate\Database\Connection->affectingStatement()
#5 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3063): Illuminate\Database\Connection->update()
#6 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(921): Illuminate\Database\Query\Builder->update()
#7 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1072): Illuminate\Database\Eloquent\Builder->update()
#8 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(987): Illuminate\Database\Eloquent\Model->performUpdate()
#9 /var/www/snipe-it/app/Models/Asset.php(220): Illuminate\Database\Eloquent\Model->save()
#10 /var/www/snipe-it/app/Http/Controllers/Assets/AssetsController.php(381): App\Models\Asset->save()
#11 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\Http\Controllers\Assets\AssetsController->update()
#12 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction()
#13 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Route.php(262): Illuminate\Routing\ControllerDispatcher->dispatch()
#14 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route->runController()
#15 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(721): Illuminate\Routing\Route->run()
#16 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#17 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php(58): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#18 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\AuthenticateSession->handle()
#19 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#20 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Auth\Middleware\Authenticate->handle()
#21 /var/www/snipe-it/app/Http/Middleware/AssetCountForSidebar.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#22 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\AssetCountForSidebar->handle()
#23 /var/www/snipe-it/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#24 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle()
#25 /var/www/snipe-it/app/Http/Middleware/CheckForTwoFactor.php(42): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#26 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForTwoFactor->handle()
#27 /var/www/snipe-it/app/Http/Middleware/CheckUserIsActivated.php(47): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#28 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckUserIsActivated->handle()
#29 /var/www/snipe-it/app/Http/Middleware/CheckLocale.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#30 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckLocale->handle()
#31 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#32 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
#33 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#34 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#35 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#36 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\EncryptCookies->handle()
#37 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#38 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(723): Illuminate\Pipeline\Pipeline->then()
#39 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(698): Illuminate\Routing\Router->runRouteWithinStack()
#40 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(662): Illuminate\Routing\Router->runRoute()
#41 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Routing/Router.php(651): Illuminate\Routing\Router->dispatchToRoute()
#42 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Illuminate\Routing\Router->dispatch()
#43 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
#44 /var/www/snipe-it/vendor/livewire/livewire/src/DisableBrowserCache.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#45 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Livewire\DisableBrowserCache->handle()
#46 /var/www/snipe-it/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#47 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle()
#48 /var/www/snipe-it/vendor/fruitcake/laravel-cors/src/HandleCors.php(38): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#49 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\Cors\HandleCors->handle()
#50 /var/www/snipe-it/app/Http/Middleware/PreventBackHistory.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#51 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\PreventBackHistory->handle()
#52 /var/www/snipe-it/app/Http/Middleware/SecurityHeaders.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#53 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\SecurityHeaders->handle()
#54 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#55 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#56 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()
#57 /var/www/snipe-it/app/Http/Middleware/CheckForDebug.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#58 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForDebug->handle()
#59 /var/www/snipe-it/app/Http/Middleware/CheckForSetup.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#60 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForSetup->handle()
#61 /var/www/snipe-it/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#62 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle()
#63 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#64 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#65 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#66 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
#67 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\StartSession->handle()
#68 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#69 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#70 /var/www/snipe-it/app/Http/Middleware/NoSessionStore.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#71 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\NoSessionStore->handle()
#72 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#73 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\Pipeline\Pipeline->then()
#74 /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#75 /var/www/snipe-it/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle()
#76 {main}
"}

Additional context

Upgrade Steps

Running Upgrade Now


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

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://assets.mpcsd.org
√ Your APP_URL is set to https://assets.mpcsd.org and starts with the protocol (https:// or http://)
√ Your APP_URL (https://assets.mpcsd.org) does not have a trailing slash.


STEP 2: Checking PHP requirements:

Current PHP version: (7.4.3-4ubuntu2.18) is at least 7.4.0 - continuing...
FYI: The php.ini used by this PHP is: /etc/php/7.4/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:

-- Starting backup...
Dumping database snipeit_data...
Determining files to backup...
Zipping 169 files and directories...
Created zip containing 169 files and directories. Size is 6.45 MB
Copying zip to disk named backup...
Successfully copied zip to disk named backup.
Backup completed!


STEP 5: Putting application into maintenance mode:

-- Application is now in maintenance mode.


STEP 6: Pulling latest from Git (master branch):

Left our since the comment was too long.


STEP 7: Cleaning up old cached files:

√ No bootstrap/cache/compiled.php, so nothing to delete.
√ Deleting bootstrap/cache/services.php. It is no longer used.
√ No bootstrap/cache/config.php, so nothing to delete.
√ No vendor/symfony/translation/TranslatorInterface.php, so nothing to delete.

-- Configuration cache cleared!
-- Application cache cleared!
-- Route cache cleared!
-- Compiled views cleared!


STEP 8: Updating composer dependencies:
(This may take a moment.)

-- Running the app in production mode.
-- We couldn't find a local composer.phar. No worries, trying globally.
Since you are running composer globally, we won't try to update it for you.
If you run into issues with this step, try running composer self-update
before running this updater again

Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 1 install, 4 updates, 0 removals

  • Downloading arietimmerman/laravel-scim-server (dev-master 9e8dd2d)
  • Downloading phenx/php-svg-lib (0.5.0)
  • Downloading masterminds/html5 (2.7.6)
  • Downloading dompdf/dompdf (v2.0.3)
  • Syncing paragonie/sodium_compat (v1.19.0) into cache
    0/4 [>---------------------------] 0%
    2/4 [==============>-------------] 50%
    3/4 [=====================>------] 75%
    4/4 [============================] 100%
  • Upgrading arietimmerman/laravel-scim-server (dev-master 2c7ecc4 => dev-master 9e8dd2d): Extracting archive
  • Upgrading phenx/php-svg-lib (0.4.1 => 0.5.0): Extracting archive
  • Upgrading masterminds/html5 (2.7.5 => 2.7.6): Extracting archive
  • Upgrading dompdf/dompdf (v2.0.0 => v2.0.3): Extracting archive
  • Installing paragonie/sodium_compat (v1.19.0): Cloning cb15e403ec from cache
    0/4 [>---------------------------] 0%
    3/4 [=====================>------] 75%
    4/4 [============================] 100%
    Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
    Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
    Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
    Generating optimized autoload files
    Class ParsedownTest located in ./vendor/erusev/parsedown/test/ParsedownTest.php does not comply with psr-0 autoloading standard. Skipping.

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi
@php artisan vendor:publish --force --tag=livewire:assets --ansi
78 packages you are using are looking for funding.
Use the composer fund command to find out more!
Class ParsedownTest located in ./vendor/erusev/parsedown/test/ParsedownTest.php does not comply with psr-0 autoloading standard. Skipping.
Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi
@php artisan vendor:publish --force --tag=livewire:assets --ansi
Generating optimized autoload files
Discovered Package: arietimmerman/laravel-scim-server
Discovered Package: barryvdh/laravel-debugbar
Discovered Package: barryvdh/laravel-dompdf
Discovered Package: eduardokum/laravel-mail-auto-embed
Discovered Package: facade/ignition
Discovered Package: fideloper/proxy
Discovered Package: fruitcake/laravel-cors
Discovered Package: intervention/image
Discovered Package: laravel/passport
Discovered Package: laravel/slack-notification-channel
Discovered Package: laravel/tinker
Discovered Package: laravel/ui
Discovered Package: laravelcollective/html
Discovered Package: livewire/livewire
Discovered Package: maatwebsite/excel
Discovered Package: mediconesystems/livewire-datatables
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Discovered Package: pragmarx/google2fa-laravel
Discovered Package: spatie/laravel-backup
Discovered Package: unicodeveloper/laravel-password
Package manifest generated successfully.
Copied Directory [/vendor/livewire/livewire/dist] To [/public/vendor/livewire]
Publishing complete.
Generated optimized autoload files containing 8532 classes

Discovered Package: arietimmerman/laravel-scim-server
Discovered Package: barryvdh/laravel-debugbar
Discovered Package: barryvdh/laravel-dompdf
Discovered Package: eduardokum/laravel-mail-auto-embed
Discovered Package: facade/ignition
Discovered Package: fideloper/proxy
Discovered Package: fruitcake/laravel-cors
Discovered Package: intervention/image
Discovered Package: laravel/passport
Discovered Package: laravel/slack-notification-channel
Discovered Package: laravel/tinker
Discovered Package: laravel/ui
Discovered Package: laravelcollective/html
Discovered Package: livewire/livewire
Discovered Package: maatwebsite/excel
Discovered Package: mediconesystems/livewire-datatables
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Discovered Package: pragmarx/google2fa-laravel
Discovered Package: spatie/laravel-backup
Discovered Package: unicodeveloper/laravel-password
Package manifest generated successfully.
Copied Directory [/vendor/livewire/livewire/dist] To [/public/vendor/livewire]
Publishing complete.


STEP 9: Migrating database:

Migrating: 2022_08_25_213308_adds_ldap_default_group_to_settings_table
Migrated: 2022_08_25_213308_adds_ldap_default_group_to_settings_table (60.09ms)
Migrating: 2022_11_15_232525_adds_should_autoassign_bool_to_users_table
Migrated: 2022_11_15_232525_adds_should_autoassign_bool_to_users_table (6.27ms)
Migrating: 2022_12_20_171851_fix_nullable_migration_for_settings
Migrated: 2022_12_20_171851_fix_nullable_migration_for_settings (106.77ms)
Migrating: 2023_01_18_122534_add_byod_to_assets

Illuminate\Database\QueryException

SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs (SQL: alter table assets add byod tinyint(1) null default '0')

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
708▕ // If an exception occurs when attempting to run a query, we'll format the error
709▕ // message to include the bindings with SQL, which will make this exception a
710▕ // lot more helpful to the developer instead of just the database's errors.
711▕ catch (Exception $e) {
➜ 712▕ throw new QueryException(
713▕ $query, $this->prepareBindings($bindings), $e
714▕ );
715▕ }
716▕ }

  +9 vendor frames 

10 database/migrations/2023_01_18_122534_add_byod_to_assets.php:18
Illuminate\Support\Facades\Facade::__callStatic()

  +22 vendor frames 

33 artisan:35
Illuminate\Foundation\Console\Kernel::handle()


STEP 10: Checking for OAuth keys:

√ OAuth keys detected. Skipping passport install.


STEP 11: Taking application out of maintenance mode:

-- Application is now live.

---------------------- FINISHED! -----------------------

All done! Clear your browser cookies and re-login to use
your upgraded Snipe-IT!

@snipe
Copy link
Owner

snipe commented May 3, 2023

Have you checked the solutions here? https://stackoverflow.com/questions/22637733/mysql-error-code-1118-row-size-too-large-8126-changing-some-columns-to-te

Stack Overflow
I want to create a table of 325 column:

CREATE TABLE NAMESCHEMA.NAMETABLE
(
ROW_ID TEXT NOT NULL , //this is the primary key

324 column of these types:
CHAR(1),
DATE...

@jarrodCoombes
Copy link
Author

jarrodCoombes commented May 3, 2023

No, I did not try that yesterday, but I did this morning when I added innodb_strict_mode=OFF to my /etc/mysql/my.cnf file and restarted mysql. Then ran mysql --help --verbose to verify that the setting had taken, it had.

I re-ran the upgrade. Step 9 passed with no error this time, but the problem persists. If I try to edit or create an asset, I get the same 500 error.

But, the error in the log is now:

[2023-05-03 09:00:54] production.ERROR: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column '_snipeit_printer_password_12' in 'field list' in /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php:522

Next Illuminate\Database\QueryException: SQLSTATE[42S22]: Column not found: 1054 Unknown column '_snipeit_printer_password_12' in 'field list' (SQL: update `assets` set `model_id` = 263, `requestable` = 0, `_snipeit_printer_password_12` = ?, `_snipeit_caltronics_tag_11` = ?, `assets`.`updated_at` = 2023-05-03 09:00:54 where `id` = 11460) in /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712

[2023-05-03 09:00:54] production.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column '_snipeit_printer_password_12' in 'field list' (SQL: update `assets` set `model_id` = 263, `requestable` = 0, `_snipeit_printer_password_12` = ?, `_snipeit_caltronics_tag_11` = ?, `assets`.`updated_at` = 2023-05-03 09:00:54 where `id` = 11460) {"userId":5,"exception":"[object] (Illuminate\\Database\\QueryException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column '_snipeit_printer_password_12' in 'field list' (SQL: update `assets` set `model_id` = 263, `requestable` = 0, `_snipeit_printer_password_12` = ?, `_snipeit_caltronics_tag_11` = ?, `assets`.`updated_at` = 2023-05-03 09:00:54 where `id` = 11460) at /var/www/snipe-it/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712)
[stacktrace]

I cannot delete the custom field, I cannot edit it either.

@jarrodCoombes
Copy link
Author

jarrodCoombes commented May 3, 2023

It would appear that all of my custom fields are now missing from whatever table snipe is trying to update. I get a 500 error when trying to save any asset that has a custom field that has either of the last two added custom fields (the two that I used the method in #12257 to fix).

Not sure where to go from here. Is there a way to get snipe to re-create those columns?

The good news is any new custom fields seem to work fine.

@jarrodCoombes
Copy link
Author

jarrodCoombes commented May 3, 2023

php artisan snipeit:regenerate-fieldnames

Results in an error, the output is here:

Output This will regenerate all of the custom field database fieldnames in your database. THIS WILL CHANGE YOUR SCHEMA AND SHOULD NOT BE DONE WITHOUT MAKING A BACKUP FIRST. Do you wish to continue? (yes/no) [no]: > yes

MAC Address (1) column should be _snipeit_mac_address_1
-- ✓ This field exists on the assets table and the value for db_column matches in the custom_fields table.
Password (2) column should be _snipeit_password_2
-- ✓ This field exists on the assets table and the value for db_column matches in the custom_fields table.
Blue Asset Tag (3) column should be _snipeit_blue_asset_tag_3
-- ✓ This field exists on the assets table and the value for db_column matches in the custom_fields table.
IP Address (4) column should be _snipeit_ip_address_4
-- ✓ This field exists on the assets table and the value for db_column matches in the custom_fields table.
Cisco iOS Version (5) column should be _snipeit_cisco_ios_version_5
-- ✓ This field exists on the assets table and the value for db_column matches in the custom_fields table.
OS Version (6) column should be _snipeit_os_version_6
-- ✓ This field exists on the assets table and the value for db_column matches in the custom_fields table.
Insured (7) column should be _snipeit_insured_7
-- ✓ This field exists on the assets table and the value for db_column matches in the custom_fields table.
CPU (8) column should be _snipeit_cpu_8
-- ✓ This field exists on the assets table and the value for db_column matches in the custom_fields table.
RAM (9) column should be _snipeit_ram_9
-- ✓ This field exists on the assets table and the value for db_column matches in the custom_fields table.
Toner Type (10) column should be _snipeit_toner_type_10
-- ✓ This field exists on the assets table and the value for db_column matches in the custom_fields table.
Caltronics Tag (11) column should be _snipeit_caltronics_tag_11

   ErrorException 

  Undefined offset: 11

  at app/Console/Commands/ReEncodeCustomFieldNames.php:95
     91▕                     if ($field->db_column != $field->convertUnicodeDbSlug()) {
     92▕                         $this->error('-- ✘ Field mismatch: '.$field->name.' value should be '.$field->convertUnicodeDbSlug().' but is '.$field->db_column.' in the custom_fields table');
     93▕ 
     94▕                     } else {
  ➜  95▕                         $this->error('-- ✘ Field mismatch: '.$field->name.' column should be '.$field->convertUnicodeDbSlug().' but is '.$custom_field_columns[$field->id].' on the assets table.');
     96▕ 
     97▕                     }
     98▕ 
     99▕ 

  1   app/Console/Commands/ReEncodeCustomFieldNames.php:95
      Illuminate\Foundation\Bootstrap\HandleExceptions::handleError()

      +13 vendor frames 
  15  artisan:35
      Illuminate\Foundation\Console\Kernel::handle()

@jarrodCoombes
Copy link
Author

Any help would be greatly appreciated on this. I am at a complete loss on how to proceed with this. I can neither delete, nor use these custom fields.

@snipe
Copy link
Owner

snipe commented May 4, 2023

There's nothing we've done that would delete or rename custom fields, so to be honest, it's hard to know where to start to help you. It certainly seems like something happened with your 12th custom field, the printer password. Can you show me a screenshot of your custom fields page with all columns visible? (That page would hold no sensitive data, just the fields themselves)

@jarrodCoombes
Copy link
Author

It looks like the issue started with the 11th custom field, which required that sql command to fix the issue. I ran the same command to fix the issue with the 12th field (before I upgraded). It's only those two fields that cause this issue, and I can now add new custom fields and they work fine.

My guess is whatever bug was in the last version that caused #12257 has been fixed in the latest version, but the fix applied has caused some sort of database issue (missing columns in the field list table? Not a SQL person, so I am shaky about db stuff).

Here is the screen shot:

image

@snipe
Copy link
Owner

snipe commented May 4, 2023

missing columns in the field list table?

Definitely wouldn't be that - we do not drop columns. Again, always hard to troubleshoot stuff that's not on our boxes though.

Can you look at the DB and give me the output of a SHOW COLUMNS on the assets table. (Again, no sensitive data would be in there, just column names)

@jarrodCoombes
Copy link
Author

Perhaps not missing, but not named right and not matching what it expects? The code that throws up the error seems to agree with this hypothesis??

Here is the columns on the assets table.

MariaDB [snipeit_data]> show columns from assets;
+------------------------------+------------------+------+-----+---------+----------------+
| Field                        | Type             | Null | Key | Default | Extra          |
+------------------------------+------------------+------+-----+---------+----------------+
| id                           | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| name                         | varchar(191)     | YES  |     | NULL    |                |
| asset_tag                    | varchar(191)     | YES  |     | NULL    |                |
| model_id                     | int(11)          | YES  |     | NULL    |                |
| serial                       | varchar(191)     | YES  | MUL | NULL    |                |
| purchase_date                | date             | YES  |     | NULL    |                |
| asset_eol_date               | date             | YES  |     | NULL    |                |
| purchase_cost                | decimal(20,2)    | YES  |     | NULL    |                |
| order_number                 | varchar(191)     | YES  |     | NULL    |                |
| assigned_to                  | int(11)          | YES  |     | NULL    |                |
| notes                        | text             | YES  |     | NULL    |                |
| image                        | text             | YES  |     | NULL    |                |
| user_id                      | int(11)          | YES  |     | NULL    |                |
| created_at                   | timestamp        | YES  | MUL | NULL    |                |
| updated_at                   | timestamp        | YES  |     | NULL    |                |
| physical                     | tinyint(1)       | NO   |     | 1       |                |
| deleted_at                   | timestamp        | YES  | MUL | NULL    |                |
| status_id                    | int(11)          | YES  |     | NULL    |                |
| archived                     | tinyint(1)       | YES  |     | 0       |                |
| warranty_months              | int(11)          | YES  |     | NULL    |                |
| depreciate                   | tinyint(1)       | YES  |     | NULL    |                |
| supplier_id                  | int(11)          | YES  |     | NULL    |                |
| requestable                  | tinyint(4)       | NO   |     | 0       |                |
| rtd_location_id              | int(11)          | YES  | MUL | NULL    |                |
| _snipeit_mac_address_1       | varchar(191)     | YES  |     | NULL    |                |
| accepted                     | varchar(191)     | YES  |     | NULL    |                |
| last_checkout                | datetime         | YES  |     | NULL    |                |
| expected_checkin             | date             | YES  |     | NULL    |                |
| company_id                   | int(10) unsigned | YES  | MUL | NULL    |                |
| assigned_type                | varchar(191)     | YES  | MUL | NULL    |                |
| last_audit_date              | datetime         | YES  |     | NULL    |                |
| next_audit_date              | date             | YES  |     | NULL    |                |
| location_id                  | int(11)          | YES  |     | NULL    |                |
| checkin_counter              | int(11)          | NO   |     | 0       |                |
| checkout_counter             | int(11)          | NO   |     | 0       |                |
| requests_counter             | int(11)          | NO   |     | 0       |                |
| _snipeit_password_2          | text             | YES  |     | NULL    |                |
| _snipeit_blue_asset_tag_3    | text             | YES  |     | NULL    |                |
| _snipeit_ip_address_4        | text             | YES  |     | NULL    |                |
| _snipeit_cisco_ios_version_5 | text             | YES  |     | NULL    |                |
| _snipeit_os_version_6        | text             | YES  |     | NULL    |                |
| _snipeit_insured_7           | text             | YES  |     | NULL    |                |
| _snipeit_cpu_8               | text             | YES  |     | NULL    |                |
| _snipeit_ram_9               | text             | YES  |     | NULL    |                |
| _snipeit_toner_type_10       | text             | YES  |     | NULL    |                |
| byod                         | tinyint(1)       | YES  |     | 0       |                |
+------------------------------+------------------+------+-----+---------+----------------+
46 rows in set (0.003 sec)

@snipe
Copy link
Owner

snipe commented May 4, 2023

By my best guess, there are columns missing on the assets table that DO exist in the custom fields table. I'm not sure how you'd have gotten there, but we can manually create those columns at least to get you back up to parity.

ALTER TABLE assets ADD COLUMN _snipeit_caltronics_tag_11 text;
ALTER TABLE assets ADD COLUMN _snipeit_printer_password_12 text;

After that, do a SHOW COLUMNS again to make sure those two columns exist on your assets table, then try to re-run your upgrade.

@jarrodCoombes
Copy link
Author

Yay, that seems to have done it. I was able to add it back into the fieldset and then edit an asset and fill in the field.

Thanks for the help! It was one of those "I am pretty sure I know what's wrong, but have no idea how to actually fix it" type things. Also, I learned some new helpful sql commands.

@snipe
Copy link
Owner

snipe commented May 4, 2023

Yay for learning stuff! :) Glad you're all sorted. I still don't have any idea how those columns would have gone away on you, but I'm glad you're handled now.

@snipe snipe closed this as completed May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants