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
According to the typing of HttpsOptions class, I should be able to set invoker to public or private. But when I tried to deploy a https_fn.on_request function with invoker=True, an error is raised:
[2024-03-06 02:26:16,162] ERROR in app: Exception on /__/functions.yaml [GET]
Traceback (most recent call last):
File "/Volumes/Cased/Projects/cloud-functions/functions/.venv/lib/python3.11/site-packages/flask/app.py", line 1463, in wsgi_app
response = self.full_dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Volumes/Cased/Projects/cloud-functions/functions/.venv/lib/python3.11/site-packages/flask/app.py", line 872, in full_dispatch_request
rv = self.handle_user_exception(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Volumes/Cased/Projects/cloud-functions/functions/.venv/lib/python3.11/site-packages/flask/app.py", line 870, in full_dispatch_request
rv = self.dispatch_request()
^^^^^^^^^^^^^^^^^^^^^^^
File "/Volumes/Cased/Projects/cloud-functions/functions/.venv/lib/python3.11/site-packages/flask/app.py", line 855, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Volumes/Cased/Projects/cloud-functions/functions/.venv/lib/python3.11/site-packages/firebase_functions/private/serving.py", line 122, in get_functions_yaml
functions = get_functions()
^^^^^^^^^^^^^^^
File "/Volumes/Cased/Projects/cloud-functions/functions/.venv/lib/python3.11/site-packages/firebase_functions/private/serving.py", line 40, in get_functions
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Volumes/Cased/Projects/cloud-functions/functions/main.py", line 29, in <module>
@https_fn.on_request(invoker="public", memory=options.MemoryOption.MB_512)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Volumes/Cased/Projects/cloud-functions/functions/.venv/lib/python3.11/site-packages/firebase_functions/https_fn.py", line 443, in on_request_inner_decorator
options._endpoint(func_name=func.__name__),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Volumes/Cased/Projects/cloud-functions/functions/.venv/lib/python3.11/site-packages/firebase_functions/options.py", line 1120, in _endpoint
assert len(
^^^^
AssertionError: HttpsOptions: Invalid option for invoker - must be a non-empty list.
The text was updated successfully, but these errors were encountered:
Hello @thanhbinh01234. The invoker argument expects a string. From your comment, you are passing True. Could you check or provide a code sample with this fix?
Could you provide me with a simple code sample which correctly reproduces this issue? Also, please provide me with your Python version as well as the SDK version you're using. If you are using an older version, do check if this still occurs on the latest version as well. Thank you
) >1, "HttpsOptions: Invalid option for invoker - must be a non-empty list."
This asserts the list length must have at least two items. invoker="public" gets coerced to invoker=["public"] which fails the assertion, but invoker=["user1", "user2"] passes.
According to the typing of
HttpsOptions
class, I should be able to setinvoker
topublic
orprivate
. But when I tried to deploy ahttps_fn.on_request
function withinvoker=True
, an error is raised:The text was updated successfully, but these errors were encountered: