JS Not Getting Loaded on Publish Instances | Community
Skip to main content
Level 3
March 31, 2017
Solved

JS Not Getting Loaded on Publish Instances

  • March 31, 2017
  • 6 replies
  • 3269 views

Hi Team,

I am getting a 404 error on the console for  loading js residing on /etc/designs/projectname

Upon checking the Slinglogs we got following error - 

31.03.2017 11:32:32.053 *ERROR* [172.16.64.148 [1490974352035] GET /etc/designs/projectname/apps.pp-default.min.js HTTP/1.1] com.adobe.granite.ui.clientlibs.impl.HtmlLibraryServlet Cannot create library for /etc/designs/projectname/apps.pp-default.min.js java.io.IOException: Error while sending cached library: javax.jcr.RepositoryException: Error during assembly of /etc/designs/projectname/apps.pp-default.js at com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl.send(HtmlLibraryManagerImpl.java:1737) at com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl.send(HtmlLibraryManagerImpl.java:1673) at com.adobe.granite.ui.clientlibs.impl.HtmlLibraryImpl.send(HtmlLibraryImpl.java:170) at com.adobe.granite.ui.clientlibs.impl.HtmlLibraryServlet.doGet(HtmlLibraryServlet.java:92)

 

Any inputs on this?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by edubey

As Feike mentioned, its good to have minification for JS in prod to reduce file size. But alot of time minification in AEM will not work reason being third party JS.

Some Third party JS does not follow proper guidelines in JS, It could variable declaration, variable names as keywords...etc...

Thanks

6 replies

Feike_Visser1
Adobe Employee
Adobe Employee
March 31, 2017

Might be that you have a syntax error, and that the JS can't be minified..

Do you have errors around minification?

Level 3
March 31, 2017

Same set of code works for all other instances,just prod has this error.So doubt that its a code error.

Feike_Visser1
Adobe Employee
Adobe Employee
March 31, 2017

Can you disable minify, to see if this might be the cause.

Level 3
March 31, 2017

Worked after I disabled minify option .What could be the reason behind it and is disabling minify recommended?

Feike_Visser1
Adobe Employee
Adobe Employee
March 31, 2017

It is recommended to have it enabled on publish. Most likely there is an issue in the JS-code that prevents the minification.

edubey
edubeyAccepted solution
Level 10
April 3, 2017

As Feike mentioned, its good to have minification for JS in prod to reduce file size. But alot of time minification in AEM will not work reason being third party JS.

Some Third party JS does not follow proper guidelines in JS, It could variable declaration, variable names as keywords...etc...

Thanks