Skip to content
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

Handling of expired session #62

Open
antirotor opened this issue Oct 30, 2023 · 0 comments
Open

Handling of expired session #62

antirotor opened this issue Oct 30, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@antirotor
Copy link
Member

Problem

When you put your computer to sleep for some time when your AYON is still running and you wake it after some time, login session problably expires between launcher and server, resulting in:

Traceback (most recent call last):
  File "C:\Users\annat\AppData\Local\Ynput\AYON\addons\openpype_3.17.4-nightly.1\openpype\tools\ayon_launcher\ui\actions_widget.py", line 451, in _on_clicked
    self._controller.trigger_action(
  File "C:\Users\annat\AppData\Local\Ynput\AYON\addons\openpype_3.17.4-nightly.1\openpype\tools\ayon_launcher\control.py", line 131, in trigger_action
    self._actions_model.trigger_action(
  File "C:\Users\annat\AppData\Local\Ynput\AYON\addons\openpype_3.17.4-nightly.1\openpype\tools\ayon_launcher\models\actions.py", line 342, in trigger_action
    session = self._prepare_session(project_name, folder_id, task_id)
  File "C:\Users\annat\AppData\Local\Ynput\AYON\addons\openpype_3.17.4-nightly.1\openpype\tools\ayon_launcher\models\actions.py", line 407, in _prepare_session
    folder = self._controller.get_folder_entity(
  File "C:\Users\annat\AppData\Local\Ynput\AYON\addons\openpype_3.17.4-nightly.1\openpype\tools\ayon_launcher\control.py", line 82, in get_folder_entity
    return self._hierarchy_model.get_folder_entity(
  File "C:\Users\annat\AppData\Local\Ynput\AYON\addons\openpype_3.17.4-nightly.1\openpype\tools\ayon_utils\models\hierarchy.py", line 369, in get_folder_entity
    output = self.get_folder_entities(project_name, {folder_id})
  File "C:\Users\annat\AppData\Local\Ynput\AYON\addons\openpype_3.17.4-nightly.1\openpype\tools\ayon_utils\models\hierarchy.py", line 362, in get_folder_entities
    self._query_folder_entities(project_name, folder_ids_to_query)
  File "C:\Users\annat\AppData\Local\Ynput\AYON\addons\openpype_3.17.4-nightly.1\openpype\tools\ayon_utils\models\hierarchy.py", line 470, in _query_folder_entities
    for folder in folders:
  File "C:\Users\annat\Documents\Projects\OpenPype\sources\ayon-launcher\.venv\lib\site-packages\ayon_api\server_api.py", line 3670, in get_folders
    for parsed_data in query.continuous_query(self):
  File "C:\Users\annat\Documents\Projects\OpenPype\sources\ayon-launcher\.venv\lib\site-packages\ayon_api\graphql.py", line 370, in continuous_query
    response = con.query_graphql(query_str, variables)
  File "C:\Users\annat\Documents\Projects\OpenPype\sources\ayon-launcher\.venv\lib\site-packages\ayon_api\server_api.py", line 1696, in query_graphql
    response.raise_for_status()
  File "C:\Users\annat\Documents\Projects\OpenPype\sources\ayon-launcher\.venv\lib\site-packages\ayon_api\server_api.py", line 184, in raise_for_status
    raise HTTPRequestError(message, exc.response)
ayon_api.exceptions.HTTPRequestError: 401 Client Error: Unauthorized for url: http://localhost:5000/graphql

but this is not handled in UI at all - so it seems that almost nothing works (like launching DCCs in launcher, etc.)

We should handle this more gracefully and pop-up login dialog again.

@antirotor antirotor added the bug Something isn't working label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants