ContextHub not initializing in AEM 6.4.5 | Community
Skip to main content
Level 2
April 16, 2020

ContextHub not initializing in AEM 6.4.5

  • April 16, 2020
  • 1 reply
  • 1619 views

Getting this error:

 

ContextHub UI is not initialized! Check your config.

 

 

The same exact setup works perfectly on my local instance, but not on this stage server and I don't know why. They're both running AEM 6.4.5.

Context, I used to get another error before which I attempted to fix:

 

ContextHubJQ is not defined

 

I posted the question here: https://stackoverflow.com/questions/61238503/contexthubjq-is-not-defined-error-aem-6-4-5-contexthub

 

I had to add a sly tag like this in my document head to fix most of the errors, but now I get that "check your config" error I mentioned.

 

<sly data-sly-call="${clientLib.js @ categories='contexthub.utils,contexthub.constants,contexthub.kernel,contexthub.polyfills,contexthub.finalize,contexthub.shared,contexthub.generic-stores,contexthub.config.override,contexthub.ui,contexthub.ui.inject'}" data-sly-unwrap/>

 

 

To be clear I have added these in the head already. The ContextHubPersistence store is in my browser localstorage and the Targeting menu is available in the AEM Author Editor. This means its partially working?? Not sure why CH isn't loading correctly.

 

<sly data-sly-call="${clientLib.js @ categories='granite.utils,granite.jquery'}" data-sly-unwrap/> <sly data-sly-test="${!head.isPublic}" data-sly-resource="${'contexthub' @ resourceType='granite/contexthub/components/contexthub'}" />

 

 

- I also have CH segments enabled in my configuration for the project.

- I have CH UI enabled in the Adobe Granite ContextHub service (com.adobe.granite.contexthub.impl.ContextHubImpl)

- I have the CH configuration setup.

- My CH setup works perfectly on my local instance of AEM 6.4.5. This error is happening on our stage server.

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

1 reply

Manu_Mathew_
Community Advisor
Community Advisor
November 26, 2024

@ykadaru-konrad 

 

  • Navigate to Tools > Web Console > Bundles (/system/console/bundles).
  • Search for ContextHub and confirm that the following bundles are active:
    • com.adobe.cq.cq-contexthub
    • com.adobe.granite.contexthub

Check for the following script in your HTML:

 

<script src="/etc.clientlibs/clientlibs/contexthub.base.min.js"></script>