No service for type 'Litium.Web.Products.PriceAgents.IPriceAgent' has been registered

Hi,

We’ve been getting a lot of this errors lately and it seems that the code is no longer traceable in our end. I could not find the source of this exception. I think this has been triggered somewhere in Litium.Web.Products.PriceAgents.PriceAgentController.Index which is no where to be found in our solution. Although this does not pose any problems but the logs are quite a bit alarming. Has anyone had this problem before? Is there any lacking in our end to implement to prevent this error?

For more details this is from the exception log that we got.

No service for type 'Litium.Web.Products.PriceAgents.IPriceAgent' has been registered.

System.InvalidOperationException: No service for type 'Litium.Web.Products.PriceAgents.IPriceAgent' has been registered.
   at Litium.Application.Runtime.DependencyInjection.NamedServiceFactoryImpl.GetRequiredService(Type serviceType, String name)
   at Litium.Runtime.DependencyInjection.NamedServiceProviderExtensions.GetRequiredNamedService[T](IServiceProvider provider, String name)
   at Litium.Web.Products.PriceAgents.PriceAgentController.Index(String name, Boolean refresh, String urlprefix)
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c.<BeginInvokeSynchronousActionMethod>b__9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_0.<InvokeActionMethodFilterAsynchronouslyRecursive>b__0()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_6.<BeginInvokeAction>b__4()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_1.<BeginInvokeAction>b__1(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.<>c.<BeginExecuteCore>b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.<>c.<BeginProcessRequest>b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Please advise. Thanks in advance.

Litium version: [7.6.1]

Can you access IIS logs or Event logs to find what URL was requested when the error was triggered?

It could be that a request comes in for a missing price agent, either because it was removed or because it doesn’t exist.

It happens also if PriceAgent-property isn’t set to Yes on the channel in BO. Maybe someone has changed it by mistake, which was the reason in our case.

Hi,

Thank you all for the response.

@NilsN I checked the URL and the request was from /PriceAgent.axd/facebook

I aslo checked @aram’s suggestion and all PriceAgent property are set to Yes.
I tried to set it to No and the crash logs seems to stop probably because the feature is turned off.

Is the request url sent by a task?

Thanks in advance!

I’d say the request is coming from something external. Have you set up any related to product feeds and Facebook? The default installation doesn’t include a Facebook product feed agent.

Hi,
Thanks for the response. I’ll verify this in our end.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.