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
BedrockMission!

Learn More

View all

Sign in to view all badges

What could cause a ReferenceError ContextHub is not defined

Avatar

Avatar
Validate 1
Level 1
Jeanmaradiaga
Level 1

Like

1 like

Total Posts

17 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
Jeanmaradiaga
Level 1

Like

1 like

Total Posts

17 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
Jeanmaradiaga
Level 1

14-04-2021

My project is using Bugsnag to catch errors in our AEM site, one recurring error is:

ReferenceError/en
ContextHub is not defined
 
The stack trace shows the following sequence of events: 
 
XMLHttpRequest succeeded
DOMContentLoaded
 
Page Loaded
Page Shown
ReferenceError: ContextHub is not defined
 
 

 

[
  {
    "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.

View Entire Topic

Avatar

Avatar
Affirm 100
Level 10
asutosh_jena
Level 10

Likes

403 likes

Total Posts

501 posts

Correct Reply

137 solutions
Top badges earned
Affirm 100
Ignite 1
Establish
Give Back 50
Give Back 5
View profile

Avatar
Affirm 100
Level 10
asutosh_jena
Level 10

Likes

403 likes

Total Posts

501 posts

Correct Reply

137 solutions
Top badges earned
Affirm 100
Ignite 1
Establish
Give Back 50
Give Back 5
View profile
asutosh_jena
Level 10

15-04-2021

Hi @Jeanmaradiaga 

 

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!