0

I'm getting Uncaught ReferenceError:utag is not defined

The error:

Uncaught ReferenceError: utag is not defined
at HTMLSelectElement.eval (eval at jsf.util.chain(jsf.js.html?=ln=javax.faces:1), anonymous:<3:1>)
at Object.jsf.util.chain (jsf.js.html?=ln=javax.faces:1)
at HTMLSelectElement.onChange (xyz.html:123)

This is a bit weird scenario. Two weeks ago I was working on a source code and it was working fine for 2 days but suddenly started throwing the above error on Chrome. So I switched to IE and on IE it was working fine for some time before throwing the same error on IE also. I couldn't resolve that error that time and moved on to another priority task. Yesterday I took a completely different source code and started working on Chrome. It was working fine for sometime and again I got the same error on Chrome. Like last time started working on IE. Now IE also throwing the same error. I don't understand why I'm getting this error after working for sometime. I cleared cache and restarted the system and done building the code multiple times.

I do believe this is a problem with either browser or eclipse. Kindly guide me.

The code looks somewhat similar to this, <commandLink id="abc" onclick="utag.link({url link})" />

NOTE: This code working completely fine for my colleagues.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Gowtham M
  • 267
  • 2
  • 17
  • seems like there's no global object called `utag` - in your browser developer console, if you type `utag` and enter ... is it defined? – Bravo Nov 19 '20 at 05:28
  • @Bravo If I type utag on console it says undefined. It was working fine. I don't know why it stops working after sometime. – Gowtham M Nov 19 '20 at 07:07
  • how is it supposed to be defined? – Bravo Nov 19 '20 at 07:53
  • @Bravo It's been defined globally and working fine for everyone. The code was working for me also. I think it's not loaded properly or not properly rendered on the browser. – Gowtham M Nov 19 '20 at 09:51

2 Answers2

3

May be tealium tracking scripts blocked by uBlock or similar extension ...

amin be
  • 33
  • 4
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-ask). – Community Sep 16 '21 at 12:45
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/29841901) – AntonioGarcía Sep 16 '21 at 12:55
  • thanks for your answer, that wase exactly the case here – Tom Oct 22 '21 at 08:15
0

In my case I wanted to play a game but the console says same as you "utag is not defined" so I read the js code and I just paste this in the console very quickly before game start loading

const utag = {}
utag.link = ()=>{}

then press enter and works very good. This is the website I was playing the game https://plays.org/game/low-down/

Carlos Martínez
  • 236
  • 2
  • 11