function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Angel ZAngel Z 

Community User cannot see js application in a lightning community page

Hello, 

We have a js application stored as a static resource. An aura component hosts it and is supposed to show it on a community page.

The data is showing up for administrator, but not for a community user. The access to the static resource has already been setup to "public" and the aura component has global access.

What else can I be missing?

Thanks,
Angel
VinayVinay (Salesforce Developers) 
Hi Angel,

Can you check below in lightning app
<aura:application access="GLOBAL" extends="ltng:outApp" 
                  implements="ltng:allowGuestAccess">

Thanks,
Vinay Kumar
ShirishaShirisha (Salesforce Developers) 
Hi Angel,

Greetings!

I would suggest you to check the below notes as well on the static resource when it comes to the guest users along with Vinay suggestion:

"Cache settings on static resources are set to private when accessed via a Salesforce Site whose guest user's profile has restrictions based on IP range or login hours. Sites with guest user profile restrictions cache static resources only within the browser. Also, if a previously unrestricted site becomes restricted, it can take up to 45 days for the static resources to expire from the Salesforce cache and any intermediate caches."

Reference:https://help.salesforce.com/articleView?id=pages_static_resources_create.htm&type=5

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Angel ZAngel Z
Thank you both for providing guidence. However, it does not work.

Looks like the community blocks the access to the static resource for the user.

I also tried with visualforce page which invokes the lightning app and component (which refer to the static resource). However, it does not work neither, even though the vf page has been added to the community profile.

Thanks.