Code Monkey home page Code Monkey logo

Comments (17)

wwlorey avatar wwlorey commented on May 18, 2024 3

Unfortunately this has been an issue with ADAL for a while. We're onboarding support for Microsoft's new authentication library: MSAL (tracking in #203) which will likely fix this issue. And if not - at least MSAL is actively maintained and we can request changes from the MSAL team.

from vscode-azure-account.

e-compton avatar e-compton commented on May 18, 2024 1

If anyone is still encountering this issue, I found that deleting the slsTokenCache worked for me:

rm ~/.azure/slsTokenCache.json

serverless/serverless-azure-functions#412 (comment)

from vscode-azure-account.

jdneo avatar jdneo commented on May 18, 2024

Hi @chrmarti , Seems I found the root cause. It might be a bug in adal lib.

I create an issue: AzureAD/azure-activedirectory-library-for-nodejs#197

Correct me if I'm wrong. 😄

from vscode-azure-account.

chrmarti avatar chrmarti commented on May 18, 2024

@jdneo I cannot reproduce this myself currently. Is it still a problem and would it be fixed by the PR AzureAD/azure-activedirectory-library-for-nodejs#188?

from vscode-azure-account.

jdneo avatar jdneo commented on May 18, 2024

@chrmarti

I can still repro this on my side, the steps are:

  • Make sure the Azure Account is signed out at first
  • Trigger Open bash in Cloud Shell
  • Sign in
  • Wait for the Cloud Shell connected
  • Dispose the Cloud Shell terminal
  • Trigger Open bash in Cloud Shell again

from vscode-azure-account.

chrmarti avatar chrmarti commented on May 18, 2024

That reproduces it and the PR you linked seems to fix it. Now we just need that fix in adal-node.

from vscode-azure-account.

jdneo avatar jdneo commented on May 18, 2024

@chrmarti Agree..

from vscode-azure-account.

derek1ee avatar derek1ee commented on May 18, 2024

I was able to repro this, simply by leaving VS Code open for ~an hour without interacting with it.

from vscode-azure-account.

su-jie avatar su-jie commented on May 18, 2024

We are experiencing the same issue. Do you guys know if it has been fixed?

from vscode-azure-account.

chrmarti avatar chrmarti commented on May 18, 2024

No, AzureAD/azure-activedirectory-library-for-nodejs#197 should be reopened from what I see.

from vscode-azure-account.

fiveisprime avatar fiveisprime commented on May 18, 2024

Any idea on the right person/team to contact about getting this fixed?

from vscode-azure-account.

chrmarti avatar chrmarti commented on May 18, 2024

@navyasric closed the upstream issue (AzureAD/azure-activedirectory-library-for-nodejs#197), maybe we can reach out to her.

from vscode-azure-account.

gi-joe-moto avatar gi-joe-moto commented on May 18, 2024

Still encountering this issue...

from vscode-azure-account.

ms-guizha avatar ms-guizha commented on May 18, 2024

any one can help for this issue ?

from vscode-azure-account.

chrmarti avatar chrmarti commented on May 18, 2024

Upstream is unresponsive. We could look into shipping a patched version, but we also want to look into moving to MSAL (replacing ADAL that shows the problem).

from vscode-azure-account.

scale-tone avatar scale-tone commented on May 18, 2024

What an ever-green issue. ~100 mentions!
Let me contribute to it as well.

I'm occasionally seeing this error when for some reason the token cache (maintained by adal-node library) contains two valid tokens with the same resource value:
image

This makes _loadSingleEntryFromCache() method produce an error as shown on the screenshot, which is then converted into an Entry not found in cache failure:
image

I don't know which chain of events leads to a token being duplicated in the cache. I also don't know why adal-node treats this condition as a failure.

Restarting vscode seems to help.

adal-node v0.2.3
ms-vscode.azure-account-0.9.11

from vscode-azure-account.

scale-tone avatar scale-tone commented on May 18, 2024

I don't know which chain of events leads to a token being duplicated in the cache

No, wait, I know!
It's a concurrency issue. Token cache (or some code that uses it) doesn't tolerate parallel async calls, that use the same kind of token.
In my case the solution was to always make all network calls sequentially.
But there're always chances for unrelated calls to interfere with each other like that, so this is definitely a bug on the token cache side.

from vscode-azure-account.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.