isNative detection fails with NewRelic instrumentation
See original GitHub issueCodePen demo
https://codepen.io/jdelStrother/pen/LzrBXE
Steps to reproduce the problem
- Add NewRelic instrumentation, or any other instrumentation that wraps native functions (MutationObserver in particular)
- 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:
- Created 6 years ago
- Comments:18 (8 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jdelStrother this was fixed with #461 and waiting on the next release.
I can work on one. I’ll have it up in a few minutes.