-
-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clients throwing error: abort is not a function #418
Comments
Also, It looks like you are missing required name key from your plugin. It should be:
|
I misread the setInterval as setTimeout, so that explains my confusion about that, but doesn't explain the problem. The code was just a truncated example so it has a name and other methods, but that is one of the places where the abort function sometimes is missing. I still don't get how the abort-function i added to the arguments when called from the heartbeat here, because
I could add a guard against the missing abort, but that seem like a recipe for dropping data so I would rather avoid it. |
Aha I see. We probably need a
...... When are you calling You can try to use
|
Why shouldn't the plugins called from heartbeat be abortable? We use a queue so it is not so easy to tell when the actual If it's a problem with providers loading that would explain why the problem is so hard to reproduce, it could be the users network connection or firewall that is the problem. But shouldn't the |
Fixed in Thanks for reporting this edge case |
I use analytics.js with some custom plugins that validate and transform the payload. Using Sentry I can see that some of my users throw errors from my plugins when they are trying to call
abort
. I have been unable to reproduce the error myself but it occurs for several different users in different hardware, browsers and releases.The error is
TypeError: abort is not a function
and the stack is as follows:I have tried to understand what the heartbeat does but don't quite understand its use, however I read it as something that is only called on initialization and it appears to me that the call at executes the plugins without an abort argument, but that doesn't make any sense to me so I realize that it probably is just me not understanding what is going on.
One of the plugins that have thrown the error (it occurs in several plugins) follows, what it does should not be relevant as the same error is thrown from different plugins:
The text was updated successfully, but these errors were encountered: