Closed Bug 1619644 Opened 4 years ago Closed 4 years ago

[traceback] AttributeError: 'NoneType' object has no attribute 'startswith'

Categories

(Socorro :: Antenna, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

Details

Attachments

(1 file)

Sentry: https://sentry.prod.mozaws.net/operations/socorro-new-prod/issues/7162482/

Traceback:

AttributeError: 'NoneType' object has no attribute 'startswith'
  File "raven/middleware.py", line 20, in common_exception_handling
    yield
  File "raven/middleware.py", line 100, in __call__
    iterable = self.application(environ, start_response)
  File "falcon/api.py", line 244, in __call__
    responder(req, resp, **params)
  File "markus/main.py", line 489, in _timer_decorator
    return fun(*args, **kwargs)
  File "antenna/breakpad_resource.py", line 433, in on_post
    throttle_result, rule_name, percentage = self.get_throttle_result(raw_crash)
  File "antenna/breakpad_resource.py", line 365, in get_throttle_result
    result, rule_name, throttle_rate = self.throttler.throttle(raw_crash)
  File "antenna/throttler.py", line 106, in throttle
    match = rule.match(self, raw_crash)
  File "antenna/throttler.py", line 189, in match
    return self.condition(throttler, crash[self.key])
  File "antenna/throttler.py", line 397, in <lambda>
    condition=lambda throttler, x: x.startswith("nightly"),

I bet this is from a crash report where the annotations were JSON-encoded. In this case, ReleaseChannel = null and because it's JSON-encoded it's sliding through as that. That violates the crash report spec.

Assuming that's true, we should probably reject these. Maybe we should add an additional validation step to make sure values aren't null?

Making this a P2 to look into. There are 6 of these in the last week which isn't much.

Priority: -- → P2

This may become more prevalent. We need to fix all the throttler rules to handle nulls.

Assignee: nobody → willkg
Status: NEW → ASSIGNED

I pushed this to prod in bug #1625479. Marking as FIXED.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: