Skip to content

KeyError: authtype #197

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

Closed
DominicOrga opened this issue Apr 17, 2024 · 2 comments
Closed

KeyError: authtype #197

DominicOrga opened this issue Apr 17, 2024 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@DominicOrga
Copy link

My Python Firestore event trigger has suddenly broke down and is throwing the following error:

2024-04-17 13:46:52.010 HKT
Traceback (most recent call last):   File "/layers/google.python.pip/pip/lib/python3.12/site-packages/flask/app.py", line 1473, in wsgi_app     response = self.full_dispatch_request()
2024-04-17 13:46:52.010 HKT
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-17 13:46:52.010 HKT
  File "/layers/google.python.pip/pip/lib/python3.12/site-packages/flask/app.py", line 882, in full_dispatch_request
2024-04-17 13:46:52.010 HKT
    rv = self.handle_user_exception(e)
2024-04-17 13:46:52.010 HKT
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-17 13:46:52.010 HKT
  File "/layers/google.python.pip/pip/lib/python3.12/site-packages/flask/app.py", line 880, in full_dispatch_request
2024-04-17 13:46:52.010 HKT
    rv = self.dispatch_request()
2024-04-17 13:46:52.010 HKT
         ^^^^^^^^^^^^^^^^^^^^^^^
2024-04-17 13:46:52.010 HKT
  File "/layers/google.python.pip/pip/lib/python3.12/site-packages/flask/app.py", line 865, in dispatch_request
2024-04-17 13:46:52.010 HKT
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
2024-04-17 13:46:52.010 HKT
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-17 13:46:52.010 HKT
  File "/layers/google.python.pip/pip/lib/python3.12/site-packages/functions_framework/__init__.py", line 178, in view_func
2024-04-17 13:46:52.010 HKT
    function(event)
2024-04-17 13:46:52.010 HKT
  File "/layers/google.python.pip/pip/lib/python3.12/site-packages/firebase_functions/firestore_fn.py", line 246, in on_document_written_wrapped
2024-04-17 13:46:52.010 HKT
    return _firestore_endpoint_handler(
2024-04-17 13:46:52.010 HKT
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-17 13:46:52.010 HKT
  File "/layers/google.python.pip/pip/lib/python3.12/site-packages/firebase_functions/firestore_fn.py", line 137, in _firestore_endpoint_handler
2024-04-17 13:46:52.010 HKT
    event_auth_type = event_attributes["authtype"]
2024-04-17 13:46:52.010 HKT
                      ~~~~~~~~~~~~~~~~^^^^^^^^^^^^
2024-04-17 13:46:53.037 HKT
KeyError: 'authtype'

I've tested this on both firebase_function 0.3.0 and 0.4.0.

@exaby73
Copy link
Contributor

exaby73 commented Apr 18, 2024

Closing in favor of #194. I'll have a fix out soon

@exaby73 exaby73 closed this as completed Apr 18, 2024
@exaby73 exaby73 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2024
@exaby73 exaby73 added the duplicate This issue or pull request already exists label Apr 18, 2024
@exaby73
Copy link
Contributor

exaby73 commented Apr 19, 2024

0.4.1 is released and should fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants