CMS Development

Beneelen
Member

Hubspot Javascript errors coming from hubspot's own js files

Hi,

 

My client noticed their mobile menu wasn't working anymore. Clicking on the menu icon did nothing. 

After looking into it, I found that this was only the case on their homepage. Other pages are working fine. I also noticed some weird javascript errors in my console. Normally I would try to solve these but they are coming from Hubspot's own js files?

 

Below is the output in my dev console:

miniapis start
getAsyncJs:50 App Id: MA-1e6c31a6978643daa1bddd3fbd306069
getAsyncJs:73 Object {success: true, message: "Action Allowed", data: Object}
getAsyncJs:77 Object {success: true, message: "Action Allowed", data: Object}
v2.js:5 Error: Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.
    at r (v2.js:4)
    at Object.o [as getID] (v2.js:3)
    at i (v2.js:3)
    at Object.render (v2.js:3)
    at T (v2.js:10)
    at F (v2.js:10)
    at v2.js:10
    at t (588860.js:27)
    at e (588860.js:27)
e.report @ v2.js:5
(anonymous) @ v2.js:10
t @ 588860.js:27
e @ 588860.js:27
v2.js:5 Error: Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.
    at r (v2.js:4)
    at Object.o [as getID] (v2.js:3)
    at i (v2.js:3)
    at Object.render (v2.js:3)
    at T (v2.js:10)
    at F (v2.js:10)
    at v2.js:10
    at t (588860.js:27)
    at e (588860.js:27)
e.report @ v2.js:5
(anonymous) @ v2.js:10
t @ 588860.js:27
e @ 588860.js:27
2v2.js:5 Completed reporting error to formsnextembed

 

When adding ?hsDebug=true to the url I get this:

v2.js:91 Error running tracker function TypeError: tracker._getFingerprint is not a function
    at current.js:74
    at __push (v2.js:84)
    at initFakeTracker (v2.js:96)
    at v2.js:102
__push @ v2.js:91
initFakeTracker @ v2.js:96
(anonymous) @ v2.js:102
v2.js:91 Error running tracker function TypeError: tracker._getFingerprint is not a function
    at current.js:74
    at __push (v2.js:84)
    at initFakeTracker (v2.js:96)
    at v2.js:102
__push @ v2.js:91
initFakeTracker @ v2.js:96
(anonymous) @ v2.js:102
v2.js:91 Error running tracker function TypeError: tracker._getFingerprint is not a function
    at current.js:74
    at __push (v2.js:84)
    at initFakeTracker (v2.js:96)
    at v2.js:102
__push @ v2.js:91
initFakeTracker @ v2.js:96
(anonymous) @ v2.js:102
v2.js:88 No fake tracker function for setContentType
v2.js:88 No fake tracker function for setCanonicalUrl
v2.js:88 No fake tracker function for setPageId
v2.js:88 No fake tracker function for setContentMetadata
v2.js:88 No fake tracker function for setTargetedContentMetadata
getAsyncJs:18 miniapis start
getAsyncJs:50 App Id: MA-1e6c31a6978643daa1bddd3fbd306069
v2.js:68 [FakeAnalytics] Form view: form=9dbbcdd8-f031-4ccf-8607-e57f4b30beca, correlation=035d3ca2-eef0-4963-9ea0-d040ccdf10af
v2.js:68 [FakeAnalytics] Form view: form=9dbbcdd8-f031-4ccf-8607-e57f4b30beca, correlation=0a395734-8f13-4ea5-b4ee-fe5784d1a627
v2.js:88 No fake tracker function for setPortalId
v2.js:88 No fake tracker function for trackPageView
v2.js:91 Error running tracker function TypeError: t.urlMatches is not a function
    at 588860.js:9
    at Array.__push [as push] (v2.js:84)
    at 588860.js:9
__push @ v2.js:91
(anonymous) @ 588860.js:9
v2.js:91 Error running tracker function TypeError: t.urlMatches is not a function
    at 588860.js:10
    at Array.__push [as push] (v2.js:84)
    at 588860.js:10
__push @ v2.js:91
(anonymous) @ 588860.js:10
v2.js:91 Error running tracker function TypeError: t.urlMatches is not a function
    at 588860.js:11
    at Array.__push [as push] (v2.js:84)
    at 588860.js:11
__push @ v2.js:91
(anonymous) @ 588860.js:11
v2.js:91 Error running tracker function TypeError: t.urlMatches is not a function
    at 588860.js:12
    at Array.__push [as push] (v2.js:84)
    at 588860.js:12
__push @ v2.js:91
(anonymous) @ 588860.js:12
v2.js:88 No fake tracker function for setLegacy
v2.js:88 No fake tracker function for addCookieDomain
v2.js:88 No fake tracker function for addCookieDomain
v2.js:88 No fake tracker function for enableAutomaticLinker
v2.js:88 No fake tracker function for setPrivacyPolicy
v2.js:88 No fake tracker function for setPrivacyPolicyWording
v2.js:88 No fake tracker function for setPrivacyAcceptWording
v2.js:88 No fake tracker function for setPrivacyDismissWording
v2.js:88 No fake tracker function for setPrivacyActive
v2.js:88 No fake tracker function for setPrivacyHideDecline
v2.js:88 No fake tracker function for embedHubSpotScript
v2.js:88 No fake tracker function for embedHubSpotScript
v2.js:88 No fake tracker function for addCookieListener
v2.js:88 No fake tracker function for addCookieListener
v2.js:88 No fake tracker function for addCookieListener
v2.js:88 No fake tracker function for addCookieListener
v2.js:88 No fake tracker function for addUserTokenListener
getAsyncJs:73 Object {success: true, message: "Action Allowed", data: Object}
getAsyncJs:77 Object {success: true, message: "Action Allowed", data: Object}
widgets.js:9 Uncaught (in promise) TypeError: Cannot read property 'createElement' of null
    at t.createElement (widgets.js:9)
    at u (widgets.js:9)
    at widgets.js:9
    at <anonymous>

 

For what I can tell, it has something to do with the CTA's used on that page. But to what exactly is wrong with them, I have no idea.

 

0 Upvotes
2 Replies 2
Jsum
Key Advisor

Hubspot Javascript errors coming from hubspot's own js files

@Beneelen,

 

Could you share a link?

 

You are right that it has to do with the ctas, but it is the cta javscript. All of those "not a function" errors tells me that the javascript for your ctas is missing. The page is calling functions that are defined in the cta javascript, since the script is missing the functions aren't defined. Only the script can't be missing because Hubspot adds it by default. This means it is being interfered with. There are 2 possible reasons why this could be happening:

 

1. Jquery. Hubspot adds jquery in the head by default because it is needed to load before cta and form scripts. If you add it yourself in the head or footer than the duplication could cancel jquery out causing it to not exist and all dependent scripts would not run properly. 

 

2. User scripts. It is very possible that you or your client have recently updated the user javascript file(s) applied to your page and something in the code is open ended or otherwise left out to interfere with preceding scripts.

 

9 times out of 10 errors having to do with the cta or form scripts are user error not hubspot. If you share a link I can poke around for you.

0 Upvotes
Beneelen
Member

Hubspot Javascript errors coming from hubspot's own js files

Hi @Jsum
Thanks for your reply. I tried to find the issue myself but came up short.

The link to the page is : https://www.thehouseofmarketing.be/

 

Thanks in advance for taking a look at it.

0 Upvotes