[Bug] <unlabeled event>
See original GitHub issuei’ve seen a few discussions regarding <unlabeled event>
but the following body seems fine by the looks of it, doesn’t it ?
We are seeing this mostly on the following Client Setup: IE 11.0 Windows (mostly 7)
{
"name": "exception",
"value": {
"values": [
{
"stacktrace": {
"frames": [
{
"function": "?",
"filename": "https://mysvg.de/",
"in_app": true
}
]
},
"value": {}
}
]
}
}
Our Angular 4 ErrorHandler Class:
export class GlobalErrorHandler implements ErrorHandler {
static isErrorOrErrorEvent (wat) {
return Object.prototype.toString.call(wat) === '[object Error]' || Object.prototype.toString.call(wat) === '[object ErrorEvent]';
}
constructor(private injector: Injector) {}
handleError(err) {
const error = err.originalError || err;
if (GlobalErrorHandler.isErrorOrErrorEvent(error)) {
Raven.captureException(error);
} else {
Raven.captureMessage(error.error || error);
}
}
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:45 (20 by maintainers)
Top Results From Across the Web
Why all my events are 'unlabeled event' and have Discarded ...
In my account I get only one issue: unlabeled event, and all of them have this error notice: There were 2 errors encountered...
Read more >1417107 - Switch to add "(unlabeled)" instead of "(labeled)" in ...
We really don't want to build dynamic strings for the default case. It is also a good idea to move this out of...
Read more >Why does an epic link show up as unlabeled?
Appears to be a platform bug, maybe because the input title was too long, it didn't create a Title in the Epic? It...
Read more >Labeled and Unlabeled Together on one BGP Neighbor on ...
On Cisco IOS ® XR, the support to have both unlabeled and labeled on one BGP session was done in 6.2.1. ... Error...
Read more >Detecting Errors and Estimating Accuracy on Unlabeled Data ...
of unlabeled test inputs; (2) error detection, which aims to identify mis-classified ... 2021, 18-24 July 2021, Virtual Event, volume 139 of Proceedings...
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
I got around to digging deeper into this, and I think I found the source of the problem.
Where does “unlabeled event” come from?
<unlabeled event>
is not something that users are passing, nor is it something that Raven applies. Where does it come from?The answer is the Sentry server:
https://github.com/getsentry/sentry/blob/96bc1c63df5ec73fe12c136ada11561bf52f1ec9/src/sentry/eventtypes/base.py#L38
When handling a
DefaultEvent
object, Sentry attempts to get the “sentry.interfaces.Message” property (unsuccessfully) and falls back to the default value:{ 'message': self.data.get('message', '') }
Which in turn evaluates to:
{ ‘message': ‘’ }
So
message_interface
is assigned to this object, and on line 36,message
is assigned tomessage_interface[‘message’]
— an empty string!In the conditional on line 37, the empty string evaluates to false and
title
is assigned to our old friend,<unlabeled event>
.TL;DR — The
DefaultEvent
is lacking both of the following properties:sentry.interfaces.Message
andmessage
. So Sentry uses a stand-in value as the title:<unlabeled event>
There’s an error while processing this event. Why?
All unlabeled event errors appear alongside the same message: “There was 1 error encountered while processing this event”.
I believe this is the line responsible for adding the processing error.
The code appears to be casting each property (environment, breadcrumbs, exception, etc.) to a specific format. When the cast fails, it adds a processing error.
What happens next is highly interesting: The raw ‘message’ is coerced to the Sentry message interface:
If the
message
property is missing, it defaults toNone
, andmsg_str
becomes falsy. Ifmsg_str
is falsy, thesentry.interfaces.Message
andformatted
properties are never assigned tomsg_if
. As we saw at the beginning of this post, these properties are necessary to preventtitle
from being assigned to<unlabeled event>
.Hypothesis
Raven is sending a bad message object to the Sentry server. Specifically, it is missing the
message
property — or themessage
property is a falsy value, such as an empty string.My guess is that somewhere in the
captureException
function (here),captureMessage
is being passed an empty string for themsg
param. Unfortunately, I can’t figure out which if statement the error falls into because don’t have access to the original error object —and I don’t know how to reproduce it.Solution
We need to make sure to call
captureMessage
with a goodmsg
param. In other words, we should not be passing it an empty string.captureMessage
is being called withincaptureException
, so it looks like there’s an error type (or object shape) that we are not accounting for there.Released as
3.26.3
. Would appreciate a feedback with everyone’s findings.