Highlighted

Uncaught TypeError: Cannot read property 'DB' of undefined

Silver Contributor
Silver Contributor

I recently enabled the bundled tags flag on all tags in our website to reduce the number of request sent from the browser to Tealium and also mimified the tag templates. The change worked perfectly, however after making a few other changes to the Criteo - OneTag, I have started to get the following error message in my console,

utag.js:87 Uncaught TypeError: Cannot read property 'DB' of undefined

That particular line number points to the last line of a Tealium Generic tag

Could someone please point me in the right direction as to what could be the cause of the above error message and what steps should I do in order to fix it?

5 REPLIES 5
Highlighted

Uncaught TypeError: Cannot read property 'DB' of undefined

Tealium Employee

Hi @Yoosuf

Are you using the Tealium Web Companion and switching Environments?

If this is the case, then there is no need to worry, it is just an artifact of the way the switch is done, and the fact that the tags have been bundled.

If you are not switching environments, could you possibly supply some more information. If you are worried about posting details, please contact your Account Manager or raise a support request here : https://community.tealiumiq.com/t5/custom/page/page-id/support-contact-form

Adrian

Ask me anything Tealium related or Javascript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.
Highlighted

Uncaught TypeError: Cannot read property 'DB' of undefined

Silver Contributor
Silver Contributor

Yes, @adrian_browning, that was the reason causing this bug. Thanks for your help

Highlighted

Uncaught TypeError: Cannot read property 'DB' of undefined

Rookie Contributor

Thanks for clarification. 
I don't like the answer though that this an just an "artifact".
For all Dev/QAs this is frustrating and makes you blind for real Javascript errors.
I would like to hear that you have this at least in the backlog and tackle this issue.

Highlighted

Uncaught TypeError: Cannot read property 'DB' of undefined

Tealium Employee

Hello @grafn 

This issue should no longer happen when using the "Environment Switcher"

The method of switching environment here is different to the older method of the "web companion" switching environments.

We recommend using the "Environment switcher" tool which can be found in the same chrome extension as the web companion.

 

Hopefully this should hide this error from you when you switch environments now - if it doesn't, there is likely another issue that needs looking at.

Highlighted

Uncaught TypeError: Cannot read property 'DB' of undefined

Rookie Contributor

Ah ok thank you @LordLingham .
I was not aware of the tool "Environent Switcher". That helped indeed.