U4-10545 - Unable to login locally when upgrading 7.6.9 -> 7.7.2

Created by Dan White 17 Oct 2017, 00:39:11 Updated by Christian Thillemann 27 Feb 2018, 20:50:43

Relates to: U4-10988

I've just updated our Umbraco Cloud dev instance to 7.7.2 without issues. I've pulled down the update and am attempting to complete the upgrade in my local dev environment. However, I am unable to login to authorize the update. Below is the error returned by PostLogin. I'm running on (localdb)\MSSQLLocalDB locally.

{ "Message": "An error has occurred.", "ExceptionMessage": "Value cannot be null.\r\n Parameter name: rawPasswordValue", "ExceptionType": "System.ArgumentNullException", "StackTrace": " at Umbraco.Core.Models.Membership.User..ctor(Int32 id, String name, String email, String username, String rawPasswordValue, IEnumerable1 userGroups, Int32[] startContentIds, Int32[] startMediaIds)\r\n at Umbraco.Core.Persistence.Factories.UserFactory.BuildEntity(UserDto dto)\r\n at Umbraco.Core.Services.UserService.GetByUsername(String username)\r\n at Umbraco.Core.Security.BackOfficeUserStore.<FindByNameAsync>d__10.MoveNext()\r\n --- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Umbraco.Core.Security.BackOfficeSignInManager.<PasswordSignInAsyncImpl>d__6.MoveNext()\r\n --- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Umbraco.Core.Security.BackOfficeSignInManager.<PasswordSignInAsync>d__5.MoveNext()\r\n --- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Umbraco.Web.Editors.AuthenticationController.<PostLogin>d__13.MoveNext()\r\n --- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__31.MoveNext()\r\n --- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext()\r\n --- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext()\r\n --- End of stack trace from previous location where exception was thrown ---\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext()\r\n --- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__0.MoveNext()\r\n --- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext()\r\n --- End of stack trace from previous location where exception was thrown ---\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext()\r\n --- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.d__0.MoveNext()\r\n --- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext()\r\n --- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()" }

Comments

Kenneth Hein Møller 11 Dec 2017, 09:50:08

I stumpled upon the same issue. Clear your cookies and all is well :)


Kenneth Hein Møller 11 Dec 2017, 10:34:59

I have this issue too. Getting the same error in PostLogin. Deleting the cookies did not help after all.


Ambert van Unen 14 Dec 2017, 08:49:24

Same here when upgrading from 7.6.8 to 7.7.7, will try it in steps and update this message.

  • Edit. Tried updating from 7.6.8 to 7.7.0, same issue. Seems to be something in this upgrade...


Kenneth Hein Møller 14 Dec 2017, 20:03:46

I tried different things. Ended up making a new web application, installed Umbraco 7.7.6. SQL scriptet the missing/new tables in 7.7.6, which were not present in the 7.2.4 version i was upgrading. After that i also disabled all my IIS URL Rewrite rules. And then I started the upgrade using Google Chrome in Incognito mode. Finally I was able to upgrade Umbraco 7.2.4 to 7.7.6.


Maciej Rakowski 04 Jan 2018, 14:51:37

Same here while trying to upgrade from 7.6.12 to 7.7.7.


Dan Evans 16 Feb 2018, 10:14:51

Is there a solution to this. I've tried all of the above. I am trying to upgrade from 7.6.13 to 7.7.11


Dan Evans 16 Feb 2018, 10:49:43

@khm1985 I've tried all of these things. To no avail! Any hep/advice greatly received.


Maciej Rakowski 16 Feb 2018, 11:41:06

@Dan.Evans My solution was to get the backup of db from dev enviroment and restore it locally (we have a solution hosted in umbraco cloud). But I'm not sure if that's helpful or even possible for you.


Dan Evans 16 Feb 2018, 11:45:53

@Rakoo Thanks but I'm not sure how that will help. I have a backup but the database hasn't changed as i haven't completed the upgrade. I've only upgraded the code not run the installer.


Maciej Rakowski 16 Feb 2018, 13:37:09

@Dan.Evans In my case the first update to 7.7.7 happened in umbraco cloud dev enviroment via auto update through umbraco cloud backend. That left db in usable state in umbraco cloud dev enviroment (able to login and work with it) which I restored locally. Hope that makes sense


Lennard Fonteijn 19 Feb 2018, 14:27:06

This has happened twice to me now in 1 week.


Lennard Fonteijn 19 Feb 2018, 15:51:33

Okay, I hooked up the debugger and figured it out. I'll create a new issue with more details, as this can potentially cause A LOT more issues than just a failed login.


Lennard Fonteijn 19 Feb 2018, 17:02:25

Workaround found. Run the following Query in your DB prior to attempting to run the upgrade:

This will move the startMediaID-column to the end of the table instead, you might have to execute line by line. Order is important! ALTER TABLE umbracoUser ADD startMediaID2 int UPDATE umbracoUser SET umbracoUser.startMediaID2 = umbracoUser.startMediaID ALTER TABLE umbracoUser DROP COLUMN startMediaID ALTER TABLE umbracoUser ADD startMediaID int UPDATE umbracoUser SET umbracoUser.startMediaID = umbracoUser.startMediaID2 ALTER TABLE umbracoUser DROP COLUMN startMediaID2

Then recycle your AppPool, you have to do this to clear the internal Umbraco cache.

If you also happened to have installed Umbraco Deploy, it could be your User to UserGroup mappings are lost. Dive into the database and re-assign all your admin users to userGroupId 1 in umbracoUser2UserGroup-table.


Christian Thillemann 27 Feb 2018, 20:50:43

I ran into a corrupt upgrade, deleting the following tables and running the upgrade again fixed the problem for me. I ran this from a LinqPad script.

ExecuteCommand("DROP TABLE CmsMedia"); 
ExecuteCommand("DROP TABLE UmbracoUser2UserGroup");
ExecuteCommand("DROP TABLE UmbracoUserGroup2App");
ExecuteCommand("DROP TABLE UmbracoUserGroup2NodePermission");
ExecuteCommand("DROP TABLE UmbracoUserLogin");
ExecuteCommand("DROP TABLE UmbracoUserStartNode");
ExecuteCommand("DROP TABLE UmbracoUserGroup");


Priority: Show-stopper

Type: Bug

State: Workaround posted

Assignee:

Difficulty: Normal

Category: Installation

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.7.6, 7.7.7

Due in version:

Sprint:

Story Points:

Cycle: