Replies: 1 comment 1 reply
-
More details needed. What triggers this problem? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The interface loaded by pywebview will trigger a CTRL+F5 hard refresh in the frontend after login failure, which will cause the injection of api_js to be cleared. Please ask whether you can avoid the problem of api_js being cleared after hard refresh, or inject api_js again after hard refresh, instead of invalidating, which causes pywebview.api to fail after logging in again. Here are the details of the error:
Traceback (most recent call last):
File "D:\xxxx.venv\lib\site-packages\webview\util.py", line 183, in inject_pywebview
func_list = generate_func()
File "D:\xxxx.venv\lib\site-packages\webview\util.py", line 171, in generate_func
functions = get_functions(window._js_api)
File "D:\xxxx.venv\lib\site-packages\webview\util.py", line 166, in get_functions
get_functions(attr, full_name, functions)
File "D:\xxxx.venv\lib\site-packages\webview\util.py", line 166, in get_functions
get_functions(attr, full_name, functions)
File "D:\xxxx.venv\lib\site-packages\webview\util.py", line 166, in get_functions
get_functions(attr, full_name, functions)
[Previous line repeated 1 more time]
File "D:\xxxx.venv\lib\site-packages\webview\util.py", line 161, in get_functions
attr = getattr(obj, name)
File "D:\xxxx.venv\lib\site-packages\webview\dom\dom.py", line 18, in body
return self._elements.get('body', Element(self.__window, 'body'))
File "D:\xxxx.venv\lib\site-packages\webview\dom\element.py", line 77, in init
self.__generate_events()
File "D:\xxxx.venv\lib\site-packages\webview\dom\element.py", line 36, in wrapper
return func(*args, **kwargs)
File "D:\xxxx.venv\lib\site-packages\webview\dom\element.py", line 426, in __generate_events
for event in events:
TypeError: 'NoneType' object is not iterable
Beta Was this translation helpful? Give feedback.
All reactions