Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Levente Kosa 136 posts 352 karma points
    Jun 03, 2018 @ 07:52
    Levente Kosa
    0

    Can't login after Umbraco upgrade

    After upgrade from 7.6.2 to 7.10.4 I can't login into back-office. I got a PostLogin 500 error with this message:

    "Value cannot be null.
    ↵Parameter name: value"
    ExceptionType
    :
    "System.ArgumentNullException"
    Message
    :
    "An error has occurred."
    StackTrace
    :
    "   at System.Security.Claims.Claim..ctor(String type, String value, String valueType, String issuer, String originalIssuer, ClaimsIdentity subject, String propertyKey, String propertyValue)
    ↵   at Umbraco.Core.Security.UmbracoBackOfficeIdentity.AddUserDataClaims()
    ↵   at Umbraco.Core.Security.BackOfficeClaimsIdentityFactory`1.<CreateAsync>d__3.MoveNext()
    ↵--- End of stack trace from previous location where exception was thrown ---
    ↵   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    ↵   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    ↵   at Umbraco.Core.Models.Identity.BackOfficeIdentityUser.<GenerateUserIdentityAsync>d__3.MoveNext()
    ↵--- End of stack trace from previous location where exception was thrown ---
    ↵   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    ↵   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    ↵   at Umbraco.Core.Security.BackOfficeSignInManager.<SignInAsync>d__8.MoveNext()
    ↵--- End of stack trace from previous location where exception was thrown ---
    ↵   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    ↵   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    ↵   at Umbraco.Core.Security.BackOfficeSignInManager.<SignInOrTwoFactor>d__7.MoveNext()
    ↵--- End of stack trace from previous location where exception was thrown ---
    ↵   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    ↵   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    ↵   at Umbraco.Core.Security.BackOfficeSignInManager.<PasswordSignInAsyncImpl>d__6.MoveNext()
    ↵--- End of stack trace from previous location where exception was thrown ---
    ↵   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    ↵   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    ↵   at Umbraco.Core.Security.BackOfficeSignInManager.<PasswordSignInAsync>d__5.MoveNext()
    ↵--- End of stack trace from previous location where exception was thrown ---
    ↵   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    ↵   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    ↵   at Umbraco.Web.Editors.AuthenticationController.<PostLogin>d__13.MoveNext()
    ↵--- End of stack trace from previous location where exception was thrown ---
    ↵   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    ↵   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    ↵   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()
    ↵--- End of stack trace from previous location where exception was thrown ---
    ↵   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    ↵   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    ↵   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
    ↵--- End of stack trace from previous location where exception was thrown ---
    ↵   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    ↵   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    ↵   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    ↵--- End of stack trace from previous location where exception was thrown ---
    ↵   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    ↵   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    ↵--- End of stack trace from previous location where exception was thrown ---
    ↵   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    ↵   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    ↵   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
    ↵--- End of stack trace from previous location where exception was thrown ---
    ↵   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    ↵   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    ↵   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    ↵--- End of stack trace from previous location where exception was thrown ---
    ↵   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    ↵   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
    ↵--- End of stack trace from previous location where exception was thrown ---
    ↵   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    ↵   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    ↵   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
    ↵--- End of stack trace from previous location where exception was thrown ---
    ↵   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    ↵   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    ↵   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
    ↵--- End of stack trace from previous location where exception was thrown ---
    ↵   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    ↵   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    ↵   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
    ↵--- End of stack trace from previous location where exception was thrown ---
    ↵   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    ↵   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    ↵   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()" 
    
  • Andy Felton 185 posts 484 karma points c-trib
    Jun 03, 2018 @ 09:07
    Andy Felton
    1

    Hi,

    When you were running V7.6.2 did you have useLegacyEncoding set to true (this would have been the case if you've upgraded previously from a version before 7.6.0). Maybe worth a check?

    I would suggest not jumping straight from V7.6.2 to V7.10.4 as it makes debugging difficult, it's such a huge jump. As you're having problems try the latest patch release of the version you're on first (V7.6.13) and then the latest version of the next minor release (V7.7.13), etc. Makes it easier to debug if you have any issues.

    A useful blog to read is https://codeshare.co.uk/blog/how-to-upgrade-umbraco-safely/.

    Hope that helps Andy

  • Levente Kosa 136 posts 352 karma points
    Jun 03, 2018 @ 16:55
    Levente Kosa
    0

    Hi Andy,

    Thanks for your advice, it helped a lot. The useLegacyEncoding didn't work, but I started with smaller steps and upgraded to 7.6.13 successfully. Unfortunately 7.7.13 didn't work again, neither 7.7.0 right after 7.6.13. The problem is now: /umbraco/backoffice/UmbracoApi/Authentication/PostLogin gives 400 and I googled a lot, but nothing really helped. Any advice?

  • Andy Felton 185 posts 484 karma points c-trib
    Jun 04, 2018 @ 07:33
    Andy Felton
    0

    Hi Levente,

    Can you confirm your environment please? Is it AWS/Azure is it load balanced or is this just a local machine?

    Thanks Andy

  • Levente Kosa 136 posts 352 karma points
    Jun 04, 2018 @ 08:08
    Levente Kosa
    0

    Local machine. Thanks

  • Andy Felton 185 posts 484 karma points c-trib
    Jun 04, 2018 @ 08:19
    Andy Felton
    1

    Ok as it's a local machine that should rule out a few things, for starters I'd check the following:

    • Check the database (umbracoUser) for the account you're logging in as and ensure it's not locked (userDisabled and userNoConsole should both be zero
    • Check you've got no URL rewrite rules in web config - if you have temporarily disable them
    • Recently there has been a problem with Chrome try logging in with another browser
    • Is the database from a live server - did that server have a machine key in web.config? If so ensure that machine key is also being used on the local machine.

    Hope one of these help. Andy

  • Andy Felton 185 posts 484 karma points c-trib
    Jun 04, 2018 @ 08:20
    Andy Felton
    0

    Also check the log file (App-Data\logs) to see if there is more information in there?

  • Levente Kosa 136 posts 352 karma points
    Jun 04, 2018 @ 08:40
    Levente Kosa
    0

    Hi,

    Thanks for all your advice, I really appreciate your help.

    • I checked locked status: no
    • no rewrite rules
    • I tried in other browser, but the same
    • I didn't find any machine key

    But here is the log, maybe you found something useful in it:

     2018-06-04 09:37:19,342 [P1188/D37/T134] ERROR Umbraco.Core.Persistence.UmbracoDatabase - Exception (6abbd403).
    System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'umbracoUser2UserGroup'.
       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, Boolean shouldCacheForAlwaysEncrypted)
       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()
       at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
       at Umbraco.Core.Persistence.Database.<Query>d__115`1.MoveNext()
    ClientConnectionId:9eee7bb8-f367-4a50-8640-d94556c5b708
    Error Number:208,State:1,Class:16
     2018-06-04 09:37:19,353 [P1188/D37/T134] INFO  Umbraco.Core.Security.BackOfficeSignInManager - Event Id: 0, state: Login attempt failed for username [email protected] from IP address ::1
    
  • Andy Felton 185 posts 484 karma points c-trib
    Jun 04, 2018 @ 08:52
    Andy Felton
    0

    Hi,

    Have you seen the migrations run yet for this upgrade would pass through the Authorise Upgrade screen? If not (and to check anyway) set the umbracoConfigurationStatus back to 7.6.13. Also ensure the user for connecting to the database has sufficient rights to delete database tables!

    Probably wise to have a backup of each database prior to upgrading (so backup @ 7.6.13 then @ 7.7.0, etc) if you haven't already done this!

    Thanks Andy

  • Simon Dingley 1470 posts 3427 karma points c-trib
    Jun 04, 2018 @ 10:36
    Simon Dingley
    0

    Check the umbracoMigration table for the last migration that ran, most likely still says 7.6.13 still meaning the migrations have not run for 7.7.x and the tables don't exist.

  • Simon Dingley 1470 posts 3427 karma points c-trib
    Jun 04, 2018 @ 12:47
    Simon Dingley
    100

    Having encountered this with a few other upgrades I suspect the issue is due to the fact that the dll's for 7.7.x are in the bin directory and when you attempt to login they are trying to look for new user-related tables which don't yet exist.

    The way in which I worked around this was to make sure I was logged in first in the version before 7.7.x, then run the nuget upgrade and my login session should still be persisted for me to run through the in-browser upgrade without logging in again. Once you are over this hurdle you can proceed with the other upgrades as normal as the required tables will then exist.

Please Sign in or register to post replies

Write your reply to:

Draft