microsoft / msopentech-tools-for-intellij

Plugin for easy and fast development to enable developers of Android Apps to connect to Office 365 services and Azure Mobile Services, and developers of Java middleware to connect to Azure compute services
Apache License 2.0
28 stars 34 forks source link

User gets exception during signout when AD token is expired #204

Closed babumuralidharan closed 9 years ago

babumuralidharan commented 9 years ago

User signs in via AD. In this case i guess my AD token was expired and when i tried signout it resulted in invalid token exception. Refer screenshot and error log below.

image

java.lang.UnsupportedOperationException: The authentication mode has been set to use AD but no valid access token found. Please sign in to your account.
    at com.microsoftopentechnologies.intellij.helpers.azure.sdk.AuthTokenRequestFilter.filter(AuthTokenRequestFilter.java:39)
    at com.microsoft.windowsazure.core.pipeline.apache.HttpRequestInterceptorAdapter.process(HttpRequestInterceptorAdapter.java:42)
    at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:131)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:192)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:85)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
    at com.microsoft.windowsazure.management.compute.DeploymentOperationsImpl.getBySlot(DeploymentOperationsImpl.java:7004)
    at com.microsoftopentechnologies.intellij.helpers.azure.sdk.AzureSDKManagerImpl.getDeployment(AzureSDKManagerImpl.java:865)
    at com.microsoftopentechnologies.intellij.helpers.azure.sdk.AzureSDKManagerImpl.loadVirtualMachines(AzureSDKManagerImpl.java:1079)
    at com.microsoftopentechnologies.intellij.helpers.azure.sdk.AzureSDKManagerImpl.getVirtualMachines(AzureSDKManagerImpl.java:191)
    at com.microsoftopentechnologies.intellij.helpers.azure.sdk.AzureSDKManagerADAuthDecorator$2.run(AzureSDKManagerADAuthDecorator.java:138)
    at com.microsoftopentechnologies.intellij.helpers.azure.sdk.AzureSDKManagerADAuthDecorator$2.run(AzureSDKManagerADAuthDecorator.java:135)
    at com.microsoftopentechnologies.intellij.helpers.azure.sdk.AzureSDKManagerADAuthDecorator.runWithRetry(AzureSDKManagerADAuthDecorator.java:71)
    at com.microsoftopentechnologies.intellij.helpers.azure.sdk.AzureSDKManagerADAuthDecorator.getVirtualMachines(AzureSDKManagerADAuthDecorator.java:135)
    at com.microsoftopentechnologies.intellij.serviceexplorer.azure.vm.VMServiceModule.refreshItems(VMServiceModule.java:52)
    at com.microsoftopentechnologies.intellij.serviceexplorer.Node.refreshItems(Node.java:334)
    at com.microsoftopentechnologies.intellij.serviceexplorer.Node$BackgroundLoader.run(Node.java:424)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:471)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
    at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:380)
    at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
    at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)
kasturiswain commented 9 years ago

This issue is not reproducible in the build (0.1.36 and 0.1.236).