-
-
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
Users page empty / individual users cause Error 500 #9357
Comments
👋 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. |
Did you run migrations? |
Apologies, I left that part out by mistake. php artisan migrate gives me the following: C:\inetpub\wwwroot\snipe-it>php artisan migrate
Migrating: 2019_06_12_184327_rename_groups_table Illuminate\Database\QueryException : SQLSTATE[42S01]: Base table or view alr at C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Databas Exception trace: 1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[42S01]: Base table or view a 2 PDOException::("SQLSTATE[42S01]: Base table or view already exists: 1050 T Please use the argument -v to see more details. |
I am also encountering this issue. Trying to perform a migration and upgrade from V4.8.0 to V5.1.4. Also, it isn't just the users page for me. I am encountering this issue on the accessories page as well. I am able to query the database tables for these respective items so the data is there. I need to get this migration done so are we aware of a stable version without this issue that I can attempt to migrate to? My php artisan migrate looks like this: Migrating: 2018_07_28_023826_create_checkout_acceptances_table Illuminate\Database\QueryException : SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'checkout_acceptances' already exists (SQL: create table at /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669
Exception trace: 1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'checkout_acceptances' already exists") 2 PDOException::("SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'checkout_acceptances' already exists") Please use the argument -v to see more details. |
I believe accessories are also affected in our installation, but I only attempted it with a new accessory as we had not yet used the feature. Error is the same, talking about column not found, 1054 Unknown column 'accessories_users.note' in 'field list' |
So it looks like your migrations table got messed up somehow, and it's trying to re-run a migration that's already happened. Can you show me the contents of your migrations table? |
Table attached (CSV not supported by github, so XLSX!). |
Ugh, okay - I really meant just the text, but ...
It definitely looks like your migrations got stuck. You should have 303 or so migrations, not 289. Try running |
Apologies about the file--I'm relatively new to web servers and Github. This appears to have fixed the issue! Users and accessories are showing up. I will continue to use the program and build it out and see if anything else goes wrong, but very happy to have users working again! Thank you very much! The result from migration: Migrating: 2019_07_23_140906_add_show_assigned_assets_to_settings Migrating: 2019_08_20_084049_add_custom_remote_user_header |
Excellent - glad you're sorted! |
Please confirm you have done the following before posting your bug report:
Describe the bug
A clear and concise description of what the bug is.
After an upgrade from 4.9.4 to 5.1.3 and various other permission issues/other issues, Snipe-IT is running almost fully. However, the People/Users page is completely blank, and trying to go into a single user page (e.g. http:///users/1) throws an Error 500.
The users are still in the database and assets can still be assigned.
Thank you!
Screenshots
If applicable, add screenshots to help explain your problem.
Server (please complete the following information):
Desktop (please complete the following information):
Error Messages
Illuminate \ Database \ QueryException (42S22)
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'accessories_users.note' in 'field list' (SQL: select
accessories
.*,accessories_users
.assigned_to
aspivot_assigned_to
,accessories_users
.accessory_id
aspivot_accessory_id
,accessories_users
.id
aspivot_id
,accessories_users
.created_at
aspivot_created_at
,accessories_users
.note
aspivot_note
fromaccessories
inner joinaccessories_users
onaccessories
.id
=accessories_users
.accessory_id
whereaccessories_users
.assigned_to
in (1))Previous exceptions
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'accessories_users.note' in 'field list' (42S22)
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'accessories_users.note' in 'field list' (42S22)
C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Connection.php
* @param array $bindings
* @param \Closure $callback
* @return mixed
*
* @throws \Illuminate\Database\QueryException
*/
protected function runQueryCallback($query, $bindings, Closure $callback)
{
// To execute the statement, we'll simply call the callback, which will actually
// run the SQL against the PDO connection. Then we can calculate the time it
// took to execute and log the query SQL, bindings and time in our memory.
try {
$result = $callback($query, $bindings);
}
Arguments
"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'accessories_users.note' in 'field list' (SQL: select
accessories
.*,accessories_users
.assigned_to
▶"storage/logs
and your webserver's logs.[stacktrace]
#0 C:\inetpub\wwwroot\snipe-it\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php(67): PDO->prepare()
Fix depreciation math #1 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Connection.php(331): Doctrine\DBAL\Driver\PDOConnection->prepare()
Ability for admin to check out an asset to a user #2 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Connection.php(662): Illuminate\Database\Connection->Illuminate\Database\{closure}()
Add reports - depreciation, people with no assets, etc #3 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Connection.php(629): Illuminate\Database\Connection->runQueryCallback()
Add category back to Models blade/controller #4 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Connection.php(338): Illuminate\Database\Connection->run()
Needs sexy dashboard summary #5 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Query\Builder.php(2159): Illuminate\Database\Connection->select()
Disallow models/depreciations/categories to be deleted if they have assets associated #6 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Query\Builder.php(2147): Illuminate\Database\Query\Builder->runSelect()
Add location to users, propagate those to assets #7 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Query\Builder.php(2619): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
Figure out how to handle multi-seat licenses #8 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Query\Builder.php(2148): Illuminate\Database\Query\Builder->onceWithColumns()
Search box isn't hooked up to anything #9 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php(546): Illuminate\Database\Query\Builder->get()
Improve UI of category display to show nesting #10 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Relations\BelongsToMany.php(650): Illuminate\Database\Eloquent\Builder->getModels()
Build-out ACLs to set who can view which sections (reports, etc) #11 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Relations\Relation.php(144): Illuminate\Database\Eloquent\Relations\BelongsToMany->get()
A user (non-admin) should be able to request an asset [$15] #12 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php(594): Illuminate\Database\Eloquent\Relations\Relation->getEager()
Column sorting on table displays #13 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php(563): Illuminate\Database\Eloquent\Builder->eagerLoadRelation()
Add "clone" option in edit screen for assets #14 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php(531): Illuminate\Database\Eloquent\Builder->eagerLoadRelations()
Option to mark assets as requestable. #15 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Concerns\BuildsQueries.php(143): Illuminate\Database\Eloquent\Builder->get()
Child assets linked to parent assets (HDD, replacement parts, etc) [$100] #16 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php(354): Illuminate\Database\Eloquent\Builder->first()
Add warrantee field to assets/models #17 C:\inetpub\wwwroot\snipe-it\app\Http\Controllers\Users\UsersController.php(407): Illuminate\Database\Eloquent\Builder->find()
Move validation out of the controllers and into the models where it belongs #18 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Controller.php(54): App\Http\Controllers\Users\UsersController->show()
Seed database with models, manufacturers, categories, etc. #19 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction()
Import functions for users, assets, models, etc #20 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Route.php(219): Illuminate\Routing\ControllerDispatcher->dispatch()
Merge licenses table into assets table #21 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Route.php(176): Illuminate\Routing\Route->runController()
Fix depreciation on model vs asset #22 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(681): Illuminate\Routing\Route->run()
Support multiple companies [$500 awarded] #23 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(130): Illuminate\Routing\Router->Illuminate\Routing\{closure}()
Tighten up checkin/checkout UX #24 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Auth\Middleware\Authenticate.php(43): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
Show number of assets for each asset model in listing page #25 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Auth\Middleware\Authenticate->handle()
Handle errors more sanely when nothing in the DB #26 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\AssetCountForSidebar.php(56): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
Depreciation fix #27 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\AssetCountForSidebar->handle()
Fix tables on mobile #28 C:\inetpub\wwwroot\snipe-it\vendor\laravel\passport\src\Http\Middleware\CreateFreshApiToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
Integrate barcode generation #29 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle()
Confirmation screens on delete #30 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\CheckForTwoFactor.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
Fixing bootstrap process with default values. #31 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckForTwoFactor->handle()
Added confirmation popups for deletes #32 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\CheckLocale.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
Add notion of lost, stolen, out for deployment, RTD, etc #33 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckLocale->handle()
Update asset index/view blade to reflect new status #34 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
Add CSV export for reports #35 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
Make the Edit Profile page look less assy #36 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
incorrect command chown in README #37 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
Develop #38 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
Implement settings #39 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Cookie\Middleware\EncryptCookies->handle()
Settings edit #40 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
Add asset_type to Asset controller #41 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(683): Illuminate\Pipeline\Pipeline->then()
Fix delete-check on licenses #42 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(658): Illuminate\Routing\Router->runRouteWithinStack()
Fix checkout for licenses #43 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(624): Illuminate\Routing\Router->runRoute()
Fix depreciation report with new licenses structure #44 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(613): Illuminate\Routing\Router->dispatchToRoute()
When you soft-delete a user, should free up all associated resources #45 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(170): Illuminate\Routing\Router->dispatch()
Fix miscount on assets in user view #46 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(130): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
When the number of seats is edited, handle that smartly #47 C:\inetpub\wwwroot\snipe-it\vendor\barryvdh\laravel-debugbar\src\Middleware\InjectDebugbar.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
LDAP authentication #48 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle()
Calendar view(s) for asset check out/in, due date, etc. [$20] #49 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\SecurityHeaders.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
XSS Issues #50 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\SecurityHeaders->handle()
Add postcode to locations #51 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
Make the report columns sortable #52 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
Add autocomplete to the search box #53 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\CheckForDebug.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
New button weirdly placed on my iPad (3rd gen) #54 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckForDebug->handle()
Show months until asset is fully depreciated #55 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\CheckForSetup.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
Disable sorting on action column #56 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\CheckForSetup->handle()
Spaces get filtered out #57 C:\inetpub\wwwroot\snipe-it\vendor\fideloper\proxy\src\TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
Modal stops passing title/message/href through if modal is canceled #58 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Fideloper\Proxy\TrustProxies->handle()
Checkin message is wrong #59 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
CSRF protect all of the things #60 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
DB seed fails when mysql is in strict mode #61 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(56): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
Add 'retired' status #62 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Session\Middleware\StartSession->handle()
Asset Notes #63 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
Notifications for when warranties are expiring... #64 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle()
Invalid SQL #65 C:\inetpub\wwwroot\snipe-it\app\Http\Middleware\NoSessionStore.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
Broken Gravatar URL in SSL-only environments #66 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): App\Http\Middleware\NoSessionStore->handle()
Patch 1 #67 C:\inetpub\wwwroot\snipe-it\vendor\barryvdh\laravel-cors\src\HandlePreflight.php(29): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
Fix insecure content warnings #68 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(171): Barryvdh\Cors\HandlePreflight->handle()
Initial install script failing on db installation, tries to drop tables that don't exist #69 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
Modify the Assets and Licenses controllers and database schemas to work #70 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(145): Illuminate\Pipeline\Pipeline->then()
Can't edit address fields on locations #71 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
Add address to location form #72 C:\inetpub\wwwroot\snipe-it\public\index.php(58): Illuminate\Foundation\Http\Kernel->handle()
Email input types #73 {main}
php -m
(this should display what modules you have enabled.)[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
gd
hash
iconv
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
Phar
readline
Reflection
session
SimpleXML
SPL
standard
tokenizer
xml
xmlreader
xmlwriter
zip
zlib
[Zend Modules]
Additional context
The text was updated successfully, but these errors were encountered: