Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • concrexit concrexit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 70
    • Issues 70
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 10
    • Merge requests 10
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • thaliathalia
  • concrexitconcrexit
  • Issues
  • #940
Closed
Open
Issue created Oct 17, 2019 by Thalia Technicie@_thaliatechnicieOwner

AttributeError: module 'firebase_admin.messaging' has no attribute 'ApiCallError'

Sentry Issue: CONCREXIT-12

HTTPError: 401 Client Error: Unauthorized for url: https://fcm.googleapis.com/v1/projects/thalia-493a0/messages:send
  File "firebase_admin/messaging.py", line 349, in send
    timeout=self._timeout
  File "firebase_admin/_http_client.py", line 117, in body
    resp = self.request(method, url, **kwargs)
  File "firebase_admin/_http_client.py", line 105, in request
    resp.raise_for_status()
  File "requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)

ThirdPartyAuthError: Auth error from APNS or Web Push Service
  File "pushnotifications/models.py", line 175, in send
    'dry_run', False))
  File "firebase_admin/messaging.py", line 114, in send
    return _get_messaging_service(app).send(message, dry_run)
  File "firebase_admin/messaging.py", line 352, in send
    raise self._handle_fcm_error(error)

AttributeError: module 'firebase_admin.messaging' has no attribute 'ApiCallError'
(2 additional frame(s) were not displayed)
...
  File "django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "pushnotifications/management/commands/send_scheduled_messages.py", line 44, in handle
    message.send(dry_run=bool(options['dry-run']))
  File "pushnotifications/models.py", line 177, in send
    except messaging.ApiCallError as e:
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking