Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: null is not an object (evaluating 'a.apply') at instrumentMethod.js

See original GitHub issue

We’re seeing this error in Safari mainly. I think the issue is in this line.

let instrumentation = instrumentationFactory(original)

If original is not a function then instrumentation is undefined. The error message from the title occurs when instrumentation.apply is called on this line.

That’s my understanding. Not sure which functions are not working in Safari. I found the following calls in the code base so I’m guessing it’s one of these:

instrumentMethodAndCallOriginal(window, ‘onerror’ ...
instrumentMethodAndCallOriginal(window, 'onunhandledrejection' ...
instrumentMethodAndCallOriginal(history, 'pushState' ...
instrumentMethodAndCallOriginal(history, 'replaceState' ...
instrumentMethodAndCallOriginal(XMLHttpRequest.prototype, 'open' ...
instrumentMethodAndCallOriginal(XMLHttpRequest.prototype, 'send' ...
instrumentMethodAndCallOriginal(XMLHttpRequest.prototype, 'abort' ...

Let me know if I can provide any more info.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

bcaudancommented, Aug 29, 2022

Hello @karhidle,

it seems to be a duplicate of #1570 for which a fix will be available in the next release (hopefully this week). You can follow #1570 to be notified about the resolution.

karhidlecommented, Aug 29, 2022

We are also experiencing this issue. Using version 4.17.1 . Screen Shot 2022-08-29 at 10 03 44 AM

Same experience as @kbgreenlight described, errors happen after xhr requests. @bcaudan could you reopen this issue for further investigation?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix TypeError: Null is Not an Object in JavaScript
The JavaScript error TypeError: null is not an object occurs when a property is accessed or a method is called on a null...
Read more >
TypeError: null is not an object (evaluating '*') - Stack Overflow
Based on this answer and others, it sounds like you're getting that error because a function is called before the DOM element it...
Read more >
React Native: null is not an object (evaluating 'opHandler.clone')
when model.predict function is called, TypeError: null is not an object (evaluating 'opHandler.clone') error is thrown and the prediction is ...
Read more >
TypeError: null is not an object - Net-Informations.Com
TypeError : null is not an object. This error occurs when you read a property or call a method on a null object...
Read more >
TypeError: null is not an object (evaluating 'f.focus')
In JavaScript , null is not an object; and won't work. ... addEventListener is fired, the init() method can make use of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found