Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

JS Not Getting Loaded on Publish Instances

sonalik77795449
Level 3
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
edubey
Correct answer by
Level 10
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
Feike_Visser1
Employee
Employee

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

Do you have errors around minification?

sonalik77795449
Level 3
Level 3

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

Feike_Visser1
Employee
Employee

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

sonalik77795449
Level 3
Level 3

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

Feike_Visser1
Employee
Employee

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

edubey
Correct answer by
Level 10
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