-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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 after login post upgrade #13765
Comments
We'd need app error logs to be able to advise on this. Please provide us with the information requested at the Getting Help documentation:
|
Those errors feel like they're leftover from the v8.2 version. We don't see those at all. |
I've completely deleted v8.2 off the server and IIS configs. The debugbar also said PHP 8.1.24. Is there anything you can recommend trying to narrow down the issue? |
Hi snipe, just an update. I tried running php upgrade.php and was still getting the Could not open input file: upgrade.php. I looked around and found #11658. I ran php artisan migrate and am able to access Snipe-IT now. I'll update if I notice any other issues. php artisan migrateMicrosoft Windows [Version 10.0.17763.4851] (c) 2018 Microsoft Corporation. All rights reserved.C:\inetpub\wwwroot\CMCSnipeIT>php upgrade.php C:\inetpub\wwwroot\CMCSnipeIT>php artisan migrate
Do you really wish to run this command? (yes/no) [no]:
Migrating: 2022_10_25_215520_add_label2_settings |
Debug mode
Describe the bug
After loading Snipe-IT and logging in, receiving 500 SERVER ERROR
--
Troubleshooting steps
Attempting to upgrade from version 6.1.0, installed PHP 8.2, saw it wasn't supported, downgraded to 8.1.24.
After upgrade: "This page isn’t working apps is currently unable to handle this request. HTTP ERROR 500" (not even able to get to Snipe-IT)
Ran handy commands on https://snipe-it.readme.io/docs/common-issues, was getting error
php artisan cache:clear
C:\inetpub\wwwroot\CMCSnipeIT>php artisan cache:clearTypeError
Carbon\Carbon::setLastErrors(): Argument #1 ($lastErrors) must be of type array, bool given, called in C:\inetpub\wwwroot\CMCSnipeIT\vendor\nesbot\carbon\src\Carbon\Traits\Creator.php on line 98
at C:\inetpub\wwwroot\CMCSnipeIT\vendor\nesbot\carbon\src\Carbon\Traits\Creator.php:928
924▕ * @param array $lastErrors
925▕ *
926▕ * @return void
927▕ */
➜ 928▕ private static function setLastErrors(array $lastErrors)
929▕ {
930▕ static::$lastErrors = $lastErrors;
931▕ }
932▕
Whoops\Exception\ErrorException
Using ${var} in strings is deprecated, use {$var} instead
at C:\inetpub\wwwroot\CMCSnipeIT\vendor\facade\ignition\src\SolutionProviders\MergeConflictSolutionProvider.php:52$branch = "'".trim(shell_exec("cd $ {directory}; git branch | grep \* | cut -d ' ' -f2"))."'";
48▕ }
49▕
50▕ protected function getCurrentBranch(string $directory): string
51▕ {
➜ 52▕
53▕
54▕ if ($branch === "''") {
55▕ $branch = 'current branch';
56▕ }
Symfony\Component\ErrorHandler\Error\FatalError
Uncaught Whoops\Exception\ErrorException: Using ${var} in strings is deprecated, use {$var} instead in C:\inetpub\wwwroot\CMCSnipeIT\vendor\facade\ignition\src\SolutionProviders\MergeConflictSolutionProvider.php:52
Stack trace:
#0 C:\inetpub\wwwroot\CMCSnipeIT\vendor\composer\ClassLoader.php(478): Whoops\Run->handleError()
#1 C:\inetpub\wwwroot\CMCSnipeIT\vendor\composer\ClassLoader.php(478): include()
#2 C:\inetpub\wwwroot\CMCSnipeIT\vendor\composer\ClassLoader.php(346): Composer\Autoload\includeFile()
#3 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#4 C:\inetpub\wwwroot\CMCSnipeIT\vendor\facade\ignition\src\SolutionProviders\SolutionProviderRepository.php(50): class_implements()
#5 [internal function]: Facade\Ignition\SolutionProviders\SolutionProviderRepository->Facade\Ignition\SolutionProviders{closure}()
#6 C:\inetpub\wwwroot\CMCSnipeIT\vendor\laravel\framework\src\Illuminate\Collections\Arr.php(717): array_filter()
#7 C:\inetpub\wwwroot\CMCSnipeIT\vendor\laravel\framework\src\Illuminate\Collections\Collection.php(358): Illuminate\Support\Arr::where()
#8 C:\inetpub\wwwroot\CMCSnipeIT\vendor\facade\ignition\src\SolutionProviders\SolutionProviderRepository.php(49): Illuminate\Support\Collection->filter()
#9 C:\inetpub\wwwroot\CMCSnipeIT\vendor\nunomaduro\collision\src\Adapters\Laravel\IgnitionSolutionsRepository.php(36): Facade\Ignition\SolutionProviders\SolutionProviderRepository->getSolutionsForThrowable()
#10 C:\inetpub\wwwroot\CMCSnipeIT\vendor\nunomaduro\collision\src\Writer.php(244): NunoMaduro\Collision\Adapters\Laravel\IgnitionSolutionsRepository->getFromThrowable()
#11 C:\inetpub\wwwroot\CMCSnipeIT\vendor\nunomaduro\collision\src\Writer.php(123): NunoMaduro\Collision\Writer->renderSolution()
#12 C:\inetpub\wwwroot\CMCSnipeIT\vendor\nunomaduro\collision\src\Handler.php(39): NunoMaduro\Collision\Writer->write()
#13 C:\inetpub\wwwroot\CMCSnipeIT\vendor\filp\whoops\src\Whoops\Run.php(370): NunoMaduro\Collision\Handler->handle()
#14 [internal function]: Whoops\Run->handleException()
#15 {main}
thrown
at C:\inetpub\wwwroot\CMCSnipeIT\vendor\facade\ignition\src\SolutionProviders\MergeConflictSolutionProvider.php:52$branch = "'".trim(shell_exec("cd $ {directory}; git branch | grep \* | cut -d ' ' -f2"))."'";
48▕ }
49▕
50▕ protected function getCurrentBranch(string $directory): string
51▕ {
➜ 52▕
53▕
54▕ if ($branch === "''") {
55▕ $branch = 'current branch';
56▕ }
Checked out these issues:
#12357
#13187
#11385
Checked out https://snipe-it.readme.io/docs/installation-issues
Updated composer, ran composer self-update --2.
After upgrading PHP, deleted the contents of the cached views in storage/framework/views once you upgrade PHP, to resolve any cached issues.
php composer install --no-dev --prefer-source Could not open input file: composer
composer install --no-dev --prefer-source
C:\inetpub\wwwroot\CMCSnipeIT>php composer install --no-dev --prefer-source Could not open input file: composerC:\inetpub\wwwroot\CMCSnipeIT>composer install --no-dev --prefer-source
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Package operations: 3 installs, 3 updates, 0 removals
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package fruitcake/laravel-cors is abandoned, you should avoid using it. No replacement was suggested.
Package laravelcollective/html is abandoned, you should avoid using it. Use spatie/laravel-html 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
After that, able to run common issues fixes, SnipeIT loads into login, after login, 500 SERVER ERROR
Found #13747
checking file permissions a la https://snipe-it.readme.io/docs/debugging-permissions
The only file permissions I've seen is back in 3/22, I believe I reinstalled since then because I messed up and ran composer as administrator
permission denied
[2022-03-09 15:20:54] production.ERROR: file_put_contents(C:\inetpub\wwwroot\CMCSnipeIT\storage\framework/cache/d6/ac/d6accc1f5cfa652edaead704f88b9101d10a5d40): failed to open stream: Permission denied {"userId":44,"exception":"[object] (ErrorException(code: 0): file_put_contents(C:\\inetpub\\wwwroot\\CMCSnipeIT\\storage\\framework/cache/d6/ac/d6accc1f5cfa652edaead704f88b9101d10a5d40): failed to open stream: Permission denied at C:\\inetpub\\wwwroot\\CMCSnipeIT\\vendor\\laravel\\framework\\src\\Illuminate\\Filesystem\\Filesystem.php:133)Checked out "Set additional handler mappings" https://snipe-it.readme.io/docs/windowsiis
Noticed wrong handler mappings for PHP, fixed, no change
Reproduction steps
Expected behavior
After logging in, able to access Snipe-IT
Screenshots
No response
Snipe-IT Version
6.1.0/6.2.3
Operating System
Windows
Web Server
IIS
PHP Version
8.1.24
Operating System
Windows
Browser
Google Chrome
Version
118.0.5993.71
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
Additional context
No response
The text was updated successfully, but these errors were encountered: