Forum Moderators: open

Message Too Old, No Replies

Tracking down the source of Uncaught TypeError

         

csdude55

4:44 am on Aug 26, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm using jQuery, and I'm seeing this error in the console:

jquery.min.js:2
Uncaught TypeError: Cannot convert undefined or null to object
at Function.values (<anonymous>)
at HTMLDocument.<anonymous> (<anonymous>:85:10)
at l (jquery.min.js:2:29375)
at c (jquery.min.js:2:29677)


jQuery comes directly from Google:

<script src="//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

I'm guessing that there's a script somewhere on my end that's referring to a jQuery function that's expecting an object, but instead getting a null or undefined. But I'm not seeing any way to narrow down where it is on my end, and there are thousands of lines to sift through!

Looking at this line:

HTMLDocument.<anonymous> (<anonymous>:85:10)

I looked at the source code of the page to see if there was anything at line 85. It's actually a blank line, though, and there's no JavaScript or jQuery anywhere near it :-/

Any thoughts or suggestions on how to narrow it down?

csdude55

4:50 am on Aug 26, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Well shoot, I've been looking for 2 hours before I posted, then 30 seconds after I hit submit I found the answer! LOL

If you click on the little arrow next to "Uncaught TypeError", it opens another menu beneath it. It all looks like gibberish, but in my case the first result was:

(anonymous) @ VM6185:85

Clicking on that opened a very small textarea with code that I recognized! So I guess the VM6185 is just a name of the script file in the browser's cache.

lucy24

4:36 pm on Aug 26, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I've been looking for 2 hours before I posted, then 30 seconds after I hit submit I found the answer!
Dog Bites Man

tangor

4:38 am on Aug 27, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Man Cringes With Irony