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

"500 Server Error" when creating or editing any asset models #11203

Closed
2 tasks done
Squidjigg opened this issue May 26, 2022 · 18 comments
Closed
2 tasks done

"500 Server Error" when creating or editing any asset models #11203

Squidjigg opened this issue May 26, 2022 · 18 comments

Comments

@Squidjigg
Copy link

Debug mode

Describe the bug

Attempting to create or edit any models from the Asset Model blade, produces a "500 | Server Error" message.
Deleting an existing asset model functions correctly.
Creating a new asset model only works from within the Create Asset page.

Reproduction steps

Create a new Asset Model:

  1. Select Settings
  2. Select Asset Models
  3. Select Create New, "500 Server Error" page displays.

Edit an existing Asset Model:

  1. Select Settings
  2. Select Asset Models
  3. Select an existing asset model, then select Update icon, "500 Server Error" page displays.

Expected behavior

We expected that selecting the Create New icon in the Asset Models blade would allow us to create a new model, or selecting Update on an existing asset model would allow us to edit the asset model detail.
This expected behaviour had functioned correctly in versions prior to v.6.0.x

Screenshots

No response

Snipe-IT Version

6.0.2

Operating System

Ubuntu 20.04

Web Server

Apache

PHP Version

7.4.3

Operating System

Windows 10

Browser

Microsoft Edge

Version

101

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

Exception: The /var/www/html/snipeit/bootstrap/cache directory must be present and writable. in /var/www/html/snipeit/vendor/livewire/livewire/src/LivewireComponentsFinder.php:59
Stack trace:
#0 /var/www/html/snipeit/vendor/livewire/livewire/src/LivewireComponentsFinder.php(51): Livewire\LivewireComponentsFinder->write()
#1 /var/www/html/snipeit/vendor/livewire/livewire/src/LivewireComponentsFinder.php(38): Livewire\LivewireComponentsFinder->build()
#2 /var/www/html/snipeit/vendor/livewire/livewire/src/LivewireComponentsFinder.php(26): Livewire\LivewireComponentsFinder->getManifest()
#3 /var/www/html/snipeit/vendor/livewire/livewire/src/LivewireManager.php(66): Livewire\LivewireComponentsFinder->find()
#4 /var/www/html/snipeit/vendor/livewire/livewire/src/LivewireManager.php(84): Livewire\LivewireManager->getClass()
#5 /var/www/html/snipeit/vendor/livewire/livewire/src/LifecycleManager.php(29): Livewire\LivewireManager->getInstance()
#6 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Support/helpers.php(263): Livewire\LifecycleManager::Livewire\{closure}()
#7 /var/www/html/snipeit/vendor/livewire/livewire/src/LifecycleManager.php(41): tap()
#8 /var/www/html/snipeit/vendor/livewire/livewire/src/LivewireManager.php(104): Livewire\LifecycleManager::fromInitialRequest()
#9 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Livewire\LivewireManager->mount()
#10 /var/www/html/snipeit/storage/framework/views/9e897a98705889bc175f7c9287da3c3eba1c3ba3.php(31): Illuminate\Support\Facades\Facade::__callStatic()
#11 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(107): require('/var/www/html/s...')
#12 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(108): Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}()
#13 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(58): Illuminate\Filesystem\Filesystem->getRequire()
#14 /var/www/html/snipeit/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php(69): Illuminate\View\Engines\PhpEngine->evaluatePath()
#15 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(61): Livewire\CompilerEngineForIgnition->evaluatePath()
#16 /var/www/html/snipeit/vendor/facade/ignition/src/Views/Engines/CompilerEngine.php(37): Illuminate\View\Engines\CompilerEngine->get()
#17 /var/www/html/snipeit/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php(35): Facade\Ignition\Views\Engines\CompilerEngine->get()
#18 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(139): Livewire\CompilerEngineForIgnition->get()
#19 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(122): Illuminate\View\View->getContents()
#20 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(91): Illuminate\View\View->renderContents()
#21 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Http/Response.php(69): Illuminate\View\View->render()
#22 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Http/Response.php(35): Illuminate\Http\Response->setContent()
#23 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(820): Illuminate\Http\Response->__construct()
#24 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(789): Illuminate\Routing\Router::toResponse()
#25 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(721): Illuminate\Routing\Router->prepareResponse()
#26 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#27 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#28 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Auth\Middleware\Authenticate->handle()
#29 /var/www/html/snipeit/app/Http/Middleware/AssetCountForSidebar.php(55): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#30 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\AssetCountForSidebar->handle()
#31 /var/www/html/snipeit/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#32 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle()
#33 /var/www/html/snipeit/app/Http/Middleware/CheckForTwoFactor.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#34 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForTwoFactor->handle()
#35 /var/www/html/snipeit/app/Http/Middleware/CheckUserIsActivated.php(47): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#36 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckUserIsActivated->handle()
#37 /var/www/html/snipeit/app/Http/Middleware/CheckLocale.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#38 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckLocale->handle()
#39 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#40 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
#41 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#42 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#43 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#44 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\EncryptCookies->handle()
#45 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#46 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(723): Illuminate\Pipeline\Pipeline->then()
#47 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(698): Illuminate\Routing\Router->runRouteWithinStack()
#48 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(662): Illuminate\Routing\Router->runRoute()
#49 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(651): Illuminate\Routing\Router->dispatchToRoute()
#50 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Illuminate\Routing\Router->dispatch()
#51 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
#52 /var/www/html/snipeit/vendor/livewire/livewire/src/DisableBrowserCache.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#53 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Livewire\DisableBrowserCache->handle()
#54 /var/www/html/snipeit/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#55 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle()
#56 /var/www/html/snipeit/vendor/fruitcake/laravel-cors/src/HandleCors.php(38): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#57 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\Cors\HandleCors->handle()
#58 /var/www/html/snipeit/app/Http/Middleware/PreventBackHistory.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#59 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\PreventBackHistory->handle()
#60 /var/www/html/snipeit/app/Http/Middleware/SecurityHeaders.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#61 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\SecurityHeaders->handle()
#62 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#63 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#64 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()
#65 /var/www/html/snipeit/app/Http/Middleware/CheckForDebug.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#66 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForDebug->handle()
#67 /var/www/html/snipeit/app/Http/Middleware/CheckForSetup.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#68 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForSetup->handle()
#69 /var/www/html/snipeit/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#70 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle()
#71 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#72 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#73 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#74 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
#75 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\StartSession->handle()
#76 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#77 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#78 /var/www/html/snipeit/app/Http/Middleware/NoSessionStore.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#79 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\NoSessionStore->handle()
#80 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#81 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\Pipeline\Pipeline->then()
#82 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#83 /var/www/html/snipeit/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle()
#84 {main}

Next Facade\Ignition\Exceptions\ViewException: The /var/www/html/snipeit/bootstrap/cache directory must be present and writable. (View: /var/www/html/snipeit/resources/views/models/edit.blade.php) in /var/www/html/snipeit/vendor/livewire/livewire/src/LivewireComponentsFinder.php:59
Stack trace:
#0 /var/www/html/snipeit/vendor/livewire/livewire/src/LivewireComponentsFinder.php(51): Livewire\LivewireComponentsFinder->write()
#1 /var/www/html/snipeit/vendor/livewire/livewire/src/LivewireComponentsFinder.php(38): Livewire\LivewireComponentsFinder->build()
#2 /var/www/html/snipeit/vendor/livewire/livewire/src/LivewireComponentsFinder.php(26): Livewire\LivewireComponentsFinder->getManifest()
#3 /var/www/html/snipeit/vendor/livewire/livewire/src/LivewireManager.php(66): Livewire\LivewireComponentsFinder->find()
#4 /var/www/html/snipeit/vendor/livewire/livewire/src/LivewireManager.php(84): Livewire\LivewireManager->getClass()
#5 /var/www/html/snipeit/vendor/livewire/livewire/src/LifecycleManager.php(29): Livewire\LivewireManager->getInstance()
#6 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Support/helpers.php(263): Livewire\LifecycleManager::Livewire\{closure}()
#7 /var/www/html/snipeit/vendor/livewire/livewire/src/LifecycleManager.php(41): tap()
#8 /var/www/html/snipeit/vendor/livewire/livewire/src/LivewireManager.php(104): Livewire\LifecycleManager::fromInitialRequest()
#9 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Livewire\LivewireManager->mount()
#10 /var/www/html/snipeit/resources/views/models/edit.blade.php(39): Illuminate\Support\Facades\Facade::__callStatic()
#11 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(107): require('/var/www/html/s...')
#12 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(108): Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}()
#13 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(58): Illuminate\Filesystem\Filesystem->getRequire()
#14 /var/www/html/snipeit/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php(69): Illuminate\View\Engines\PhpEngine->evaluatePath()
#15 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(61): Livewire\CompilerEngineForIgnition->evaluatePath()
#16 /var/www/html/snipeit/vendor/facade/ignition/src/Views/Engines/CompilerEngine.php(37): Illuminate\View\Engines\CompilerEngine->get()
#17 /var/www/html/snipeit/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php(35): Facade\Ignition\Views\Engines\CompilerEngine->get()
#18 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(139): Livewire\CompilerEngineForIgnition->get()
#19 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(122): Illuminate\View\View->getContents()
#20 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/View.php(91): Illuminate\View\View->renderContents()
#21 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Http/Response.php(69): Illuminate\View\View->render()
#22 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Http/Response.php(35): Illuminate\Http\Response->setContent()
#23 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(820): Illuminate\Http\Response->__construct()
#24 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(789): Illuminate\Routing\Router::toResponse()
#25 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(721): Illuminate\Routing\Router->prepareResponse()
#26 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#27 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#28 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Auth\Middleware\Authenticate->handle()
#29 /var/www/html/snipeit/app/Http/Middleware/AssetCountForSidebar.php(55): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#30 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\AssetCountForSidebar->handle()
#31 /var/www/html/snipeit/vendor/laravel/passport/src/Http/Middleware/CreateFreshApiToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#32 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle()
#33 /var/www/html/snipeit/app/Http/Middleware/CheckForTwoFactor.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#34 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForTwoFactor->handle()
#35 /var/www/html/snipeit/app/Http/Middleware/CheckUserIsActivated.php(47): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#36 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckUserIsActivated->handle()
#37 /var/www/html/snipeit/app/Http/Middleware/CheckLocale.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#38 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckLocale->handle()
#39 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#40 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
#41 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#42 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#43 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#44 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\EncryptCookies->handle()
#45 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#46 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(723): Illuminate\Pipeline\Pipeline->then()
#47 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(698): Illuminate\Routing\Router->runRouteWithinStack()
#48 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(662): Illuminate\Routing\Router->runRoute()
#49 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Router.php(651): Illuminate\Routing\Router->dispatchToRoute()
#50 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Illuminate\Routing\Router->dispatch()
#51 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
#52 /var/www/html/snipeit/vendor/livewire/livewire/src/DisableBrowserCache.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#53 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Livewire\DisableBrowserCache->handle()
#54 /var/www/html/snipeit/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#55 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle()
#56 /var/www/html/snipeit/vendor/fruitcake/laravel-cors/src/HandleCors.php(38): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#57 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\Cors\HandleCors->handle()
#58 /var/www/html/snipeit/app/Http/Middleware/PreventBackHistory.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#59 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\PreventBackHistory->handle()
#60 /var/www/html/snipeit/app/Http/Middleware/SecurityHeaders.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#61 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\SecurityHeaders->handle()
#62 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#63 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#64 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()
#65 /var/www/html/snipeit/app/Http/Middleware/CheckForDebug.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#66 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForDebug->handle()
#67 /var/www/html/snipeit/app/Http/Middleware/CheckForSetup.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#68 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\CheckForSetup->handle()
#69 /var/www/html/snipeit/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#70 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle()
#71 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#72 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#73 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#74 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
#75 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\StartSession->handle()
#76 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#77 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#78 /var/www/html/snipeit/app/Http/Middleware/NoSessionStore.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#79 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): App\Http\Middleware\NoSessionStore->handle()
#80 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#81 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\Pipeline\Pipeline->then()
#82 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#83 /var/www/html/snipeit/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle()
#84 {main}

Additional context

This issue was noticed after we upgraded to version 6.0.0. Upgrading to version 6.0.1 then 6.0.2 did not make any difference.
The strange thing is that why we are unable to edit or create asset models from the Asset Model blade, we can still delete them and we can create a new model from within the Create Asset page.

The log mentions that The /var/www/html/snipeit/bootstrap/cache directory must be present and writable which is does exist and is writable by the web server user www-data

Previously (when we had version 5.4.x running), we had run the tasks to fix server permissions to fix another issue https://snipe-it.readme.io/docs/debugging-permissions
Applying these same steps now did not fix the issue for us.

@welcome
Copy link

welcome bot commented May 26, 2022

👋 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.

@Squidjigg Squidjigg changed the title "500 Server Error" when editing any asset models "500 Server Error" when creating or editing any asset models May 26, 2022
@snipe
Copy link
Owner

snipe commented May 26, 2022

Exception: The /var/www/html/snipeit/bootstrap/cache directory must be present and writable. in /var/www/html/snipeit/vendor/livewire/livewire/src/LivewireComponentsFinder.php:59

@uberbrady is this just a permissions problem, or is it something funny with LW?

@DSenger1789
Copy link

  1. Commenting to follow thread.

@snipe
Copy link
Owner

snipe commented May 26, 2022

@DSenger1789 you can just hit the "subscribe" button on the right-hand side of an issue.

Screen Shot 2022-05-26 at 12 11 31 PM

@Optic00
Copy link

Optic00 commented May 27, 2022

fixed the issue by doing chmod 755 on /var/www/html/snipeit/bootstrap/cache

@MarquetteIT
Copy link

MarquetteIT commented May 27, 2022

Same issue, but chmod -R 755 /var/www/html/snipeit/bootstrap/cache did not work for me.

Same 500 | Server Error when going to an asset and going to Actions --> Edit Model.

I am however able to make a new model when creating a new Asset.

@snipe
Copy link
Owner

snipe commented May 27, 2022

Same 500 | Server Error when going to an asset and going to Actions --> Edit Model.

We'd need a stack trace from your error logs.

@MarquetteIT
Copy link

MarquetteIT commented May 27, 2022

Same 500 | Server Error when going to an asset and going to Actions --> Edit Model.

We'd need a stack trace from your error logs.

https://flareapp.io/share/x7X6jqRm#F85

Flare
The /var/www/html/snipeit/bootstrap/cache directory must be present and writable. (View: /var/www/html/snipeit/resources/views/models/edit.blade.php) - The error occurred at https://assets.mtcves.net/models/create

@snipe
Copy link
Owner

snipe commented May 27, 2022

The /var/www/html/snipeit/bootstrap/cache directory must be present and writable.

@MarquetteIT
Copy link

MarquetteIT commented May 27, 2022

The /var/www/html/snipeit/bootstrap/cache directory must be present and writable.

here is the output of ls -la for /var/www/html/snipeit/bootstrap directory.

drwxr-xr-x 3 ituser www-data 4096 May 18 14:29 .
drwxr-xr-x 18 ituser www-data 4096 May 26 21:55 ..
-rwxr-xr-x 1 ituser www-data 1602 May 18 14:29 app.php
-rwxr-xr-x 1 ituser www-data 1079 May 18 14:29 autoload.php
drwxr-xr-x 2 ituser www-data 4096 May 27 19:48 cache

ituser is the non root account used to run composer

@snipe
Copy link
Owner

snipe commented May 27, 2022

Do you have SELinux installed?

@MarquetteIT
Copy link

Do you have SELinux installed?

No, I do not.

@snipe
Copy link
Owner

snipe commented May 27, 2022

Well, it's clearly a permissions issue tho - the system is telling you what's wrong. So either it's a weird owner/group problem, or SElinux is actually installed and being a butthole (which it does).

@MarquetteIT
Copy link

Thanks @snipe I was able to get it working by doing chmod -R 777 on the cache folder.

@Squidjigg
Copy link
Author

Squidjigg commented May 30, 2022

Our cache folder and files within are set to 755:

drwxr-xr-x  2 user www-data 4096 May 25 16:42 cache/

-rwxrwxr-x 1 user user  4041 May 25 16:42 packages.php*
-rwxrwxr-x 1 user user 18828 May 25 16:42 services.php*

In testing, changing the cache folder and files to 777 does fix it, yet is this best practice?
(EDIT: permission 775 on the cache folder also works)

I did notice that after changing permissions and running php upgrade.php on our installation, it added the file livewire-components.php to our cache folder (which was not there previously).

@hdering
Copy link

hdering commented May 31, 2022

FYI:
I first enabled debug (https://snipe-it.readme.io/docs/getting-help).
I had incorrect permissions on the /var/www/html/snipeit/storage/logs/ directory.
The following solved it:
chown noroot:www-data /var/www/html/snipeit/storage/logs/ -R

In our upgrade guide I also noted that we always adjust/correct the permissions as follows:

chown noroot:noroot /var/www/html/snipeit -R
chown noroot:www-data /var/www/html/snipeit/public/ -R
chown noroot:www-data /var/www/html/snipeit/storage/ -R
chown noroot:www-data /var/www/html/snipeit/storage/logs/ -R
 
chmod g+w /var/www/html/snipeit/public/ -R
chmod g+w /var/www/html/snipeit/storage/ -R

@Squidjigg
Copy link
Author

Got this working for us by doing the following:

  1. Changed the permission of our cache folder to chmod 775.
  2. Ran an update on our SnipeIT instance (php upgrade.php), so that the livewire-components.php file gets created in our cache folder.
  3. Changed the permission of our cache folder back to chmod 755.

Creating and editing models from the Asset Models blade now work again after applying these steps above.

It would seem the livewire-components.php file must be present in the cache folder for it to work, I can't recall if it was present in versions v.5.x.x

@XPGCaboose
Copy link

Got this working for us by doing the following:

  1. Changed the permission of our cache folder to chmod 775.
  2. Ran an update on our SnipeIT instance (php upgrade.php), so that the livewire-components.php file gets created in our cache folder.
  3. Changed the permission of our cache folder back to chmod 755.

Creating and editing models from the Asset Models blade now work again after applying these steps above.

It would seem the livewire-components.php file must be present in the cache folder for it to work, I can't recall if it was present in versions v.5.x.x

Thanks. This sorted out my issue of being unable to create or edit asset models. For anyone else's information, the cache folder in my instance was /var/www/html/snipeit/bootstrap/cache for those who like me are noobs to ubuntu.

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

7 participants