Page MenuHome

Blender Cloud/ID addon error: Please log in on Blender ID first.
Closed, ResolvedPublic

Description

System Information
macOS 10.12.6 (16G29)
NVIDIA GeForce GT 650M 1024 MB

Blender Version
Broken: 2.79.0 5bd8ac9

Short description of error
The Blender Cloud addon keeps complaining that I have to log in when I click 'Find project to load' or when pressing Ctrl+Shift+Alt+A. Despite the Blender ID addon (and also the Blender Cloud addon!) stating that I am logged in. This is the traceback I get:

WARNING blender_cloud.pillar Unable to create authentication token: Your Blender ID login is not valid, try logging in again.
Error: Please log in on Blender ID first.

<Task finished coro=<BlenderCloudBrowser.async_execute() done, defined at /Users/jasperge/blender_scripts/addons/blender_cloud/texture_browser.py:362> exception=UserNotLoggedInError('Not logged in.',)>: resulted in exception
Traceback (most recent call last):
  File "/Users/xxx/blender_scripts/addons/blender_cloud/pillar.py", line 305, in refresh_pillar_credentials
    blender_id.create_subclient_token(SUBCLIENT_ID, pillar_endpoint)
  File "/Applications/bf-blender/blender.app/Contents/Resources/2.79/scripts/addons/blender_id/__init__.py", line 100, in create_subclient_token
    scst_info = communication.subclient_create_token(profile.token, subclient_id)
  File "/Applications/bf-blender/blender.app/Contents/Resources/2.79/scripts/addons/blender_id/communication.py", line 189, in subclient_create_token
    raise BlenderIdCommError('Your Blender ID login is not valid, try logging in again.')
blender_id.communication.BlenderIdCommError: Your Blender ID login is not valid, try logging in again.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/xxx/blender_scripts/addons/blender_cloud/pillar.py", line 846, in check_credentials
    db_user = await refresh_pillar_credentials(required_roles)
  File "/Users/xxx/blender_scripts/addons/blender_cloud/pillar.py", line 308, in refresh_pillar_credentials
    raise CredentialsNotSyncedError()
blender_cloud.pillar.CredentialsNotSyncedError: CredentialsNotSyncedError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/xxx/blender_scripts/addons/blender_cloud/async_loop.py", line 94, in kick_async_loop
    res = task.result()
  File "/Applications/bf-blender/blender.app/Contents/Resources/2.79/python/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/Users/xxx/blender_scripts/addons/blender_cloud/async_loop.py", line 94, in kick_async_loop
    res = task.result()
  File "/Applications/bf-blender/blender.app/Contents/Resources/2.79/python/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/Users/xxx/blender_scripts/addons/blender_cloud/async_loop.py", line 279, in _stop_async_task
    self.async_task.result()  # This re-raises any exception of the task.
  File "/Applications/bf-blender/blender.app/Contents/Resources/2.79/python/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/Users/xxx/blender_scripts/addons/blender_cloud/async_loop.py", line 94, in kick_async_loop
    res = task.result()
  File "/Applications/bf-blender/blender.app/Contents/Resources/2.79/python/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/Applications/bf-blender/blender.app/Contents/Resources/2.79/python/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/Users/xxx/blender_scripts/addons/blender_cloud/texture_browser.py", line 367, in async_execute
    db_user = await self.check_credentials(context, REQUIRED_ROLES_FOR_TEXTURE_BROWSER)
  File "/Users/xxx/blender_scripts/addons/blender_cloud/pillar.py", line 852, in check_credentials
    raise UserNotLoggedInError('Not logged in.')
blender_cloud.pillar.UserNotLoggedInError: UserNotLoggedInError

On my Linux machine everything works just fine.

Details

Type
Bug

Event Timeline

Blender Cloud addon is version 1.7.4, by the way.

If the doctor could take a look, it would great :)

@Jasper van Nieuwenhuizen (jasperge) have you tried logging out & back in again in the Blender ID addon?

An older version of that add-on didn't store the expiry date of your authentication token. As a result, it can't warn you that it expired, and it'll just act as if its nose bleeds and you're logged in just fine. A logout+login will fix that. And, as a bonus, it'll then tell you when your login will expire.

@Sybren A. Stüvel (sybren) Yes, I did. After that the expiration date was set to the same date next year. Unfortunately, that didn't help. To be completely sure I will try again tonight (I don't have my laptop with me at the moment).

Is there anything else I can do to investigate the problem further and/or help you fix it?

Yep, I did log out and log in again. Still the same problem...

Hmmm try starting Blender with blender --debug. That'll give you an extra button "Update Credentials" in the Blender Cloud add-on preferences panel:

Try clicking on this. If it fixes things, I'll know a bit more about what's going wrong.

Sadly this still doesn't work. At a quick glance, it seems I basically have the same error:

WARNING blender_cloud.pillar Unable to create authentication token: Your Blender ID login is not valid, try logging in again.
ERROR blender_cloud.blender Error in test call to Pillar
Traceback (most recent call last):
  File "/Users/xxx/blender_scripts/addons/blender_cloud/pillar.py", line 305, in refresh_pillar_credentials
    blender_id.create_subclient_token(SUBCLIENT_ID, pillar_endpoint)
  File "/Applications/bf-blender/blender.app/Contents/Resources/2.79/scripts/addons/blender_id/__init__.py", line 100, in create_subclient_token
    scst_info = communication.subclient_create_token(profile.token, subclient_id)
  File "/Applications/bf-blender/blender.app/Contents/Resources/2.79/scripts/addons/blender_id/communication.py", line 189, in subclient_create_token
    raise BlenderIdCommError('Your Blender ID login is not valid, try logging in again.')
blender_id.communication.BlenderIdCommError: Your Blender ID login is not valid, try logging in again.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/xxx/blender_scripts/addons/blender_cloud/pillar.py", line 846, in check_credentials
    db_user = await refresh_pillar_credentials(required_roles)
  File "/Users/xxx/blender_scripts/addons/blender_cloud/pillar.py", line 308, in refresh_pillar_credentials
    raise CredentialsNotSyncedError()
blender_cloud.pillar.CredentialsNotSyncedError: CredentialsNotSyncedError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/xxx/blender_scripts/addons/blender_cloud/blender.py", line 519, in execute
    loop.run_until_complete(self.check_credentials(context, set()))
  File "/Applications/bf-blender/blender.app/Contents/Resources/2.79/python/lib/python3.5/asyncio/base_events.py", line 466, in run_until_complete
    return future.result()
  File "/Applications/bf-blender/blender.app/Contents/Resources/2.79/python/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/Applications/bf-blender/blender.app/Contents/Resources/2.79/python/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/Users/xxx/blender_scripts/addons/blender_cloud/pillar.py", line 852, in check_credentials
    raise UserNotLoggedInError('Not logged in.')
blender_cloud.pillar.UserNotLoggedInError: UserNotLoggedInError

I also pressed on 'Validate' in the Blender ID add-on preferences panel and there I get the message 'Authentication token is valid'. So that seems to be okay.

Sergey Sharybin (sergey) triaged this task as Normal priority.Sep 19 2017, 1:55 PM

OSX 10.11.6

I'm having similar issues. Initially I was getting an error trying to get images from the cloud via the UV/Image editor. I don't recall the exact error message that was issued, but I signed out and back into the blender ID and I'm now getting (in the UV/Image editor) "An error occurred: You are not logged in on Blender ID. Please log in at User Preferences, System, Blender ID." (The original error was much longer and I can no longer reproduce it.)

Blender ID validation returns: 'Authentication token is valid. .... expires 2018-10-19'

Attempting to connect to the cloud from the UV/Image editor after launching blender --debug:

  File "/Users/Rob/Library/Application Support/Blender/2.79/scripts/addons/blender_cloud/async_loop.py", line 248, in _stop_async_task
    self.async_task.result()  # This re-raises any exception of the task.
  File "/Applications/blender-2.79/blender.app/Contents/Resources/2.79/python/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/Users/Rob/Library/Application Support/Blender/2.79/scripts/addons/blender_cloud/async_loop.py", line 84, in kick_async_loop
    res = task.result()
  File "/Applications/blender-2.79/blender.app/Contents/Resources/2.79/python/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/Applications/blender-2.79/blender.app/Contents/Resources/2.79/python/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/Users/Rob/Library/Application Support/Blender/2.79/scripts/addons/blender_cloud/texture_browser.py", line 376, in async_execute
    raise pillar.UserNotLoggedInError()
blender_cloud.pillar.UserNotLoggedInError: UserNotLoggedInError

Which version of the Blender Cloud add-on are you using?

I downloaded 1.7.5 yesterday (I hadn't noticed its availability before), and now it's working for me. I apologize for not mentioning it yesterday, but I got caught up in other stuff.

Cheers.

Still no luck for me. I dived into the code and by hand re-created the request that is sent by subclient_create_token. I then (as expected) got a 401 response. Logging out and back in didn't help. Just to be completely sure I even deleted the 'blender_id' directory containing the profiles.
I also disabled the Blender ID and Blender Cloud add ons. Saved the user preferences, restarted Blender. Enabled the Blender ID add on and logged in. Saved user preferences, restarted Blender and enabled the Blender Cloud add on.
I also re-created the login request and with the token I got, did the subclient_create_token request again. Still the same error. So to me it seems that something on the server is going wrong. But I can't imagine what that should be... and why this only happens on my laptop.

Pfff, so in the end I was able to track it down to a default entry in my .netrc file. This messes up the authentication.
There is also an issue about this problem on the requests Github page.

For me the solution is very simple: just remove the default entry in my .netrc file and all is well. But from what I gathered by quickly glancing over the metioned issue on Github, it should be fairly straightforward to fix in the Blender ID add-on (where the actual error takes place and not in the Blender Cloud add-on).

Sybren A. Stüvel (sybren) closed this task as Resolved.Jan 3 2018, 2:08 PM

We can't just set trust_env=False, because that would also ignore any proxy settings someone might have. For now I'll just close this issue, as using a .netrc is fairly exotic.

Thanks again for doing all the digging, I wouldn't have been able to find this by myself!