My project is using Bugsnag to catch errors in our AEM site, one recurring error is:
[
{
"file": "https://www.site.com/etc/cloudsettings.kernel.js/conf/global/settings/cloudsettings/company/contexthub",
"method": "Object.<anonymous>",
"lineNumber": 348,
"columnNumber": 78
},
{
"file": "https://www.site.com/etc/cloudsettings.kernel.js/conf/global/settings/cloudsettings/company/contexthub",
"method": "m",
"lineNumber": 96,
"columnNumber": 350
},
{
"file": "https://www.site.com/etc/cloudsettings.kernel.js/conf/global/settings/cloudsettings/company/contexthub",
"method": "Object.fireWith [as resolveWith]",
"lineNumber": 98,
"columnNumber": 75
},
{
"file": "https://www.site.com/etc/cloudsettings.kernel.js/conf/global/settings/cloudsettings/company/contexthub",
"method": "b",
"lineNumber": 172,
"columnNumber": 434
},
{
"file": "https://www.site.com/etc/cloudsettings.kernel.js/conf/global/settings/cloudsettings/company/contexthub",
"method": "XMLHttpRequest.<anonymous>",
"lineNumber": 182,
"columnNumber": 160
}
]
After that the page load perfectly, no rendering errors, no console errors.
Solved! Go to Solution.
Views
Replies
Total Likes
Do you see the content when you try to access the below URL in your website?
https://www.site.com/etc/cloudsettings.kernel.js/conf/global/settings/cloudsettings/company/contexthub
It should render the JS if it's working as expected.
If it's not loading that means there is a configration issue and the JS file is not loading which is why the tool is throwing ContextHub is not defined error.
Thanks!
Do you see the content when you try to access the below URL in your website?
https://www.site.com/etc/cloudsettings.kernel.js/conf/global/settings/cloudsettings/company/contexthub
It should render the JS if it's working as expected.
If it's not loading that means there is a configration issue and the JS file is not loading which is why the tool is throwing ContextHub is not defined error.
Thanks!
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
We're also getting the same error in logs, ContextHub isn't defined, and there are no errors in console.
The Js is rendering correctly on my website's URL. Is there anything else we need to check
Views
Replies
Total Likes
Hey!
The AEM project archetype creates a page component for you when initialising your project. That page is including the contexthub code in your page. If you’re not using contexthub (and you’re not planning to use it either) you’re safe to remove it from your code.
You should find something back under your page component in “customheaderlibs.html”:
<sly data-sly-resource="${'contexthub' @ resourceType='granite/contexthub/components/contexthub'}"/>
If you remove this line, the error shouldn’t appear anymore.
Hope this helps!
Koen
Views
Likes
Replies
Views
Likes
Replies