You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2024-04-17 00:12:40 [2024-04-16 22:12:40,786] ERROR in app: Exception on / [POST]
2024-04-17 00:12:40 Traceback (most recent call last):
2024-04-17 00:12:40 File "/layers/google.python.pip/pip/lib/python3.12/site-packages/flask/app.py", line 1473, in wsgi_app
2024-04-17 00:12:40 response = self.full_dispatch_request()
2024-04-17 00:12:40 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-17 00:12:40 File "/layers/google.python.pip/pip/lib/python3.12/site-packages/flask/app.py", line 882, in full_dispatch_request
2024-04-17 00:12:40 rv = self.handle_user_exception(e)
2024-04-17 00:12:40 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-17 00:12:40 File "/layers/google.python.pip/pip/lib/python3.12/site-packages/flask/app.py", line 880, in full_dispatch_request
2024-04-17 00:12:40 rv = self.dispatch_request()
2024-04-17 00:12:40 ^^^^^^^^^^^^^^^^^^^^^^^
2024-04-17 00:12:40 File "/layers/google.python.pip/pip/lib/python3.12/site-packages/flask/app.py", line 865, in dispatch_request
2024-04-17 00:12:40 return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
2024-04-17 00:12:40 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-17 00:12:40 File "/layers/google.python.pip/pip/lib/python3.12/site-packages/functions_framework/__init__.py", line 134, in view_func
2024-04-17 00:12:40 return function(request._get_current_object())
2024-04-17 00:12:40 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-17 00:12:40 File "/layers/google.python.pip/pip/lib/python3.12/site-packages/firebase_functions/storage_fn.py", line 332, in on_object_finalized_wrapped
2024-04-17 00:12:40 return _message_handler(func, raw)
2024-04-17 00:12:40 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-04-17 00:12:40 File "/layers/google.python.pip/pip/lib/python3.12/site-packages/firebase_functions/storage_fn.py", line 206, in _message_handler
2024-04-17 00:12:40 event_attributes = raw._get_attributes()
2024-04-17 00:12:40 ^^^^^^^^^^^^^^^^^^^
2024-04-17 00:12:40 AttributeError: 'Request' object has no attribute '_get_attributes'. Did you mean: '__getattribute__'?
Additionally, when I test its actual functionality (do something when an object is added to the bucket) there is nothing happening (no event triggered). The storage bucket I am using is running on firebase emulator. I am using the ‘STORAGE_EMULATOR_HOST’ environment variable and I initialise the app with the emulator-adapted project id. The deployed function can read the bucket’s contents (I can print a list of the blobs when I spin it up), but the function is not triggered when I am adding a new file, meaning that I am not receiving the above error either.
I tried with different versions of firebase-functions: 0.4.0, 0.3.0, 0.2.0 and I still get the same behaviour.
Any help would be appreciated.
Thanks
The text was updated successfully, but these errors were encountered:
Hey @mnsRG. At first glance, it seems to be an issue with the payload you're sending in the cURL request. Basically, there are some attributes missing there. Could you point me to where you found the JSON structure you're using?
It worked well. Also adding a file to the emulator storage successfully triggered the function.
So, probably doing the same request to the python function would also work (have to test it though). Also if I get it right, I should not deploy the python function using gcloud alpha functions local but use it internally in firebase (like I did with Node.js).
Therefore it could also be that the issue is more related to how google cloud functions and firebase functions in the same project work together (especially in an emulator setup). Which means that you can probably close this issue 🙂
Okay understood. I'll close this issue but if you do face this again, feel free to reopen this issue, or open a new one if you can't and mention this issue in the new one. Thank you for trying out Python Functions :)
Hello, I ‘ve been trying to test a locally deployed google cloud function that looks like this:
My gcloud command to deploy the function is this one:
The function is deployed successfully and then I am testing it with:
Then, I get the following error (from the logs):
Additionally, when I test its actual functionality (do something when an object is added to the bucket) there is nothing happening (no event triggered). The storage bucket I am using is running on firebase emulator. I am using the ‘STORAGE_EMULATOR_HOST’ environment variable and I initialise the app with the emulator-adapted project id. The deployed function can read the bucket’s contents (I can print a list of the blobs when I spin it up), but the function is not triggered when I am adding a new file, meaning that I am not receiving the above error either.
I tried with different versions of firebase-functions: 0.4.0, 0.3.0, 0.2.0 and I still get the same behaviour.
Any help would be appreciated.
Thanks
The text was updated successfully, but these errors were encountered: