Expand my Community achievements bar.

SOLVED

JS Not Getting Loaded on Publish Instances

Avatar

Level 3

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?

1 Accepted Solution

Avatar

Correct answer by
Level 10

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

View solution in original post

6 Replies

Avatar

Employee

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

Do you have errors around minification?

Avatar

Level 3

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

Avatar

Employee

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

Avatar

Level 3

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

Avatar

Employee

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

Avatar

Correct answer by
Level 10

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