Expand my Community achievements bar.

client libraries not loading intermittently on dispatcher url

Avatar

Level 4

Hi all,

 

We are migrating the website from AMS to AEMaaCS. 

As part of refactoring, we have moved the clientlibs to /apps/<project>/clientlibs.

We have set allowProxy = true and allowed clientlibs from dispatcher filter also.

 

On dispatcher, we have observed that sometimes the requested pages are loading all clientlibs and icons. At some times, pages are broken due to clientlibs not being loaded.

 

Need help in troubleshooting the root cause of the same.

 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

9 Replies

Avatar

Level 3

If intermittent issue is for same page then we may try to debug for cache issue.

Debugging with query params which does not get cached will ensure cached pages are not served and help in conclusion.

Ref:- https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/clientlibs-not-loading-pro...

Avatar

Level 4

We tried with query params also. Even with query params also, sometime the client libs are loading fine and sometimes not.

Avatar

Level 6

@pardeepg4829047 There are a few things you can try to debug above issue:

1. You can check with query params : As you said that adding the query params also doesn't help and the intermitted issue persists. Then you can compare the response headers of the pages that are working fine and those where clientlibs are breaking.

2. Also when you say clientlibs are breaking, what does that mean?
Are the clientlibs not being called only? 
Or, Are the clientlibs' calls returning some HTTP error? If so can you share what is the response from the network tab to help you further.

3. Also please check in the request.log and access.log to check the clientlib calls and see if there are any permission issues, or if the calls are getting filtered out by dispatcher rules. 

Avatar

Level 4

The clientlibs throw 404 error intermittently.

See attached screenshot:

 

pardeepg4829047_0-1719311189143.png

 

pardeepg4829047_1-1719311262298.png

 

Avatar

Level 3

Hi @pardeepg4829047 ,

Seems very subjective and intermittent so its tough to figure out. However you may try https://teamtreehouse.com/community/encountering-a-neterraborted-error-and-404-error-when-refreshing... as this error was also on refresh only.

If somewhere in the nested structure path can be simplified in build/compilation

 

Thanks,

Avatar

Level 5

If it is inntermittent, then can you also provide a screenshot when you received a successful response of this pall-iconset.ttf ?

Avatar

Level 4

For successful response, the clientlibs are loading properly as shown below

 

pardeepg4829047_0-1719393137717.png

 

 

pardeepg4829047_1-1719393150600.png

 

Avatar

Level 5

My guess is that CDN is serving cached HTML which has references to some older version clientlibs which is probably why this is intermittent. 
Once the CDN cache expires this issue must be getting resolved.
Both clientlibs and HTMLs should have proper Cache-control/Surrogate-control headers. 
For e.g from the screenshot I see cache-control header has max-age directive twice which should be fixed.
Whenever this issue comes, you can check for the Age and X-Cache response header in your browser for your HTML as well as clientlibs to validate the caching behaviour. Till that doesn't expire as per your set TTLs you will continue to get stale HTML/clientlibs and possible 404s. 

Check this https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/con... and 
https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/con... to understand better. But this is just a guess, there could be other factors associated as well.

Avatar

Level 2

hi @pardeepg4829047 ,

Hope you have found a solution for this. If not , few pointers worth trying if possible

  1. Assuming the filters in dispatcher are configured correctly as this is working intermittently.
  2. Can you please check if its related to permissions. I think anonymous user should also have permissions to /etc
  3. Are you trying the dispatcher url or the CDN. Please reach out to Adobe support on the cache configuration set at CDN and to flush the cache.

Thanks,

Anil