Blender Cloud/ID addon error: Please log in on Blender ID first. #52771

Closed
opened 2017-09-15 23:03:59 +02:00 by Jasper van Nieuwenhuizen · 20 comments

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.

**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.

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @jasperge-2

Added subscriber: @jasperge-2

infrastructure/blender-id#53288 was marked as duplicate of this issue

infrastructure/blender-id#53288 was marked as duplicate of this issue

Blender Cloud addon is version 1.7.4, by the way.

Blender Cloud addon is version 1.7.4, by the way.

Added subscriber: @fsiddi

Added subscriber: @fsiddi
Sybren A. Stüvel was assigned by Francesco Siddi 2017-09-16 18:26:50 +02:00

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

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

@jasperge-2 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.

@jasperge-2 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.

@dr.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?

@dr.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...

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:

flamenco-manager-setup1.png

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

Hmmm try starting Blender with `blender --debug`. That'll give you an extra button "Update Credentials" in the Blender Cloud add-on preferences panel: ![flamenco-manager-setup1.png](https://archive.blender.org/developer/F824195/flamenco-manager-setup1.png) 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.

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.

Added subscriber: @RJW

Added subscriber: @RJW

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
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?

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.

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.

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).

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 ](https://github.com/requests/requests/issues/3929) 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).

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

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!

We can't just set [`trust_env=False`](http://docs.python-requests.org/en/master/api/#requests.Session.trust_env), 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!
Sign in to join this conversation.
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#52771
No description provided.