Skip to main content
Greetings to all,

I am seeking assistance with an issue I've encountered. Within my current setup, I have an LWC component that functions as a screen component within a flow. This flow is called from another LWC component using the Lightning Flow feature. This entire system is hosted within the LWR Experience Cloud site.

While everything appears to function correctly when accessing this component within the Experience Builder, a problem arises once the site is published. Upon attempting to access the component in the published site, the following error emerges:

Something went wrong with the "LWC_Demo" screen component on the "Report Adhoc Hours" flow. Contact your Salesforce admin about this error. LWR3008: Error loading https://demo.develop.my.site.com/volunteers/webruntime/component/latest/prod/en-US/c%2FlookUpWrapper

On examining the Network calls in chrome, I can see the difference between the Experience Builder and the live site are

Experience Builder: https://demo.develop.live-preview.salesforce-experience.com/volunteers/webruntime/component/latest/prod/en-US/c%2FlookUpWrapper

Live Site: https://demo.develop.my.site.com/volunteers/webruntime/component/latest/prod/en-US/c%2FlookUpWrapper

While the component's JavaScript scripts are successfully retrieved and rendered in the live preview, attempting to do so in the published site results in the subsequent detailed error:

 

GET https://demo.my.site.com/volunteers/webruntime/component/latest/prod/en-US/c%2FlookUpWrapper net::ERR_ABORTED 404 (Not Found)

Refused to execute script from 'https://demo.develop.my.site.com/volunteers/webruntime/component/latest/prod/en-US/c%2FlookUpWrapper' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

 

I've undertaken the following measures:

a) Relaxed the CSP setting.

b) Added the site to CSP trusted sites.

c) Enabled CORS.

d) Disabled Lightning Locker.

e) Exposed the LWC component to communities with the specified targets.

  <apiVersion>57.0</apiVersion>

    <isExposed>true</isExposed>

    <targets>

        <target>lightning__AppPage</target>

        <target>lightning__RecordPage</target>

        <target>lightning__HomePage</target>

        <target>lightning__FlowScreen</target>

        <target>lightningCommunity__Page</target>

        <target>lightningCommunity__Default</target>

        <target>lightningCommunity__Page_Layout</target>

    </targets>

What else needed to be checked? I would greatly appreciate any insights or suggestions on resolving this matter.

Note: It was working a while back not sure what has changed resulting in this failure.
3 answers
  1. Feb 17, 2025, 7:21 PM

    I had the same LWR3008 error when I replaced the Aura File Upload component with the LWR File Upload component. The solution was to republish the LWR site. The error dissapeared.

0/9000