We have moved to GitHub Issues
You are viewing the read-only archive of Umbraco's issue tracker. To create new issues, please head over to GitHub Issues.
Make sure to read the blog posts announcing the move for more information.
Created by Stephan 11 Jul 2017, 06:59:23 Updated by Shannon Deminick 01 Aug 2017, 07:51:57
Relates to: U4-7907
Subtask of: U4-8632
The new user groups break 7.7 upgrade bc user cannot log into 7.7 bc the code expects tables that aren't there
PR here: https://github.com/umbraco/Umbraco-CMS/pull/2057
NOTE: This PR also contains code to complete http://issues.umbraco.org/issue/U4-7907
To Test:
Damnit, just noticed i have to change something with this, i'll fix
Ok, will put this back in to review. Basically I need to remove this part https://github.com/umbraco/Umbraco-CMS/pull/2057/files#diff-5fc41f65b668eadac27a7d0fb2ef4be0R110 we cannot do this query without the security data because then the user's groups are not filled in which turn into the user's 'Roles' which go into the auth ticket that is created there. But... i'll fix that once this is reviewed and merged.
@zpqrtbnk I've just pushed new changes that fix up some of the Roles stuff and the user lookup mentioned above. There's a lot in this branch and there might be stuff that is fixed in here that overlaps with what you might be working on so hopefully you don't end up debugging stuff that might already be fixed here.
Test: took an existing 7.6 database and tried to upgrade to 7.7 with your PR + latest user-group-permissions. Still getting an error when trying to log in to authorize the upgrade:
"Message":"An error has occurred.",
"ExceptionMessage":"Invalid object name 'umbracoUser2UserGroup'.",
"ExceptionType":"System.Data.SqlClient.SqlException",
"StackTrace":"
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClass5_0.<ExecuteReaderWithRetry>b__0() in D:\\d\\Umbraco 7.7\\src\\Umbraco.Core\\Persistence\\PetaPocoCommandExtensions.cs:line 125
at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func) in D:\\d\\Umbraco 7.7\\src\\Umbraco.Core\\Persistence\\FaultHandling\\RetryPolicy.cs:line 174
at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteReaderWithRetry(IDbCommand command, RetryPolicy cmdRetryPolicy, RetryPolicy conRetryPolicy) in D:\\d\\Umbraco 7.7\\src\\Umbraco.Core\\Persistence\\PetaPocoCommandExtensions.cs:line 110
at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteReaderWithRetry(IDbCommand command, RetryPolicy retryPolicy) in D:\\d\\Umbraco 7.7\\src\\Umbraco.Core\\Persistence\\PetaPocoCommandExtensions.cs:line 93
at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteReaderWithRetry(IDbCommand command) in D:\\d\\Umbraco 7.7\\src\\Umbraco.Core\\Persistence\\PetaPocoCommandExtensions.cs:line 80
at Umbraco.Core.Persistence.Database.<Query>d__115`1.MoveNext() in D:\\d\\Umbraco 7.7\\src\\Umbraco.Core\\Persistence\\PetaPoco.cs:line 1205
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Umbraco.Core.Persistence.Database.Fetch[T1,T2,T3,T4,TRet](Func`5 cb, Sql sql) in D:\\d\\Umbraco 7.7\\src\\Umbraco.Core\\Persistence\\PetaPoco.cs:line 929
at Umbraco.Core.Persistence.Repositories.UserRepository.PerformGetByQuery(IQuery`1 query) in D:\\d\\Umbraco 7.7\\src\\Umbraco.Core\\Persistence\\Repositories\\UserRepository.cs:line 216
at Umbraco.Core.Persistence.Repositories.RepositoryBase`2.GetByQuery(IQuery`1 query) in D:\\d\\Umbraco 7.7\\src\\Umbraco.Core\\Persistence\\Repositories\\RepositoryBase.cs:line 278
at Umbraco.Core.Services.UserService.GetByEmail(String email) in D:\\d\\Umbraco 7.7\\src\\Umbraco.Core\\Services\\UserService.cs:line 189
at Umbraco.Core.Security.BackOfficeUserStore.FindByEmailAsync(String email) in D:\\d\\Umbraco 7.7\\src\\Umbraco.Core\\Security\\BackOfficeUserStore.cs:line 303
at Microsoft.AspNet.Identity.UserValidator`2.<ValidateEmailAsync>d__8.MoveNext()
-
which seems to come from BackOfficeUserValidator, and BackOfficeSignInManager, and ultimately AutenticationController.PostLogin.
Will try again - but if you can test again too?
Would be in BackOfficeSignInManager.SignInAsync when doing UserManager.UpdateAsync(user) to track the last login date ... ends up validating the user ... and trying to find the user by email ... looking at the PR but getting slightly confused ... would love if you can test again?
Have verified the problem there. The reason you encountered this problem was because you were entering the wrong password - but good catch! I've updated the PR so now it won't try to validate the user if it's just updating it's AccessFailedCount
Re-tested OK + the avatar thing still works, merging.
Priority: Normal
Type: Task
State: Fixed
Assignee:
Difficulty: Normal
Category:
Backwards Compatible: True
Fix Submitted:
Affected versions:
Due in version: 7.7.0
Sprint: Sprint 64
Story Points: 3
Cycle: