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

Fix issue with tk-desktop stomping on a specified authenticated user with the default user #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mbrainerd
Copy link

This fixes an issue where the previously authenticated user (initiated during tk-framework-desktopstartup's startup.py execution) is being overridden by tk-desktop setting the current user to CoreDefaultManager's default user. This bit us when attempting to have artists switch back and forth between multiple Shotgun servers, and the connection url being incorrect since it gets pulled from the default user rather than the authenticated user.

@unchris
Copy link

unchris commented Feb 19, 2019

Would this fix this stack trace?

Traceback (most recent call last):
  File "/Users/ccameron/Library/Caches/Shotgun/desktop/install/app_store/tk-framework-desktopstartup/v1.10.0/python/shotgun_desktop/startup.py", line 720, in main
    settings
  File "/Users/ccameron/Library/Caches/Shotgun/desktop/install/app_store/tk-framework-desktopstartup/v1.10.0/python/shotgun_desktop/startup.py", line 334, in __launch_app
    return __post_bootstrap_engine(splash, app_bootstrap, engine, settings)
  File "/Users/ccameron/Library/Caches/Shotgun/desktop/install/app_store/tk-framework-desktopstartup/v1.10.0/python/shotgun_desktop/startup.py", line 488, in __post_bootstrap_engine
    startup_descriptor=startup_desc
  File "/Applications/Shotgun.app/Contents/Resources/Python/bundle_cache/app_store/tk-desktop/v2.4.12/python/tk_desktop/desktop_engine_site_implementation.py", line 467, in run
    self.desktop_window = desktop_window.DesktopWindow(console)
  File "/Applications/Shotgun.app/Contents/Resources/Python/bundle_cache/app_store/tk-desktop/v2.4.12/python/tk_desktop/desktop_window.py", line 170, in __init__
    "HumanUser", [["id", "is", user["id"]]],
TypeError: 'NoneType' object has no attribute '__getitem__'

It appears that user on line 170 is None after calling user = engine.get_current_login(). Based on the comments about it being about switching between accounts, my guess is this bit me because I had originally tried to sign into an incorrect URL, and then tried again with the correct one. Perhaps it then pulled None from the previous failed attempt to connect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants