azure-sdk-for-net icon indicating copy to clipboard operation
azure-sdk-for-net copied to clipboard

[BUG] Intermittent 'Authentication failed: Response was not set, make sure SendAsync' was called when authenticating

Open davecader opened this issue 2 years ago • 32 comments

Library name and version

Azure.ResourceManager 1.3.1

Describe the bug

We are observing an 'Authentication failed: Response was not set, make sure SendAsync' was called when attempting to authenticate with Azure. We first starting noticing this error on 2023-01-04 (it was authenticating without error previously).

Call Stack:

at Azure.Identity.CredentialDiagnosticScope.FailWrapAndThrow(Exception ex, String additionalMessage)
at Azure.Identity.InteractiveBrowserCredential.<AuthenticateImplAsync>d__39.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Azure.Identity.InteractiveBrowserCredential.<AuthenticateAsync>d__36.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Azure.Identity.InteractiveBrowserCredential.<AuthenticateAsync>d__34.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult() t Kelverion.RunbookStudio.Cloud.Client.AutomationClientFactory.<Connect>d__4.MoveNext()

Expected behavior

Should authenticate without error.

Actual behavior

Authentication fails with InvalidOperationException ''InteractiveBrowserCredential authentication failed: Response was not set, make sure SendAsync' exception.

Reproduction Steps

var options = new InteractiveBrowserCredentialOptions { ... } var credential = new InteractiveBrowserCredential(options); await credential.AuthenticateAsync();

Environment

.NET Framework 4.8.1 Windows 10

davecader avatar Jan 04 '23 12:01 davecader

//cc: @christothes

jsquire avatar Jan 04 '23 13:01 jsquire

Thank you for your feedback. Tagging and routing to the team member best able to assist.

jsquire avatar Jan 04 '23 13:01 jsquire

I attempted another approach using PublicClientApplicationBuilder instead of InteractiveBrowserCredential. I was able to successfully get an access token. I then encapsulated the access token and expiry in a custom TokenCredential implementation which was then used to initialize an ArmClient instance. So far so good.

Unfortunately, when using the client to interact with Azure (eg. AutomationCertificateResource.UpdateAsync) I again observe the InvalidOperation exception, this time with the message 'Response was not set, make sure SendAsync was called'. Get the same error with every Arure.ResourceManager.Automation method that I have called so far.

Stack Trace:

at Azure.Core.HttpMessage.get_Response()
at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.PropertySpec.PropertyFetch.TypedFetchProperty2.Fetch(Object obj) at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.Morph(Object obj) at System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform.Morph(Object args) at System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform.<>c__DisplayClass2_1.<.ctor>b__2(KeyValuePair2 evnt)
at System.Diagnostics.DiagnosticSourceEventSource.CallbackObserver1.OnNext(T value) at System.Diagnostics.DiagnosticListener.Write(String name, Object value) at Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.Dispose() at Azure.Core.Pipeline.RequestActivityPolicy.<ProcessAsync>d__11.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Azure.Core.Pipeline.ResponseBodyPolicy.<ProcessAsync>d__5.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.<ProcessAsync>d__11.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Azure.Core.Pipeline.RedirectPolicy.<ProcessAsync>d__5.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Azure.Core.Pipeline.RetryPolicy.<ProcessAsync>d__11.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Azure.Core.Pipeline.RetryPolicy.<ProcessAsync>d__11.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Azure.ResourceManager.Automation.RunbookRestOperations.<GetAsync>d__12.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Azure.ResourceManager.Automation.AutomationRunbookCollection.<GetAsync>d__7.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult()
at Kelverion.RunbookStudio.Cloud.Client.AutomationRunbookCollectionClient.<UpdateCoreAsync>d__10.MoveNext() in C:\Users\DavidCader\source\repos\app-automation-console\Src\Kelverion.RunbookStudio.Cloud\Client\AutomationRunbookCollectionClient.cs:line 132 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at Kelverion.RunbookStudio.Cloud.Client.AutomationCollectionClientBase1.<UpdateAsync>d__13.MoveNext() in C:\Users\DavidCader\source\repos\app-automation-console\Src\Kelverion.RunbookStudio.Cloud\Client\AutomationCollectionClientBase.cs:line 124"

davecader avatar Jan 05 '23 17:01 davecader

It looks like the exception is originating in Azure.Core/src/HttpMessage.cs at line 47. Not sure why it started to fail this week after working previously, but this is where the exception is thrown.

public Response Response
{
   get
   {
       if (_response == null)
       {
#pragma warning disable CA1065 // Do not raise exceptions in unexpected locations
           throw new InvalidOperationException("Response was not set, make sure SendAsync was called");
#pragma warning restore CA1065 // Do not raise exceptions in unexpected locations
       }
       return _response;
   }
   set => _response = value;
}

davecader avatar Jan 06 '23 17:01 davecader

Another interesting observation, is that this issue is only reproduceable when we debug our application in Visual Studio. When I run our application outside of the debugger, the error is not observed.

davecader avatar Jan 09 '23 14:01 davecader

Hi @davecader - Would it be possible to provide a simplified code snippet that reproduces the problem?

christothes avatar Jan 09 '23 22:01 christothes

After authenticating the ArmClient using Graph API (using the method discussed previously), I find that any call the the Azure SDK results in this error (it could be GetAll, Get, CreateOrUpdate, Patch - they all fail when running from Visual Studio). For example:

public async Task<IList<SubscriptionData>> ListAsync()
{
	var result = new List<SubscriptionData>();
	var enumerator = _subscriptions.GetAllAsync().GetAsyncEnumerator();

	try
	{
		while (await enumerator.MoveNextAsync().ConfigureAwait(false))
		{
			var resource = enumerator.Current.Data;
			result.Add(enumerator.Current.Data);
		}
	}
	catch (RequestFailedException e)
	{
		throw new CloudOperationException(e.Message, e);
	}
	finally
	{
		await enumerator.DisposeAsync().ConfigureAwait(false);
	}

	return result;
}

davecader avatar Jan 16 '23 11:01 davecader

Hi @davecader - I can't reproduce this using the code above. Could you enable logging and provide the output?

christothes avatar Jan 17 '23 19:01 christothes

Hi, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

ghost avatar Jan 24 '23 20:01 ghost

Sorry, I've been out of the office. I will see if I can reproduce with logging enabled today.

davecader avatar Jan 25 '23 11:01 davecader

Logging as requested:

[Informational] Azure-Identity: False MSAL 4.46.0.0 MSAL.Desktop 4.8 or later Windows 10 Enterprise [2023-01-25 12:32:34Z - 57b5d182-5413-405b-b6d5-f69a623676aa] 
=== Request Data ===
Authority Provided? - True
Scopes - https://management.azure.com//.default
Extra Query Params Keys (space separated) - 
ApiId - AcquireTokenInteractive
IsConfidentialClient - False
SendX5C - False
LoginHint ? False
IsBrokerConfigured - False
HomeAccountId - False
CorrelationId - 57b5d182-5413-405b-b6d5-f69a623676aa
UserAssertion set: False
LongRunningOboCacheKey set: False
Region configured: 

[Informational] Azure-Identity: False MSAL 4.46.0.0 MSAL.Desktop 4.8 or later Windows 10 Enterprise [2023-01-25 12:32:34Z - 57b5d182-5413-405b-b6d5-f69a623676aa] === Token Acquisition (InteractiveRequest) started:
	 Scopes: https://management.azure.com//.default
	Authority Host: login.microsoftonline.com
[Informational] Azure-Identity: False MSAL 4.46.0.0 MSAL.Desktop 4.8 or later Windows 10 Enterprise [2023-01-25 12:32:34Z - 57b5d182-5413-405b-b6d5-f69a623676aa] [Region discovery] Not using a regional authority. 
[Informational] Azure-Identity: False MSAL 4.46.0.0 MSAL.Desktop 4.8 or later Windows 10 Enterprise [2023-01-25 12:32:34Z - 57b5d182-5413-405b-b6d5-f69a623676aa] Fetching instance discovery from the network from host login.microsoftonline.com. 
[Informational] Azure-Core: Request [c6036818-a864-4e11-8380-f3e3b8676a3c] GET https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=REDACTED
x-client-SKU:REDACTED
x-client-Ver:REDACTED
x-client-CPU:REDACTED
x-client-OS:REDACTED
client-request-id:REDACTED
return-client-request-id:REDACTED
x-app-name:REDACTED
x-app-ver:REDACTED
x-ms-client-request-id:c6036818-a864-4e11-8380-f3e3b8676a3c
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Identity/1.8.0 (.NET Framework 4.8.4515.0; Microsoft Windows 10.0.19045 )
client assembly: Azure.Identity
Exception thrown: 'System.InvalidOperationException' in Azure.Core.dll
Exception thrown: 'System.InvalidOperationException' in Azure.Core.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
[Informational] Azure-Core: Request [c6036818-a864-4e11-8380-f3e3b8676a3c] exception System.InvalidOperationException: Response was not set, make sure SendAsync was called
   at Azure.Core.HttpMessage.get_Response()
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.PropertySpec.PropertyFetch.TypedFetchProperty`2.Fetch(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.PropertySpec.Fetch(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.Morph(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform.Morph(Object args)
   at System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform.<>c__DisplayClass2_1.<.ctor>b__2(KeyValuePair`2 evnt)
   at System.Diagnostics.DiagnosticSourceEventSource.CallbackObserver`1.OnNext(T value)
   at System.Diagnostics.DiagnosticListener.Write(String name, Object value)
   at Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.Dispose()
   at Azure.Core.Pipeline.DiagnosticScope.Dispose()
   at Azure.Core.Pipeline.RequestActivityPolicy.<ProcessAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azure.Core.Pipeline.ResponseBodyPolicy.<ProcessAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.ValueTask.ThrowIfCompletedUnsuccessfully()
   at Azure.Core.Pipeline.LoggingPolicy.<ProcessAsync>d__9.MoveNext()
Exception thrown: 'System.InvalidOperationException' in Azure.Core.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
[Error] Azure-Identity: False MSAL 4.46.0.0 MSAL.Desktop 4.8 or later Windows 10 Enterprise [2023-01-25 12:32:36Z - 57b5d182-5413-405b-b6d5-f69a623676aa] === Token Acquisition (1005) failed.
	Host: https://login.microsoftonline.com.
[Error] Azure-Identity: False MSAL 4.46.0.0 MSAL.Desktop 4.8 or later Windows 10 Enterprise [2023-01-25 12:32:36Z - 57b5d182-5413-405b-b6d5-f69a623676aa] Exception type: System.InvalidOperationException

   at Azure.Core.HttpMessage.get_Response()
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.PropertySpec.PropertyFetch.TypedFetchProperty`2.Fetch(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.PropertySpec.Fetch(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.Morph(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform.Morph(Object args)
   at System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform.<>c__DisplayClass2_1.<.ctor>b__2(KeyValuePair`2 evnt)
   at System.Diagnostics.DiagnosticSourceEventSource.CallbackObserver`1.OnNext(T value)
   at System.Diagnostics.DiagnosticListener.Write(String name, Object value)
   at Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.Dispose()
   at Azure.Core.Pipeline.DiagnosticScope.Dispose()
   at Azure.Core.Pipeline.RequestActivityPolicy.<ProcessAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azure.Core.Pipeline.ResponseBodyPolicy.<ProcessAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.ValueTask.ThrowIfCompletedUnsuccessfully()
   at Azure.Core.Pipeline.LoggingPolicy.<ProcessAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azure.Core.Pipeline.RedirectPolicy.<ProcessAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.ValueTask.ThrowIfCompletedUnsuccessfully()
   at Azure.Core.Pipeline.RetryPolicy.<ProcessAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Azure.Core.Pipeline.RetryPolicy.<ProcessAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azure.Core.Pipeline.HttpPipeline.<SendRequestAsync>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azure.Core.HttpPipelineMessageHandler.<SendAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Http.HttpManager.<ExecuteAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Http.HttpManager.<ExecuteWithRetryAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Http.HttpManager.<SendGetAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.Identity.Client.OAuth2.OAuth2Client.<ExecuteRequestAsync>d__11`1.MoveNext()
Exception thrown: 'System.InvalidOperationException' in Microsoft.Identity.Client.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
[Error] Azure-Identity: False MSAL 4.46.0.0 MSAL.Desktop 4.8 or later Windows 10 Enterprise [2023-01-25 12:32:36Z - 57b5d182-5413-405b-b6d5-f69a623676aa] Exception type: System.InvalidOperationException

   at Azure.Core.HttpMessage.get_Response()
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.PropertySpec.PropertyFetch.TypedFetchProperty`2.Fetch(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.PropertySpec.Fetch(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.Morph(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform.Morph(Object args)
   at System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform.<>c__DisplayClass2_1.<.ctor>b__2(KeyValuePair`2 evnt)
   at System.Diagnostics.DiagnosticSourceEventSource.CallbackObserver`1.OnNext(T value)
   at System.Diagnostics.DiagnosticListener.Write(String name, Object value)
   at Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.Dispose()
   at Azure.Core.Pipeline.DiagnosticScope.Dispose()
   at Azure.Core.Pipeline.RequestActivityPolicy.<ProcessAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azure.Core.Pipeline.ResponseBodyPolicy.<ProcessAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.ValueTask.ThrowIfCompletedUnsuccessfully()
   at Azure.Core.Pipeline.LoggingPolicy.<ProcessAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azure.Core.Pipeline.RedirectPolicy.<ProcessAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.ValueTask.ThrowIfCompletedUnsuccessfully()
   at Azure.Core.Pipeline.RetryPolicy.<ProcessAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Azure.Core.Pipeline.RetryPolicy.<ProcessAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azure.Core.Pipeline.HttpPipeline.<SendRequestAsync>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Azure.Core.HttpPipelineMessageHandler.<SendAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Http.HttpManager.<ExecuteAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Http.HttpManager.<ExecuteWithRetryAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Http.HttpManager.<SendGetAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Microsoft.Identity.Client.OAuth2.OAuth2Client.<ExecuteRequestAsync>d__11`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.OAuth2.OAuth2Client.<DiscoverAadInstanceAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Instance.Discovery.NetworkMetadataProvider.<SendInstanceDiscoveryRequestAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Instance.Discovery.NetworkMetadataProvider.<FetchAllDiscoveryMetadataAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Instance.Discovery.NetworkMetadataProvider.<GetMetadataAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Instance.Discovery.InstanceDiscoveryManager.<FetchNetworkMetadataOrFallbackAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Instance.Discovery.InstanceDiscoveryManager.<GetMetadataEntryAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Instance.AuthorityManager.<RunInstanceDiscoveryAndValidationAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.<ExecuteAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.<RunAsync>d__12.MoveNext()
Exception thrown: 'System.InvalidOperationException' in Microsoft.Identity.Client.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
Exception thrown: 'System.InvalidOperationException' in mscorlib.dll
[Informational] Azure-Identity: InteractiveBrowserCredential.GetToken was unable to retrieve an access token. Scopes: [ https://management.azure.com//.default ] ParentRequestId: 5a204ceb-214a-4bf0-9d7c-5292fe393552 Exception: Azure.Identity.AuthenticationFailedException (0x80131500): InteractiveBrowserCredential authentication failed: Response was not set, make sure SendAsync was called
 ---> System.InvalidOperationException (0x80131509): Response was not set, make sure SendAsync was called
The parameters to the Event method do not match the parameters to the WriteEvent method. This may cause the event to be displayed incorrectly.
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in Azure.Identity.dll
The parameters to the Event method do not match the parameters to the WriteEvent method. This may cause the event to be displayed incorrectly.
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in mscorlib.dll
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in mscorlib.dll
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in mscorlib.dll
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in mscorlib.dll
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in mscorlib.dll
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in mscorlib.dll
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in mscorlib.dll
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in mscorlib.dll
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in mscorlib.dll
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in mscorlib.dll
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in mscorlib.dll
The parameters to the Event method do not match the parameters to the WriteEvent method. This may cause the event to be displayed incorrectly.
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in Azure.ResourceManager.dll
The parameters to the Event method do not match the parameters to the WriteEvent method. This may cause the event to be displayed incorrectly.
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in mscorlib.dll
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in Microsoft.Bcl.AsyncInterfaces.dll
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in mscorlib.dll
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in Microsoft.Bcl.AsyncInterfaces.dll
Exception thrown: 'Azure.Identity.AuthenticationFailedException' in mscorlib.dll

davecader avatar Jan 25 '23 12:01 davecader

This looks similar to https://github.com/dotnet/runtime/pull/49567 but that is only for .NET Core.

Would it be possible to create a sample project that reproduces this end to end? I suspect there is something about your specific project configuration or how you are configuring the credential that is key to reproducing this.

christothes avatar Jan 25 '23 20:01 christothes

Yes, I can put something together. I also suspected project settings, given that it did not seem to be a commonly observed problem.

davecader avatar Jan 26 '23 10:01 davecader

I have created this sample app that follows some of the MVVM patterns that we use in our larger application, including use of System.Reactive and ReactiveUI. You can clone the application using the following:

https://[email protected]/kelverion/AzureAutomationClient/_git/AzureAutomationClient

davecader avatar Jan 27 '23 12:01 davecader

I'm getting a similar exception in a net 4.8 project when using the KeyVault c# SDK. In my experiance it's only when a VS 2022 debugger is attached. I'm not seeing the error in production or when running locally without the debugger. At least so far.

bmacombe avatar Feb 02 '23 18:02 bmacombe

Just thinking out loud here, but given the bug found and fixed in dot net core, could this be a Visual Studio induced error if it's using core?

Edit: I just noticed that bug was fixed in 2021, so I guess it would have likely shown up before now if it was VS.

bmacombe avatar Feb 02 '23 18:02 bmacombe

As mentioned, I only observe the problem when I start our app in Visual Studio (2022 17.4.4). Interestingly, If I start our app normally and then start debugging in visual studio by attaching to the process I don't seem to observe the error.

davecader avatar Feb 03 '23 11:02 davecader

I also am running 17.4.4 and have only recently noticed this issue happening, I can't remember exactly when I first noticed the issue or when I updated to 17.4.4 so I can't 100% say it was only having 17.4.4, but likely.

bmacombe avatar Feb 03 '23 17:02 bmacombe

Related: https://stackoverflow.com/questions/75336287/azure-identity-authenticationfailedexception-response-was-not-set-make-sure-se

jsquire avatar Feb 04 '23 15:02 jsquire

https://github.com/Azure/azure-service-bus/issues/652

fp-jcorriveau avatar Feb 07 '23 16:02 fp-jcorriveau

I'm running into a similar issue with .NET Framework 4.7.2 but Jetbrains Rider not Visual Studio (The same situation @fp-jcorriveau is in, other colleagues can use it fine in VS). Even if I start the process separately and attach Rider's debugger it still throws the exception:

System.InvalidOperationException: Response was not set, make sure SendAsync was called
   at Azure.Core.HttpMessage.get_Response()
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.PropertySpec.PropertyFetch.TypedFetchProperty`2.Fetch(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.PropertySpec.Fetch(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.Morph(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform.Morph(Object args)
   at System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform.<>c__DisplayClass2_1.<.ctor>b__2(KeyValuePair`2 evnt)
   at System.Diagnostics.DiagnosticSourceEventSource.CallbackObserver`1.OnNext(T value)
   at System.Diagnostics.DiagnosticListener.Write(String name, Object value)
   at Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.Dispose()
   at Azure.Core.Pipeline.DiagnosticScope.Dispose()
   at Azure.Core.Pipeline.RequestActivityPolicy.<ProcessAsync>d__11.MoveNext()

BenWRare avatar Feb 08 '23 08:02 BenWRare

I'm running into a similar issue with .NET Framework 4.7.2 but Jetbrains Rider not Visual Studio (The same situation @fp-jcorriveau is in, other colleagues can use it fine in VS). Even if I start the process separately and attach Rider's debugger it still throws the exception:

System.InvalidOperationException: Response was not set, make sure SendAsync was called
   at Azure.Core.HttpMessage.get_Response()
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.PropertySpec.PropertyFetch.TypedFetchProperty`2.Fetch(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.PropertySpec.Fetch(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.Morph(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform.Morph(Object args)
   at System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform.<>c__DisplayClass2_1.<.ctor>b__2(KeyValuePair`2 evnt)
   at System.Diagnostics.DiagnosticSourceEventSource.CallbackObserver`1.OnNext(T value)
   at System.Diagnostics.DiagnosticListener.Write(String name, Object value)
   at Azure.Core.Pipeline.DiagnosticScope.ActivityAdapter.Dispose()
   at Azure.Core.Pipeline.DiagnosticScope.Dispose()
   at Azure.Core.Pipeline.RequestActivityPolicy.<ProcessAsync>d__11.MoveNext()

Same error, same scenario

javis86 avatar Feb 08 '23 11:02 javis86

We're also seeing this across multiple developers using Rider: image

Pretty sure this is happening because anything that reads properties for diagnostic purposes is going to end up triggering this exception when it does if it attempts to get diagnostics before the message is sent: image

After lots of research, we may have narrowed this down to some of the Azure plugins attaching a DiagnosticSource in Rider, but it does seem to happen even when those are off. I'm not surprised it's happening in Visual Studio too - it seems like this would be a general issue any time something has attached certain kinds of diagnostics, whatever host that may be. You can see the LoggingPolicy getting in the mix in the stack trace.

IMO having the HttpMessage throw like this in a getter seems like an anti-pattern. In general I think the guidance has always been to avoid throwing based on the state of the object inside a property whenever possible.

One possibly important data point is that we're running on .NET Core 3.1 right now. It looks like the DiagnosticSource may have been changed to suppress these kinds of exceptions in properties in .NET 6 from the commit linked above: https://github.com/dotnet/runtime/pull/49567. I'm not in a position to update our runtime right now for this app, but I wonder if doing so would resolve the issue (or at least hide it), and if anyone reporting this problem is on >= .NET 6.

daveaglick avatar Feb 08 '23 12:02 daveaglick

image I solved this disabling Azure Devops plugin

javis86 avatar Feb 08 '23 15:02 javis86

I solved this disabling Azure Devops plugin

I don't use the Azure DevOps plugin, so it isn't installed for me. 😟 image

Tried if for some reason, installing it and then disabling it could fix it, but still no luck

BenWRare avatar Feb 08 '23 16:02 BenWRare

For what it's worth, it looks like updating System.Diagnostics.DiagnosticSource to 6.0.0 may have resolved this for us. That version is compatible with both older .NET Framework and .NET Core projects and includes the change in dotnet/runtime I linked above to suppress exceptions thrown by inspected properties. It's early still, so I can't say it's gone for good, but I was getting this exception regularly over the last few days and haven't seen it since the package change.

Of course, that doesn't mean the Azure SDK HttpMessage isn't still throwing on inspection, just that the DiagnosticSource isn't bubbling it up. Even with this "fix" I still think there's something left to look at in the Azure SDK.

daveaglick avatar Feb 08 '23 16:02 daveaglick

For what it's worth, it looks like updating System.Diagnostics.DiagnosticSource to 6.0.0 may have resolved this for us. That version is compatible with both older .NET Framework and .NET Core projects and includes the change in dotnet/runtime I linked above to suppress exceptions thrown by inspected properties. It's early still, so I can't say it's gone for good, but I was getting this exception regularly over the last few days and haven't seen it since the package change.

Interesting, I'm going to try this. I'm also not using Azure DevOps plugin, but I have Azure Toolkit for Rider, I'll also try to disable it.

fp-jcorriveau avatar Feb 08 '23 16:02 fp-jcorriveau

Disabling Azure Toolkit for Rider does nothing.

But updating System.Diagnostics.DiagnosticSource to 6.0.0 fixed the issue for me!

fp-jcorriveau avatar Feb 08 '23 17:02 fp-jcorriveau

I'm actually experiencing a similar issue when I call the Exists() on a BlobClient. Unlike some of the others who mentioned they are using Rider, I'm using Visual Studio Professional 2019, version 16.11.22. Sometimes it'll work, more often than not I'll get the exception.

Here's my function:

public bool BlobExists(string blobName, string connectionString, string containerName)
{
    var container  = new BlobContainerClient(connectionString, containerName);
    var blobClient = container.GetBlobClient(blobName);

    return blobClient.Exists();
}

Here's the exception:

System.InvalidOperationException: Response was not set, make sure SendAsync was called
   at Azure.Core.HttpMessage.get_Response()
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.PropertySpec.PropertyFetch.RefTypedFetchProperty`2.Fetch(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.PropertySpec.Fetch(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.TransformSpec.Morph(Object obj)
   at System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform.Morph(Object args)
   at System.Diagnostics.DiagnosticSourceEventSource.FilterAndTransform.<>c__DisplayClass2_1.<.ctor>b__2(KeyValuePair`2 evnt)
   at System.Diagnostics.DiagnosticSourceEventSource.CallbackObserver`1.OnNext(T value)
   at System.Diagnostics.DiagnosticListener.Write(String name, Object value)
   at System.Diagnostics.DiagnosticSource.StartActivity(Activity activity, Object args)
   at Azure.Core.Pipeline.RequestActivityPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean isAsync)
   at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted(ValueTask task)
   at Azure.Core.Pipeline.RequestActivityPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.BufferResponsePolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.LoggingPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
   at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted(ValueTask task)
   at Azure.Core.Pipeline.LoggingPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
   at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
   at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted(ValueTask task)
   at Azure.Core.Pipeline.RetryPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipeline.Send(HttpMessage message, CancellationToken cancellationToken)
   at Azure.Storage.Blobs.BlobRestClient.Container.ListBlobsHierarchySegmentAsync(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri resourceUri, String version, String prefix, String delimiter, String marker, Nullable`1 maxresults, IEnumerable`1 include, Nullable`1 timeout, String requestId, Boolean async, String operationName, CancellationToken cancellationToken)
   at Azure.Storage.Blobs.BlobContainerClient.GetBlobsByHierarchyInternal(String marker, String delimiter, BlobTraits traits, BlobStates states, String prefix, Nullable`1 pageSizeHint, Boolean async, CancellationToken cancellationToken)
   at Azure.Storage.TaskExtensions.EnsureCompleted[T](Task`1 task)
   at Azure.Storage.Blobs.Models.GetBlobsByHierarchyAsyncCollection.GetNextPageAsync(String continuationToken, Nullable`1 pageSizeHint, Boolean isAsync, CancellationToken cancellationToken)
   at Azure.Storage.TaskExtensions.EnsureCompleted[T](ValueTask`1 task)
   at Azure.Storage.StorageCollectionEnumerator`1.StoragePageable.AsPages(String continuationToken, Nullable`1 pageHintSize)+MoveNext()
   at LessonDesignerApi.Services.BlobService.EnumerateBlobsHelper(String strBlobPathPrefix) in F:\Programming\Work\Tools\lessondesignerasssetmigrationtool - Copy\LessonDesignerAssetMigrationTool\BlobService.cs:line 228
   at LessonDesignerApi.Services.BlobService.EnumerateBlobs(String strBlobPathPrefix) in F:\Programming\Work\Tools\lessondesignerasssetmigrationtool - Copy\LessonDesignerAssetMigrationTool\BlobService.cs:line 218
   at LessonDesignerAssetMigrationTool.Program.UploadReferenceBlobsFromRoot(String rootReferenceSourceUrl, String rootTargetUrl, IBlobService referenceBlobService, IBlobService targetBlobService) in F:\Programming\Work\Tools\lessondesignerasssetmigrationtool - Copy\LessonDesignerAssetMigrationTool\Program.cs:line 561
   at LessonDesignerAssetMigrationTool.Program.UploadNonSeededAsset(BlobReference blobReference, IBlobService targetBlobService, IBlobService referenceBlobService) in F:\Programming\Work\Tools\lessondesignerasssetmigrationtool - Copy\LessonDesignerAssetMigrationTool\Program.cs:line 399
   at LessonDesignerAssetMigrationTool.Program.<>c__DisplayClass18_0.<<CreateDbInformationAndUpdateReference>b__0>d.MoveNext() in F:\Programming\Work\Tools\lessondesignerasssetmigrationtool - Copy\LessonDesignerAssetMigrationTool\Program.cs:line 521
--- End of stack trace from previous location where exception was thrown ---

PiousVenom avatar Feb 10 '23 16:02 PiousVenom

We're also having this problem with .NET Core 3.1 with 2 projects. We temporarily upgraded it to .NET 6 which seems to be solving it. (I know not the best solution)

marlocov avatar Feb 13 '23 10:02 marlocov