No access token found in cache, please sign in. To sign in, use a web browser to open the page https

Contributor

Hi, after working correctly during many training tests of a Brain with Bonsai, suddenly I get the following:

No access token found in cache, please sign in.
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code XXXXXXX to authenticate.

And I go to that link and enter the code, but I get the following error:
Error: An error occurred
Error authenticating user: 'Error: could not fetch AAD access token after login.'
What will be happening?

6 Replies
@davidcoe, my workspace ID is: 9aa68445-5f0a-4b9c-ae55-2e83ee6febcb
Thanks.

@Luciano052023 

Thanks. The only errors I see for this workspace in the logs are related to attempting to create Python containers with a zip that doesn't contain a requirements.txt file. However, nothing related to the AAD token. That leads me to think your error is happening before it reaches the platform.

 

To confirm -- you are using the CLI, correct? Have you run the bonsai configure command with the workspace and tenant details? 

@davidcoe thanks:

Effectively. It's on my local machine, but what I don't understand is that I'm doing the same procedure that worked for me before.

Now, I ran the following command:

bonsai configure --workspace-id my_workspace_id

 

And I got the following:

No access token found in cache, please sign in.

To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code RV2R2VZYZ to authenticate.

 

I went to that link and entered the code and my email and my password, and I got:

 

Successfully configured

 

But when I ran the command:

 bonsai brain create -n new_brain

 

I got the following error:

 Error: {"code": "InvalidBearerToken", "message": "The bearer token does not contain 'oid' claim"}

 

Please, can you help me to overcome this error?

Are you on the latest CLI version (1.0.19)?

Are you able to log in to the bonsai UI directly?
@davidcoe thanks:
I am using CLI version 1.0.12.
I don't know why when I want to get the logs in Bonsai UI I get:
"You are not authorized to access this resource".

Finally, I was able to overcome this problem using the documentation: "Add a training simulator to your Bonsai workspace". I am working with python.