-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Whoops! When creating user in pre-flight #6710
Comments
Monitoring this issue as I'm getting the same error on a bone-stock CentOS7 install of SnipeIT using the install.sh script: |
Same issue. Running on a fresh install of Ubuntu 18.04.1 LTS. |
I kinda don't understand why this would just be coming up. That field was created over a year ago. Are you all maybe using the same version of MySQL, maybe a newer one? (In the future, instead of just the "Me too"s, it would be helpful if you tell us versions of Snipe-IT, PHP, MySQL, etc. ) |
In
to
and let me know if that helps. |
@Tester2009 without more information, I have no way of knowing whether your issue is related or not. It doesn't sound like it is. |
@snipe, firstly thank you for your quick response. I really appreciate all the work you've put into this project and I'm looking forward to getting an instance running for my team. I'm using CentOS within a VM using vSphere server, so it's easy for me to use snapshots to try different fixes. I'm running from a snapshot of after installation with I tried your suggestion above of modifying I have a hunch it's something to do with MariaDB/MySQL, as the installer may be pulling a more recent version for some of us than Snipe-IT has been tested with. I'm quite happy to revert my MariaDB/MySQL to an earlier version if you can recommend a version you know works - can you let me know which versions the CentOS: 7.6.1810 Steps to reproduce: Again, thanks for your help! |
@metrodleal okay, let's try this: In Change:
to:
You'll have to start over, as the tables will need to be recreated with that modifier. Alternatively, if you can access the database directly, try running:
|
I'd rather fix this in the code, as we have lots of users who aren't as comfortable downgrading databases, etc. - but I suspect you're right. My guess would be null value treatment changed in a Maria/MySQL version somewhere. Otherwise we'd have been seeing this since... checks migration date.... 2014. |
I just merged that PR that includes another migration to set that field to explicitly nullable. Try pulling it down from master and running migrations, then trying your pre-flight again. |
Up and running! Thanks @snipe, you rock! |
Yep - I was midway through applying your second tweak when I saw your comment, so I just scrubbed the VM and did a new install from master. No hassle at at all - I'm both impressed at your quick skillz and glad to have helped in nailing down the fix for future releases! |
It's much appreciated. We try really hard to keep compatibility working across tons of different scenarios (distros, database versions, etc - some people actually run Snipe-IT on a raspberry pi!), but it can be a moving target, and sometimes we miss something. I'm always glad to bang out a fix sooner rather than later to prevent a buttload of new issues and tons of frustration on the user's side. |
Can confirm that by using Thank you for your prompt and accurate assistance! |
I'm looking forward to trying this at the office in the morning! Thank you so much for the extremely prompt reply and (hopeful) fix! I hope you don't mind me leaving this open until I'm able to test it myself, though I fully suspect I won't be having any problems. |
Confirmed that the issue is fixed on our end as well! Once again, thank you so much for providing an incredible response time for us. |
Describe the bug
I am unable to create my first user account in the pre-flight, or rather it is being created because I can't register with the same email, but I only receive the Whoops! error and cannot proceed.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The user is created (im assuming, the email is considered in-use after this), but I am given an error and the pre-flight does not progress beyond this.
Screenshots
If applicable, add screenshots to help explain your problem.
Server (please complete the following information):
Desktop (please complete the following information):
Error Messages
(3/3) QueryExceptionSQLSTATE[23000]: Integrity constraint violation: 1048 Column 'auto_increment_prefix' cannot be null (SQL: insert into
settings
(full_multiple_companies_support
,site_name
,alert_email
,alerts_enabled
,pwd_secure_min
,brand
,locale
,default_currency
,user_id
,email_domain
,email_format
,next_auto_tag_base
,auto_increment_assets
,auto_increment_prefix
,updated_at
,created_at
) values (0, Test Asset Management, test.inventory@gmail.com, 1, 10, 1, en, USD, 1, gmail.com, filastname, 1, 0, , 2019-02-13 20:39:24, 2019-02-13 20:39:24))in Connection.php line 647
at Connection->runQueryCallback('insert into
settings
(full_multiple_companies_support
,site_name
,alert_email
,alerts_enabled
,pwd_secure_min
,brand
,locale
,default_currency
,user_id
,email_domain
,email_format
,next_auto_tag_base
,auto_increment_assets
,auto_increment_prefix
,updated_at
,created_at
) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array(0, 'Test Asset Management', 'test.inventory@gmail.com', 1, 10, 1, 'en', 'USD', 1, 'gmail.com', 'filastname', 1, 0, null, '2019-02-13 20:39:24', '2019-02-13 20:39:24'), object(Closure))in Connection.php line 607at Connection->run('insert into
settings
(full_multiple_companies_support
,site_name
,alert_email
,alerts_enabled
,pwd_secure_min
,brand
,locale
,default_currency
,user_id
,email_domain
,email_format
,next_auto_tag_base
,auto_increment_assets
,auto_increment_prefix
,updated_at
,created_at
) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array(0, 'Test Asset Management', 'test.inventory@gmail.com', 1, 10, 1, 'en', 'USD', 1, 'gmail.com', 'filastname', 1, 0, null, '2019-02-13 20:39:24', '2019-02-13 20:39:24'), object(Closure))in Connection.php line 450at Connection->statement('insert into
settings
(full_multiple_companies_support
,site_name
,alert_email
,alerts_enabled
,pwd_secure_min
,brand
,locale
,default_currency
,user_id
,email_domain
,email_format
,next_auto_tag_base
,auto_increment_assets
,auto_increment_prefix
,updated_at
,created_at
) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array(0, 'Test Asset Management', 'test.inventory@gmail.com', 1, 10, 1, 'en', 'USD', 1, 'gmail.com', 'filastname', 1, 0, null, '2019-02-13 20:39:24', '2019-02-13 20:39:24'))in Connection.php line 404at Connection->insert('insert into
settings
(full_multiple_companies_support
,site_name
,alert_email
,alerts_enabled
,pwd_secure_min
,brand
,locale
,default_currency
,user_id
,email_domain
,email_format
,next_auto_tag_base
,auto_increment_assets
,auto_increment_prefix
,updated_at
,created_at
) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array(0, 'Test Asset Management', 'test.inventory@gmail.com', 1, 10, 1, 'en', 'USD', 1, 'gmail.com', 'filastname', 1, 0, null, '2019-02-13 20:39:24', '2019-02-13 20:39:24'))in Processor.php line 32at Processor->processInsertGetId(object(Builder), 'insert into
settings
(full_multiple_companies_support
,site_name
,alert_email
,alerts_enabled
,pwd_secure_min
,brand
,locale
,default_currency
,user_id
,email_domain
,email_format
,next_auto_tag_base
,auto_increment_assets
,auto_increment_prefix
,updated_at
,created_at
) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', array(0, 'Test Asset Management', 'test.inventory@gmail.com', 1, 10, 1, 'en', 'USD', 1, 'gmail.com', 'filastname', 1, 0, null, '2019-02-13 20:39:24', '2019-02-13 20:39:24'), 'id')in Builder.php line 2133at Builder->insertGetId(array('full_multiple_companies_support' => 0, 'site_name' => 'Test Asset Management', 'alert_email' => 'test.inventory@gmail.com', 'alerts_enabled' => 1, 'pwd_secure_min' => 10, 'brand' => 1, 'locale' => 'en', 'default_currency' => 'USD', 'user_id' => 1, 'email_domain' => 'gmail.com', 'email_format' => 'filastname', 'next_auto_tag_base' => 1, 'auto_increment_assets' => 0, 'auto_increment_prefix' => null, 'updated_at' => '2019-02-13 20:39:24', 'created_at' => '2019-02-13 20:39:24'), 'id')in Builder.php line 1251
at Builder->__call('insertGetId', array(array('full_multiple_companies_support' => 0, 'site_name' => 'Test Asset Management', 'alert_email' => 'test.inventory@gmail.com', 'alerts_enabled' => 1, 'pwd_secure_min' => 10, 'brand' => 1, 'locale' => 'en', 'default_currency' => 'USD', 'user_id' => 1, 'email_domain' => 'gmail.com', 'email_format' => 'filastname', 'next_auto_tag_base' => 1, 'auto_increment_assets' => 0, 'auto_increment_prefix' => null, 'updated_at' => '2019-02-13 20:39:24', 'created_at' => '2019-02-13 20:39:24'), 'id'))in Model.php line 688
at Builder->insertGetId(array('full_multiple_companies_support' => 0, 'site_name' => 'Test Asset Management', 'alert_email' => 'test.inventory@gmail.com', 'alerts_enabled' => 1, 'pwd_secure_min' => 10, 'brand' => 1, 'locale' => 'en', 'default_currency' => 'USD', 'user_id' => 1, 'email_domain' => 'gmail.com', 'email_format' => 'filastname', 'next_auto_tag_base' => 1, 'auto_increment_assets' => 0, 'auto_increment_prefix' => null, 'updated_at' => '2019-02-13 20:39:24', 'created_at' => '2019-02-13 20:39:24'), 'id')in Model.php line 688
at Model->insertAndSetId(object(Builder), array('full_multiple_companies_support' => 0, 'site_name' => 'Test Asset Management', 'alert_email' => 'test.inventory@gmail.com', 'alerts_enabled' => 1, 'pwd_secure_min' => 10, 'brand' => 1, 'locale' => 'en', 'default_currency' => 'USD', 'user_id' => 1, 'email_domain' => 'gmail.com', 'email_format' => 'filastname', 'next_auto_tag_base' => 1, 'auto_increment_assets' => 0, 'auto_increment_prefix' => null, 'updated_at' => '2019-02-13 20:39:24', 'created_at' => '2019-02-13 20:39:24'))in Model.php line 653
at Model->performInsert(object(Builder))in Model.php line 522
at Model->save()in SettingsController.php line 187
at SettingsController->postSaveFirstAdmin(object(SetupUserRequest))
at call_user_func_array(array(object(SettingsController), 'postSaveFirstAdmin'), array(object(SetupUserRequest)))in Controller.php line 55
at Controller->callAction('postSaveFirstAdmin', array(object(SetupUserRequest)))in ControllerDispatcher.php line 44
at ControllerDispatcher->dispatch(object(Route), object(SettingsController), 'postSaveFirstAdmin')in Route.php line 204
at Route->runController()in Route.php line 160
at Route->run()in Router.php line 572
at Router->Illuminate\Routing{closure}(object(Request))in Pipeline.php line 30
at Pipeline->Illuminate\Routing{closure}(object(Request))in CreateFreshApiToken.php line 49
at CreateFreshApiToken->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in CheckForTwoFactor.php line 49
at CheckForTwoFactor->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in CheckLocale.php line 42
at CheckLocale->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in VerifyCsrfToken.php line 65
at VerifyCsrfToken->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in EncryptCookies.php line 59
at EncryptCookies->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in Pipeline.php line 102
at Pipeline->then(object(Closure))in Router.php line 574
at Router->runRouteWithinStack(object(Route), object(Request))in Router.php line 533
at Router->dispatchToRoute(object(Request))in Router.php line 511
at Router->dispatch(object(Request))in Kernel.php line 176
at Kernel->Illuminate\Foundation\Http{closure}(object(Request))in Pipeline.php line 30
at Pipeline->Illuminate\Routing{closure}(object(Request))in Debugbar.php line 51
at Debugbar->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in TransformsRequest.php line 30
at TransformsRequest->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in CheckForDebug.php line 25
at CheckForDebug->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in CheckForSetup.php line 35
at CheckForSetup->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in TrustProxies.php line 56
at TrustProxies->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in NosniffGuard.php line 17
at NosniffGuard->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in ContentSecurityPolicyHeader.php line 18
at ContentSecurityPolicyHeader->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in ReferrerPolicyHeader.php line 17
at ReferrerPolicyHeader->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in XssProtectHeader.php line 18
at XssProtectHeader->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in FrameGuard.php line 17
at FrameGuard->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in StartSession.php line 64
at StartSession->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in CheckForMaintenanceMode.php line 46
at CheckForMaintenanceMode->handle(object(Request), object(Closure))in Pipeline.php line 148
at Pipeline->Illuminate\Pipeline{closure}(object(Request))in Pipeline.php line 53
at Pipeline->Illuminate\Routing{closure}(object(Request))in Pipeline.php line 102
at Pipeline->then(object(Closure))in Kernel.php line 151
at Kernel->sendRequestThroughRouter(object(Request))in Kernel.php line 116
at Kernel->handle(object(Request))in index.php line 59
Additional context
I was wondering if possibly this error was from installing composer with the sudo command, or possibly PHP, but I really have no experience with Linux in the first place so it could be anything. I really appreciate any advice.
The text was updated successfully, but these errors were encountered: