November Happy Hour will be moved to Thursday December 5th.

Upgrade Episerver CMS 11 to 12, ReportingInitializationModule issue

Vote:
 

Hi,

I'm trying to upgrade Episerver CMS & Commerce to latest version. Also from .NET Framework to .NET core.

Struggle with different points, some of them with database but able to go through it.

However one that can't understand is when running the prject it hangs on the initialization process, and debugging it I can see that is hanging on the ReportingInitializationModule 

When trying to ge tthe instance for

     ServiceProviderExtensions.GetInstance<ReportingOrderEventListener>(context.Locate.Advanced);

There are no specific error in the output window and the website goes on an endless loop.

Any tips?

#313712
Edited, Dec 05, 2023 14:42
Vote:
 

If you use the break feature in Visual Studio, and disable Just My Code option, can you get the stacktrace?

ReportingInitializationModule will intentionally get an instance of ReportingOrderEventListener to initiate it (adding events or so). may be it stucks with some of the dependencies 

#313714
Dec 05, 2023 14:54
Vote:
 

I've disabled


unable to get the stacktrace

#313717
Dec 05, 2023 15:25
Vote:
 

Did you try to start debugging then break it? 

#313718
Dec 05, 2023 16:18
Vote:
 

Sorry, didn't understood correctly the "break" you were mentioning

I didn't went throw all but just come to mind that we've a customer IShippingPlugin, I've disabled all our IConfigurableModule and ModuleDependencies and now it's working.



Now it's necessary to go one by one and see which one is breaking.

Also, I couldn't find in documentation how the new UI for the IShippingPlugin and Gateway could be configured/designed. Is there any link you can help with?

Thanks for the help and quick responses

#313724
Dec 05, 2023 16:56
Vote:
 

Sorry, didn't understood correctly the "break" you were mentioning

I didn't went throw all but just come to mind that we've a customer IShippingPlugin, I've disabled all our IConfigurableModule and ModuleDependencies and now it's working.



Now it's necessary to go one by one and see which one is breaking.

Also, I couldn't find in documentation how the new UI for the IShippingPlugin and Gateway could be configured/designed. Is there any link you can help with?

Thanks for the help and quick responses

#313725
Dec 05, 2023 16:56
Vote:
 

When you start an app with debugging, if it "stucks", you can use the Break function to see what the stack trace is 

In later versions of Commerce (which it seems you are using), you can configure the settings here (not sure if that's what you meant)

#313767
Dec 06, 2023 9:44
Vote:
 

@Quan Mai 

Can a IShippingPlugin class inject IOrderRepository and/or IOrderNoteService on the constructor?

I've that working in the previous version of Commerce before the upgrade to the latest one, in .NET Core

I'm getting in the endless loop, that's the issue related with the topic I raised

#313790
Edited, Dec 06, 2023 16:04
Vote:
 

I don't know for sure, the dependency around Order system is pretty complicated. If you get circular reference, the workaround is to use ServiceAccessor<IOrderRepository> instead of IOrderRepository. I'm not exactly a fan of ServiceAccessor<IOrderRepository> because every time you call it it will build the dependency tree which is costly. but given that you are using it for IShippingPlugin which would not be called a lot, and if there is no better option, then you can go ahead with that.

#313795
Dec 06, 2023 17:04
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.