Price agents blank

Hi,

Our price agent feeds are not being saved, on any environment.
We have implemented a custom IPriceAgentItemFactory.
In web.config we’ set productCatalog enablePriceAgent=“true”
On channel setting we have Price agents set to Yes

When debugging I can get the priceagent factory to run, I can see that we create every field needed, I’m handling exceptions in the factory and logging to event log
But after triggering the price agent to be generated the only thin in the log is this message:
Price agent feed should be refreshed or cache files does not exists, channel 9bc8dcaf-b4c5-42ec-adfc-f37bc5699ca5.
and after it:
(Channel Name (9bc8dcaf-b4c5-42ec-adfc-f37bc5699ca5): Found 1843 variants that was published on the channel, 0 returned no data from ‘CustomPriceAgentItemFactory, Project.Utilities’ and is excluded.
And after that, when visiting either feed it’s just a blank page, nothing, only a 200 code.

What can I do? where do I look?

Litium version: 7.2.0

Have you enable the price agent feed on the channel? (BO\Settings\Channels)

Yes, it’s enabled on all channels

If you check the file-log in trace-mode, will that tell you anything more about what happen?

No additional logging in Event Log in trace mode. Where do I find file-log?

nlog is configured from the nlog.config that lives in the wwwroot folder, ini that file you can find the path the logging will write to and also configure how and what that should be logged.

The log shows me this:

2019-06-13 10:09:53.9130 [App:02] [54560974-a5c8-46c0-b57b-7577253c84a2] [INFO ] [] Litium.Web.Products.PriceAgents.IPriceAgentItemFactory - Channel: Found 1843 variants that was published on the website, 0 returned no data from price agent factory and is excluded, 529 items missing stock and is excluded, 0 have errors. 
2019-06-13 10:09:53.9130 [App:02] [54560974-a5c8-46c0-b57b-7577253c84a2] [TRACE] [] Litium.Web.Products.PriceAgents.IPriceAgentItemFactory - Created price agent feed containing 1314 items. 
2019-06-13 10:09:53.9130 [App:02] [54560974-a5c8-46c0-b57b-7577253c84a2] [TRACE] [] Litium.Web.Products.PriceAgents.IPriceAgentItemFactory - Writing 1314 items to cache. 
2019-06-13 10:09:53.9269 [App:02] [54560974-a5c8-46c0-b57b-7577253c84a2] [TRACE] [] Litium.Application.Runtime.RollingFileService - Creating new cache file for 9bc8dcaf-b4c5-42ec-adfc-f37bc5699ca5 in directory \\Remote\Files\PriceAgent. 
2019-06-13 10:09:56.3537 [App:02] [54560974-a5c8-46c0-b57b-7577253c84a2] [TRACE] [] Litium.Application.Runtime.RollingFileService - Updating the syncfile for 9bc8dcaf-b4c5-42ec-adfc-f37bc5699ca5 in directory \\Remote\Files\PriceAgent to point to 9bc8dcafb4c542ecadfcf37bc5699ca5.items.2e3100715b8e4df9b071f9973134ccf5 
2019-06-13 10:09:56.3866 [App:02] [54560974-a5c8-46c0-b57b-7577253c84a2] [TRACE] [] Litium.Application.Runtime.RollingFileService - Syncfile updated 
2019-06-13 10:09:56.3866 [App:02] [54560974-a5c8-46c0-b57b-7577253c84a2] [TRACE] [] Litium.Application.Runtime.RollingFileService - Cleaning up orphaned files in directory \\Remote\Files\PriceAgent for systemId 9bc8dcaf-b4c5-42ec-adfc-f37bc5699ca5. 
2019-06-13 10:09:56.3866 [App:02] [2fb1a031-87c4-470e-b6a2-b94a8f90f15a] [TRACE] [] Litium.Application.Runtime.RollingFileService - Delete old cachefile 9bc8dcafb4c542ecadfcf37bc5699ca5.items.47f84da20a5644ee95a44c74fec0dcfc. 
2019-06-13 10:09:56.4105 [App:02] [2fb1a031-87c4-470e-b6a2-b94a8f90f15a] [TRACE] [] Litium.Application.Runtime.RollingFileService - Deleted. 

I have looked in the folder and there I can find the file and it has items

I’m suspecting that there might be a couple of different issues causing similar results in play here. The production environment has old custom code that can’t execute properly, and I suspect that my local issues comes from the fact that our feed cache is located on a remote server. Gonna try saving it on my on machine. - didn’t solve it

Okay, it seems like we’ve managed to figure everything out:

my local domain were not selected as the domain for the channels, adding it as an alternative domain sorted everything out locally.
On stage and prod enviromnents we had code running which threw exceptions that I just didn’t notice were being thrown. And that explains those issues.

1 Like