The Client Storage API is encountering a timeout error when utilizing methods such as contains_key, set, get, and clear. This timeout issue is hindering the smooth operation of the API and needs to be addressed to ensure the reliability and functionality of the system.
This behavior is observed also in async version
Code example to reproduce the issue:
if self._page.client_storage.contains_key(CLIENT_STORAGE_KEYS.CURRENT_DAY.value):
self._page.client_storage.set(
CLIENT_STORAGE_KEYS.CURRENT_DAY.value, new_date.day
)
Describe the results you received:
Traceback (most recent call last):
File "/workspaces/Consul-Manager/FleetApp/CommonRefContext/init.py", line 156, in set_current_date
if self._page.client_storage.contains_key(CLIENT_STORAGE_KEYS.CURRENT_DAY.value):
File "/workspaces/Consul-Manager/pythonEnv/flet21/lib/python3.10/site-packages/flet_core/client_storage.py", line 46, in contains_key
self.__page._invoke_method(
File "/workspaces/Consul-Manager/pythonEnv/flet21/lib/python3.10/site-packages/flet_core/page.py", line 863, in _invoke_method
raise TimeoutError(
TimeoutError: Timeout waiting for invokeMethod clientStorage:containskey({'key': 'current_day'}) call
Describe the results you expected:
not errors
Additional information you deem important (e.g. issue happens only occasionally):
Flet version (pip show flet):
Name: flet
Version: 0.21.2
Summary: Flet for Python - easily build interactive multi-platform apps in Python
Home-page:
Author: Appveyor Systems Inc.
Author-email: hello@flet.dev
License: Apache-2.0
Location: /workspaces/Consul-Manager/pythonEnv/flet21/lib/python3.10/site-packages
Requires: cookiecutter, fastapi, flet-runtime, packaging, qrcode, uvicorn, watchdog
Required-by:
Description
The Client Storage API is encountering a timeout error when utilizing methods such as contains_key, set, get, and clear. This timeout issue is hindering the smooth operation of the API and needs to be addressed to ensure the reliability and functionality of the system.
This behavior is observed also in async version
Code example to reproduce the issue:
Describe the results you received:
Traceback (most recent call last): File "/workspaces/Consul-Manager/FleetApp/CommonRefContext/init.py", line 156, in set_current_date if self._page.client_storage.contains_key(CLIENT_STORAGE_KEYS.CURRENT_DAY.value): File "/workspaces/Consul-Manager/pythonEnv/flet21/lib/python3.10/site-packages/flet_core/client_storage.py", line 46, in contains_key self.__page._invoke_method( File "/workspaces/Consul-Manager/pythonEnv/flet21/lib/python3.10/site-packages/flet_core/page.py", line 863, in _invoke_method raise TimeoutError( TimeoutError: Timeout waiting for invokeMethod clientStorage:containskey({'key': 'current_day'}) call
Describe the results you expected:
not errors
Additional information you deem important (e.g. issue happens only occasionally):
Flet version (
pip show flet
):Operating system:
Additional environment details: