ankane/ahoy.js

TypeError: Illegal invocation

akshart opened this issue · 3 comments

getting TypeError: Illegal invocation
The stack trace’s top layer stops at window.navigator.sendBeacon(eventsUrl(), index_module_1(data) which comes from ahoy.js

Calling function is ahoy.trackView()
Errors are not confined to any particular browser or device.

Hey @akshart, I'm not sure how to reproduce. Can you put together a minimal reproducible example?

This issue is currently quite prevalent in our usage of Ahoy. I don't think it will be very easy to provide a way to reproduce but would it be possible to improving the visibility into the circumstances surrounding the exceptions being thrown? The error it self doesn't give very much info on why it's taking place. Would it be possible to add a try catch to give useful debug output and rethrow, such as an output of eventsUrl() and data and index_module_1's return in order to help us with debugging the Illegal Invocations?