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()"
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.
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?
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.
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!
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.
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.
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:
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
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?
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
Local machine. Thanks
Ok as it's a local machine that should rule out a few things, for starters I'd check the following:
Hope one of these help. Andy
Also check the log file (App-Data\logs) to see if there is more information in there?
Hi,
Thanks for all your advice, I really appreciate your help.
But here is the log, maybe you found something useful in it:
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
Check the
umbracoMigration
table for the last migration that ran, most likely still says7.6.13
still meaning the migrations have not run for7.7.x
and the tables don't exist.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.
is working on a reply...