question-mark
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.

isNative detection fails with NewRelic instrumentation

See original GitHub issue

CodePen demo

https://codepen.io/jdelStrother/pen/LzrBXE

Steps to reproduce the problem

  1. Add NewRelic instrumentation, or any other instrumentation that wraps native functions (MutationObserver in particular)
  2. Try to display something with Popper

What is the expected behavior?

Popper uses MutationObserver and immediately displays the popped element at the correct position

What went wrong?

Popper’s isNative check fails, causing it to fall back to setTimeout(fn, 0), causing the popped element to appear for a split second at the wrong position, before moving into place once the timeout fires.

Any other comments?

window.MutationObserver.toString = function() { return "[native code]" } is a somewhat awful hack that works around Popper’s isNative check.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
bayleedevcommented, Oct 18, 2017

@jdelStrother this was fixed with #461 and waiting on the next release.

0reactions
bayleedevcommented, Oct 16, 2017

I can work on one. I’ll have it up in a few minutes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Android] Failed to detect New Relic instrumentation still
For New Relic I used the newest 6.2.1 and everything seemed to compile okay. After running it, I get this error from New...
Read more >
Failed to detect New Relic instrumentation - Mobile
Hi, I am using ant to build my apps. I followed the installation instructions. But I get the same error : Failed to...
Read more >
Failed to detect New Relic instrumentation Marsh 2020 - Mobile
Agent you're using (iOS or Android & version); Exact error you're seeing from the logs. Looking forward to hearing back from you!
Read more >
Failed to detect New Relic instrumentation. Something likely ...
I configured relic according to the doc. Result: No logs in new relic console. When I run app I show only two logs...
Read more >
Failed to detect New Relic instrumentation and how should I ...
Hi, I try to put newrelic into an android project which build by Maven. I follow the instructions, but I run the app...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found