Getting a lot of "null is not an object (evaluating 'v.src')" javascript exceptions from mobile safari

Hi, we’ve got a lot of these errors:

null is not an object (evaluating 'v.src')

all from mobile safari (iPhone).
Stack trace does not make sense to me. Starts in css, for one thing…

/customers in hookhunantvByTimer at line 834:10
Called from: raven.js in this
/customers in nrWrapper at line 13:9892

No idea what hookhunantvByTimer is

22k occurrences for yesterday.

Any help how to investigate this is appreciated, thanks.

Hmm, nrWrapper seems to be a new relic agent function.

You might try escalating this to new relic support – it’s very possible its an issue with how their app plays with ours, but we try to be pretty defensive in changes.

/cc @benvinegar

@yul Have you found out the root cause ?
I’m having almost the same issue on mobile safari.

TypeError: null is not an object (evaluating 'v.src')@hookhunantvByTimer

I actually know this one…

In china, a software ‘360 free wifi’, is often installed in people’s mobile and pad device.

It helps those people who doesn’t own a wifi device, turn their non-wireless PC into a wifi device, those mobile device which installed ‘360 free wifi’ can connect to PC and share PC’s LAN.

However, 360 free wifi will hijack all your .html file, inject some javascript code, for some who-knows-why reason. After all, Qihu 360 company is famous for its ‘user-information-“protection”’ in China’s internet business.

‘hookhunantvByTimer’, Hunan is a province of China, hunan TV is the official TV channel of Hunan province, it’s famous for its entertainment TV shows, its audience group is very very huge, daily 0.21 billion, according some report.

So, 360 hijacked your html, and injected some code, did something particularly related to Hunan TV, but its code crashed.

1 Like

This error occurs when you read a property or call a method on a null object . That’s because the DOM API returns null for object references that are blank. An object is expected somewhere and wasn’t provided. So, you will get null is not an object error if the DOM elements have not been created before loading the script. In JavaScript , null is not an object; and won’t work. You must provide a proper object in the given situation.

We can resolve this type of issues by adding an event listener that will notify us when the page is ready. Once the addEventListener is fired, the init() method can make use of the DOM elements.

  document.addEventListener('readystatechange', function() {
    if (document.readyState === "complete") {