anthonydresser / testissues

0 stars 0 forks source link

Azure connections go in a loop to open connection dialog after connection failed + cancel #1707

Open adsbot[bot] opened 5 years ago

adsbot[bot] commented 5 years ago

Steps to Reproduce:

  1. Connect to an Azure account.
  2. expand to subscription-->Servers
  3. Click on a server that you don't have login creds for
  4. you get a connection failed pop up (as expected) and then you cancel the connection dialog
  5. After this there is a loop of error popup and connection dialog reopening like following
  6. Work around to break the loop is to manually enter some valid connection details (for any other server) and click connect

loop in azure

Error log from connection error :

System.Data.SqlClient.SqlException (0x80131904): Login failed for user . at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.<>cDisplayClass40_0.b_1(Task`1 ) at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) --- End of stack trace from previous location where exception was thrown --- at Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection.ReliableSqlConnection.<>cDisplayClass28_0.<b__0>d.MoveNext() in D:\a\1\s\src\Microsoft.SqlTools.ManagedBatchParser\ReliableConnection\ReliableSqlConnection.cs:line 303 --- End of stack trace from previous location where exception was thrown --- at Microsoft.SqlTools.ServiceLayer.Connection.ConnectionService.TryOpenConnection(ConnectionInfo connectionInfo, ConnectParams connectionParams) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\Connection\ConnectionService.cs:line 521 ClientConnectionId:90062522-1f2b-4df1-a269-4d4bf7fc6d8a Error Number:18456,State:1,Class:14

adstestbot[bot] commented 5 years ago

Thanks for submitting this issue. Please also check if it is already covered by an existing one, like: