Error after upgrading to 29.4.1

September 5, 2024 7:02 PM

After upgrading to 29.4.1 we are getting the following error on startup:

System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=CMS.LicenseProvider StackTrace: at CMS.LicenseProvider.LicenseModule.SetInstanceId(Object sender, EventArgs e) at CMS.Base.AbstractHandler.CallEventHandler[TArgs](EventHandler1 h, TArgs e) at CMS.Base.AbstractHandler.Raise[TArgs](String partName, List1 list, TArgs e, Boolean important) at CMS.Base.SimpleHandler2.RaiseExecute(TArgs e) at CMS.Base.SimpleHandler2.RaiseExecute(TArgs e) at CMS.Base.SimpleHandler`2.StartEvent(TArgs e) at CMS.DataEngine.CMSApplication.Init() at Kentico.Web.Mvc.StartupConfigureActionBase.InitCmsApplication() at Kentico.Web.Mvc.StartupConfigureActionBase.Initialize() at Kentico.Web.Mvc.StandardStartupService.Initialize() at Kentico.Web.Mvc.IStartupConfigureActionExtensions.InitializeServices(IStartupConfigureAction startupService, IServiceProvider serviceProvider) at Kentico.Web.Mvc.IApplicationBuilderExtensions.InitKentico(IApplicationBuilder builder) at Program.<Main>$(String[] args) in C:\dev\repos\cc-com-2024\src\CancerCare.Web\Program.cs:line 142

This exception was originally thrown at this call stack: [External Code] Program.<Main>$(string[]) in Program.cs

We ran all the upgrade steps but are still getting the error.

It looks like we may not be the only one : https://devnet.kentico.com/questions/unable-to-start-the-application-after-29-1-4-29-4-0-upgrade-and-ci-import


Environment

  • Xperience by Kentico version: 29.4.1
  • .NET version: 8
  • Deployment environment: Azure / Local

Answers

September 5, 2024 8:30 PM

I think a lot more information is required about your project and the process you used for the update for people to help you 😄.

  • What version did you update from?
  • What type of license key are you using? License keys application or the new License Key setting in the Settings application?
  • Are you using CI? If so, did you follow the process for updating with CI?
  • Are you sure all your projects have all their Xperience by Kentico NuGet packages updated to the 29.4.1? Did you also update your npm packages if you are doing admin customization?
  • Are you using any of Kentico's 1st party integrations or any 3rd party Xperience libraries? If so, did you update those as well?
  • What does your ASP.NET Core middleware registration look like? Do you have custom middleware at the beginning of the pipeline?

I just ran a test update from v29.1.0 to v29.4.1 using a sample Dancing Goat project and the upgrade worked perfectly.

I am using the License Keys application.

September 27, 2024 1:36 PM
  • we upgraded from version 29.1.0
  • we upgraded all the projects
  • we did not have any custom integrations
  • we didn't have any custom middleware

We reverted the database and tried the upgrade again and it's working now. We may have not run the CI correctly. That's my best guess, anyhow!

To answer this question, you have to login first.