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

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.d__39.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Azure.Identity.InteractiveBrowserCredential.d__36.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Azure.Identity.InteractiveBrowserCredential.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.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

//cc: @christothes

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

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

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;
}

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.

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

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> ListAsync()
{
var result = new List();
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;

}

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

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

Logging as requested:
[Informational] Azure-Identity: False MSAL <IP_ADDRESS> 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 <IP_ADDRESS> 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 <IP_ADDRESS> 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 <IP_ADDRESS> 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.TypedFetchProperty2.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(KeyValuePair2 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.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.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.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 <IP_ADDRESS> 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 <IP_ADDRESS> 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.TypedFetchProperty2.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(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.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__111.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 <IP_ADDRESS> 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.TypedFetchProperty2.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(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.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__111.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.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.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.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.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.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.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.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.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.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

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.

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:
<EMAIL_ADDRESS>

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.

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?

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.

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.

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

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

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()

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

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

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:

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.
 In general I think the guidance has always been to avoid throwing based on the state of the object inside a property whenever possible.

I solve this disabling Azure Devops plugin

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.

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.

Disabling Azure Toolkit for Rider does nothing.
But updating System.Diagnostics.DiagnosticSource to 6.0.0 fixed the issue for me!

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 ---

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

I have experienced this problem after updating ReSharper for VisualStudio 2022 to version 2022.3. Fortunately, I've been able to work around it by downgrading ReSharper to version 2022.2.
https://www.jetbrains.com/resharper/download/other.html

I had a similar problem to @PiousVenom with blobClient.Exists().  After months of working, this suddenly started giving "Response was not set, make sure SendAsync' was called " errors, unpredictably, on blobs that definitely existed, but only when running in debug.
In our case, the problem was fixed by upgrading the code (written using .net Framework 4.72 for some reason rather than .NET 5 or later) to .net framework 4.8, Hope this helps in solving this very strange problem!

Also seeing this whilst debugging in Rider using .net core 3.1.  Live appears to be fine.  This is affecting 3 developers here intermittently.  It seems you can go a large time without seeing it and then a stretch where it always happens.  Again only noticed it over the last 2 or 3 weeks.

Updayting System.Diagnostics.DiagnosticSource to 6.0.0 seems to be the resolution here.  The fix is here https://github.com/dotnet/runtime/pull/49567

Updating to latest  System.Diagnostics.DiagnosticSource appears to have resolved my issue. Thanks for the help everyone.

/unresolve
Still seeing this error on .net 3.1. We tried updating to .net 6 and are still seeing it there.


Fixing Application Insights Sampling documentation. Setting should be…

… "samplingSettings".

@brettsam : Thanks for your contribution! The author, @ggailey777, has been notified to review your proposed change.

#sign-off

Fixes https://github.com/MicrosoftDocs/azure-docs/issues/18044


TextBlock text wrapping: Sometimes duplicates and leaves characters behind on wrap

Development Setup

Avalonia v0.9.999-cibuild0006280-beta (latest as of 2020-03-10 at 1:50 PM EDT)
.NET Core 3.1
Visual Studio 16.4.5
Windows 10
Repo: https://github.com/Deadpikle/AvaloniaBugs/tree/master/ItalicTextWrapping

Bug description
Sometimes, when wrapping, certain characters are left behind on text wrapping and show up in two places. This only seems to happen with the NotoSans-Italic font (in repro project below); with normal font or default Windows font w/Italic FontStyle, things wrap properly.
This is easiest shown by a picture:

Notice how "applies" gets broken up on text wrapping -- the "a" is left on the first line and appears again on the second line with the rest of the word.
I'm not sure if the --auth line breaking is working right either? I'd prefer that to show up on one line, since there's room, but that's debatable. Edit: As Gillibald mentioned, this is working properly, and the non-breaking hyphen (\u2011) works great in my app.
XAML:
<TextBlock Text="Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth."
             Margin="0,4,0,0"
             Width="238"
             FontFamily="avares://ItalicTextWrapping/Assets/NotoSans-Italic.ttf#Noto Sans"
             TextWrapping="Wrap"/>

Repo for easy reproducing: https://github.com/Deadpikle/AvaloniaBugs/tree/master/ItalicTextWrapping
Thanks!

applies should not be broken into characters in that scenario. For --auth you have to glue everything together. Breaking between -- should be valid.
Will investigate and fix shortly.

For reference https://www.fileformat.info/info/unicode/char/2011/index.htm

This issue is super weird. Somehow Skia renders an extra character with this particular font.

#4240 I think I finally fixed this. Still have to verify 😅

Sorry, this bug still exists in 0.9.999-cibuild0008974-beta. (No problem, but since you mentioned needing to verify still, I thought I would check on it.)

Too bad. So I need to investigate this further. Thanks for testing.

Closing because it seems to be fixed

8974 is out of date. I apologize for using the wrong build. I can confirm this is fixed. My bad! 😅


Landscape

Proposal
I want to use this in landscape mode but it seems to be locked to portrait mode. Im working on a work around but im not sure that that is possible yet.
Is there a reason for it not being supported?

Hi,
CamerAwesome locks orientation to portrait mode as the sensor orientation on phones.
There is another issue requesting to change the orientation on tablets.
Is that what you want to achieve?

I want to rotate the phone to landscape and make the interface in portrait. However after overwriting the orientation, the camera view also rotates and now is rotated wrong.

Yes, that's why we locked the rotation.
If you want to create a landscape view you will have to draw your custom view and use the AwesomeRotateWidget to rotate your widgets.
Basically, you have to make the same render as we made but instead of wrapping the elements within a Column you have to push them as a Row.

Right, that is what i did but its rather awkward. I cant seem to understand why the default camera package works but camerawesome behaves different.


Adding more metrics to PageSpeed beacon

Currently the PageSpeed beacon only supports the minimal version.    PageSpeed full and minimal beacons do not return the same data. At our company there is strong interest in the data returned by the full beacon. I therefore propose modifying the beacon to accept either version (or, if there is an objection to this, creating a separate full beacon)
PageSpeed full beacon rules not present in table 'pagespeed' are:
    DeferParsingJavaScript
    EnableKeepAlive
    InlineCSS
    InlineJS
    MakeLandingPageRedirectsCacheable

The table should be modified to store these rules.
Since the full beacon is POSTED as JSON whereas the minimal beacon's results are in the query string, it is simple to determine which one was received.

Note that these are the same fields referenced in issue 44, These two issues may be best worked on together.

Yeah, unfortunately, beacon documentation still does not have these fields:
http://code.google.com/p/page-speed/wiki/BeaconDocs
I added documentation here:
http://www.showslow.org/Metrics#Page_Speed
Couldn't find documentation for InlineCSS, InlineJS and EnableKeepAlive rules though.
Renamed this bug as full beacon is not a requirement anymore - still if you'd like to implement full beacon using POST, please go ahead.


[Event Hubs] Use offset, not sequence number when creating AMQP receiver link

We have heard from the service team that it is more efficient for them to find the position in the stream using offset than sequence number.
Currently, we use sequence number to create an EventPosition when attempting to re-connect broken receiver links
This issue is to update the above to use offsets instead.

Code Pointer: https://github.com/Azure/azure-sdk-for-js/blob/dd090dddfc7643b5401dbac8414ea8187d5bcb7c/sdk/eventhub/event-hubs/src/eventHubReceiver.ts#L519

On second thoughts, this might not be the ideal thing to do. AMQP receiver link is created in 2 cases

A brand new receiver is created, in which case the position is provided by the user or the default position gets used. So, no changes here.
There is a broken receiver that we are attempting to recover. This is when we use the sequence number of the last seen event. In this case, if we use the offset, then we repeat the last seen event.

Therefore, the use of sequenceNumber in https://github.com/Azure/azure-sdk-for-js/blob/dd090dddfc7643b5401dbac8414ea8187d5bcb7c/sdk/eventhub/event-hubs/src/eventHubReceiver.ts#L519 might be right, except that we might want to increment it.

cc @chradek and @richardpark-msft


Tests for generated application broken by migration to rc.1

There were several breaking changes, not the least of which was the change to the import signature for angular2 (@angular).  karma.config may need substantial changes.

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/34226884-tests-for-generated-application-broken-by-migration-to-rc-1?utm_campaign=plugin&utm_content=tracker%2F32095848&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F32095848&utm_medium=issues&utm_source=github).

fixed https://github.com/cmelion/generator-ng2-webpack/commit/7dabcc40bc517c45925af474877c9c9978d5c79a


QueryProxy returning ActiveNodes of wrong types

This issue is referenced by #1219, but is actually a separate issue.
class Place
  include Neo4j::ActiveNode
end

module DataSource
  class URL
    include Neo4j::ActiveNode
  end

  class Place < DataSource::URL
    // inherits from DataSource::URL, but NOT from ::Place
    // labels are :URL and :Place
  end
end

::Place.all # => returns instances of both ::Place and DataSource::Place

::Place.all does a MATCH on the label :Place, which will return nodes that map to the DataSource::Place model, as well as the ::Place model (and any true subclasses). However, ::Place.all, and any other class-based query, should filter out anything that is not an instance of ::Place.

This is a good point and it's something that I've run into myself.  I'm not 100% of a solution, but I would love a discussion on it.
It's tempting to say that searching for ::Place.all would return all nodes where there is just the Place label.  There are definitely times, though, when you'd want to have other labels on something and be able to access the model just by the one label (other applications may have other labels on a node or you might have a label for performance reasons)
The other solution is probably to take note that we have a DataSource::Place model and realize that we would need to exclude the URL label when searching with something like a WHERE NOT(var:URL).  I'm not sure of the performance implications here.  Part of the problem, though, is that if the DataSource::Place model hasn't been loaded, we're not aware that this other model where Place is a subset of it's labels.
There might be other solutions, like manually specifying somehow on the model that a particular model should not match if a certain label is there.  Obviously an automatic solution would be nicer if we could have it.

Been thinking about this a lot (while stuck in the hellish nightmare of trying to get the right configurations setup for a React/Relay Node.js app to talk to a Relay/GraphQL/ActiveNode Rails 5 server).
The problem is marginalized if you're only using ActiveNode/Rel and you're not demodularizing the class/label names, but that's not always a realistic scenario. In my case, the DB may wind up being manipulated by systems other than the Rails app. And I don't want to be polluting the label names with Ruby module namespaces, so not demodularizing is not an option.
So far, I've been able to break down the problem into two pieces:

Figuring out which Ruby class to instantiate when a node is loaded
Figuring out what combination of labels & properties to query for

I think the first can be resolved by storing a property on the node, like rubyClassname. ActiveRecord does something similar with the type column when doing polymorphic classes using STI. This can just be the constantized classname. (And there should be an overridable variable for the property name, in case rubyClassname isn't available, for some reason).
The second problem is a little trickier. I think the Ruby class can store an array of label names to use as the base for the MATCH, which, along with the rubyClassname property, should prevent you from loading nodes that don't match what you're looking for. However, you need to make sure that subclasses are included. I believe ActiveModel/ActiveSupport's autoload support has a system by which subclasses register themselves with the base class. (ActiveNode is using it - I can call ::Place.subclasses to get its direct children, and can recurse on that until I get an empty array). However, I am having problems with ActiveNode autoloading right now (I currently have an initializer that preloads all my ActiveNode models). I have that problem on my list of ones to look into.
All of this seems like a bit of work, but I can't see how it is possible to support a Neo4j schema that is more dynamic than the ActiveNode defaults otherwise. I am probably going to start a branch to work on this this weekend (after I can pull my head out of this god-awful world of JavaScript). Of course, any and all suggestions is welcome, as I'm pretty new to Neo4j and ActiveNode/Rel (though I've been using Ruby/Rails for the last 10 years). :-)

BTW - according to the guys at GraphAware, doing a WHERE NOT on a label is not very efficient:
http://graphaware.com/neo4j/2015/01/16/neo4j-graph-model-design-labels-versus-indexed-properties.html

Actually, rereading that blog post from GraphAware has made me think that a unique, dedicated label for each Ruby (ActiveNode) class might be the way to go. A rubyClass property is going become very inefficient when matching to other nodes, as Neo4j doesn't seem to utilize the property index (unless this has changed in 3.x). However, assigning a dedicated label will mean we can always search using a label index.
Also, according to that post, searching with multiple labels (as ActiveNode does now) is also inefficient. Here's what I'm thinking might work:
class Place
  include Neo4j::ActiveNode
  // receives a label like ActiveNode::Place
end

module DataSource
  class URL
    include Neo4j::ActiveNode
    // receives a label like ActiveNode::DataSource::URL
  end

  class Place < DataSource::URL
    // has two labels: ActiveNode::DataSource::URL, and ActiveNode::DataSource::Place
  end
end

These labels will be completely independent of any other labels you might want to assign to the nodes, and will always be namespaced and unique (at least to ActiveNode). This way, you can use labels that describe the type of node appropriate to your schema, but they will never get confused by ActiveNode when instantiating them as Ruby classes. You will always get the correct Ruby class. It also handles the problem of searching for subclasses, as every subclass will have the label for its Ruby class, and all its ActiveNode ancestors. Using a simple regex on the labels will allow us to find all ActiveNode labels and load the relevant class(es), if they're not already loaded.
As far as I can tell, other than the indexes that are generated, there is no disadvantage to having a few extra labels that are used exclusively by ActiveNode and are independent of your schema labels. I think larger indexes (and the slightly higher costs of writes because of them) is a perfectly acceptable tradeoff for the advantages of ActiveNode. And they're certainly more efficient than loading potentially millions of nodes that you'll have to filter in memory on the Ruby side to determine if they are matches for the Ruby class you're querying for.

We actually had a property similar to rubyClass previously because before Neo4j 2.1.5, labels for the nodes weren't returned as part of the HTTP endpoint, so we had to store it explicitly.  We got rid of that as soon as we could (partially because of performance, but also because it seemed hacky).
In extra label could work, but I would prefer to explore solutions which "just work" if at all possible.  I think it would be worth re-running the analysis queries from the blog post to see if they still hold up in 3.0.
A separate thought: maybe by default (or by option) we should namespace models not as a full model name, but by their module ancestry.  So if you have a DataSource::URL model, you would have both DataSource and URL labels.

The problem I see is this:
# Finds an appropriate matching model given a set of labels
# which are assigned to a node
def self.model_for_labels(labels)
  return MODELS_FOR_LABELS_CACHE[labels] if MODELS_FOR_LABELS_CACHE[labels]

  models = WRAPPED_CLASSES.select do |model|
    (model.mapped_label_names - labels).empty?
  end

  MODELS_FOR_LABELS_CACHE[labels] = models.max_by do |model|
    (model.mapped_label_names & labels).size
  end
end

This method can find multiple models for the same set of labels with an equal score. When it does, it randomly returns one (random being the order in which the models were loaded). Unless you can enforce constraints on the schema to prevent this from happening, you can't guarantee that the class you instantiate is going to be the correct one.
You could do some sort of manual mapping to tell Neo4j to always match a certain set of labels to a specific class, but this breaks the "magic" we're trying to get from ActiveNode in the first place. Also, it doesn't fix the problem of efficiently searching for nodes.
As I understand the way Neo4j handles indexing, property indexes are created only for a single label/property pair. There is no concept of a composite index, as there is in SQL. This makes sense, since SQL columns are fixed in the schema, but you can add any number of arbitrary labels and/or properties to a Neo4j node. So if you try to do a WHERE for an ActiveNode that uses several labels, your query is going to get highly inefficient, having to search across multiple indexes - one for every label/property combination. The more properties you're trying to MATCH, the more inefficient it becomes. And then you are still going to have to filter every returned node in memory to see if it matches the correct label combination for the class you're searching for. Batch searches become nearly impossible because without loading every single node that matches your label/property pair into memory first, you won't know the actual count.
Utilizing a unique label for each ActiveNode class completely eliminates both of these problems. When you are searching, you only have one index to search per property in your WHERE clause (though loading subclasses will still require an OR clause). The nodes you get back are guaranteed to be of the type you're searching for, and any ActiveNode loaded is guaranteed to map back to the correct class. COUNTs are accurate making batch searches possible.
On top of that, you can use the other labels for clever things like mapping methods from a Ruby module to the resulting class if it has a specific label. This will give us true multiple inheritance and allow us to really benefit from the power of Neo4j's flexible schema.

I believe that the query planner tries to be somewhat smart about which indexes it will use in WHERE clauses.  I think that it will use indexes for some WHERE clauses and then filter the results for others.
Part of the problem of having special behavior for the gem, be it a label or a property, is that the gem should be able to support databases which were created separately or are also being accessed by another application.
But aren't you suggesting something that the gem already does by default?  I think you said that you turned on the demodularization which would give you DataSource::URL as your label.  I don't think that the ActiveNode:: adds anything and it would make it harder to have polyglot environments.
I might be misunderstanding what you are proposing, though

Well, I believe that for me, the problem lies in how labels are used by ActiveNode vs. how I want to use them for managing data. In the current documentation (under the slightly confusing second "Labels" heading), it reads:
If you would like to use multiple labels you can use class inheritance. In the following case
object created with the Article model would have both Post and Article labels. When querying
Article both labels are required on the nodes as well.

This lead me to believe that in order to model my data with multiple labels, I had to do it by using multiple inheritance. However, this does not work well with my schema. Neo4j allows for, and even encourages, more flexible schemas. Consider a Place node that is also both a Bar and Restaurant. While it is very easy to model this in Neo4j by applying tags for all three to a node, doing so through ActiveNode (using the guidelines in the docs) would require a class inheritance that breaks my intended schema. What I really want is something like:
module Bar
  def self.find
    # MATCH using label :Bar
  end

  # some bar-specific properties and associations
end

module Restaurant
  def self.find
    # MATCH using label :Restaurant
  end

  # some restaurant-specific properties and associations
end

class Place
  # if :Bar label exists
  self.extend Bar

  # if :Restaurant label exists
  self.extend Restaurant
end

Turns out, I can do this with ActiveNode (and using ActiveSupport::Concerns), but it requires a bit of finagling. I need to completely ignore ActiveNode's default use of labels to determine which class type to map Nodes to and use my own label setters to apply my label structure.
As for adding the ActiveNode:: namespacing to the label - this is to prevent confusion when querying at the DB outside of ActiveNode, as well as optimize ActiveNode queries. For example, I might also have some nodes that use the Place label, but that don't represent instances of the ActiveNode Place class. This is used in a different part of the schema and shouldn't interfere. However, if I call Place.count in Ruby, it will include those nodes in the count. Namespacing the label will prevent that.
One could argue that you should pick a label other than Place to represent the different types of nodes, but that is enforcing a structure on the DB that shouldn't be necessary. Based on the GraphAware post above, labels should really only be used in a query to find a single node, and then you traverse the graph using relationships. Using labels on multiple ends of a CYPHER query, or using multiple labels and/or properties for finding a single node, is not very efficient. However, I feel that ActiveNode sort of encourages these kinds of queries based on the way it is structured. And I think that comes from a history of modeling itself after ActiveRecord, which itself was modeled around the strengths (and limitations) of SQL databases.
That said, I don't think there's anything wrong with ActiveNode's approach - it does help a new Neo4j user with a ActiveRecord/SQL background model their data in a way that they're familiar with. But I do think that there might be some ways of encouraging better modeling through ActiveNode. I'm just not sure how to do it quite yet (though I am working on it with some of my own overrides of ActiveNode's implementation).
As for this original problem I reported, I'm still not sure what the best solution it. Filtering the nodes on the Ruby side is probably the easiest, short term. But it's not optimal to be loading data that doesn't match the requested object type.

Thanks for the feedback, and sorry for not responding sooner.  I've been busy with the refactoring for the latest 8.0 release (alphas and an upgrade guide now available, though it's still a bit rough which is why it's an alpha)
I've definitely thought about the case of being able to do the mix-in type behavior that you would expect from modules but tying it to labels.  I even created an issue for it a long time ago:
https://github.com/neo4jrb/neo4j/issues/543
But there hasn't been enough of a call for it to make it a thing.
Also, reading your comments I thought that it might make sense to have some sort of hook that could be defined in models which could override the built-in model/label mapping behavior.  That might be overkill, though.
I'm open to the idea of not always specifying labels, though labels definitely make the queries much easier to read when you're debugging.  Perhaps that could be fixed with different default node variables, though we'd need to make sure they were unique across chains.
I think that the automatic prefixing of ActiveNode is probably a non-starter, though, because I definitely want people to be able to type their own Cypher queries in the Neo4j web console without needing to remember to prefix the labels all the time (plus you need to use backticks)

No problem - I took a 3 week detour into Docker and AWS myself.
But I am back on this and have discovered a few things.
I am 100% committed to building an implementation that does not rely on a one-to-one mapping of labels-to-classes, but rather uses labels as an indication of functionality (via modules). That's how I've modeled my data in Neo4j, and I need to make my Ruby code match up.
I've thought that perhaps what I'm looking to build is an alternative to ActiveNode. It seems to me that ActiveNode takes much of its inspiration from ActiveRecord, and in doing so, inherits many of its limitations as well. Neo4j (and graph databases in general) allow for far more flexible modeling of data than SQL, and it seems like Ruby should be a perfect match in flexibility. However, as I look at what I'd like to change about ActiveNode to allow for that, I realize that 80% of the functionality is shared, and creating an entirely new library seems like a waste. So either I need to figure out how to integrate the flexibility that I'm looking for into ActiveNode without losing the ActiveRecord-like inspiration that makes it easy to adopt for seasoned Rails developer, or I need to factor out the shared code between ActiveNode and my implementation such that it can service both in a maintainable fashion.
Anyway - this topic is veering off the issue of how to properly map a collection of Neo4j labels to the proper ActiveNode model. I'd love to chat with you about my ideas and how they relate to ActiveNode in its current and/or future forms, so perhaps we can take it offline sometime.

As for the use of an ActiveNode namespaced label - the purpose of that is to ensure a single mapping between a node and the correct Ruby class. My thinking was that using a single label would be more efficient when performing queries. However, in my implementation, it has become superfluous, and I suspect it would wind up that way most of the time in a non-inherited class structure. I think we need to do some Neo4j performance testing to find out how searching for nodes via multiple labels compares to a single label with a property (like _ruby_class) in a number of different scenarios. I suspect that one method may be more performant in one use case, but significantly less so in another.


Parse error on new install

Using Sage latest version (c3d7d0afec951cd1c3e8c23a1bafbc63714ca590)
Using WP 4.2.1
Locally using PHP 5.4.30
Parse error: syntax error, unexpected '[' in /nas/wp/www/staging/ipgweb/wp-content/themes/ipg-sage/functions.php on line 12
Line 12: $sage_includes = [

you're definitely not on php 5.4.

My bad, you're correct. I was looking at my WPEngine staging environment which is 5.3.2 :(

@wnrosenberg - get them to up it to 5.5, a simple support request and I've found they'll get it done in less than 24 hours, sometimes a lot quicker.


✨ Implement the algorithm for x86_128

@wenceslas-sanchez you can create a new file and module in src/x86.rs containing the implementation and unit tests, based on what src/x64.rs looks like.
Thanks a lot for your help!


Fix not disposed handler.

Contributes to https://github.com/flutter/flutter/issues/145599

Yes, the fix got lost. Added it. Thanks.


Use %COMSPEC% as the shell in Process.new(shell: true)

Resolves #9030. Also effectively confirms in the specs that passing args with shell: true is not allowed.
Also effectively closes #12873, as Process.run("filedoesnotexist", shell: true) will now return Process::Status[1] instead of raising. (The exit codes are still different across platforms but I doubt anything further could be done about that.)
Unsetting %COMSPEC% is now a hard error, although under normal circumstances nobody should attempt to do that on Windows. It is needed because we do not look up cmd.exe in %PATH%, but the system drive's letter name is not fixed, i.e. we cannot simply assume C:\...\cmd.exe is correct.

Right now the command is not escaped at all. It seems this would suffice except for newlines? Should we do it?

So I suppose to move this further, we should adapt Process.quote_windows to use ^ as escape character?
Then we can merge this and hopefully escaping should work correctly? We'll probably need some specs for that.

If I understand correctly, you want `command #{Process.quote("args")}` to behave identically to Process.run("command", ["args"]) even when args contains any shell metacharacters. Surely applying the ^ escape sequence inside .spawn would work, but then it makes things like `echo %CD%` unusable, as the % cannot be passed to cmd.exe unescaped. (Process.quote_windows doesn't make sense here as echo doesn't use CommandLineToArgvW.)
Applying ^ to .quote_windows universally would break use cases where the arguments aren't eventually passed to .spawn as a single concatenated String. I am not 100% sure those use cases don't exist.
IMHO if security is a concern, one simply should not use the backtick in the first place. It has never occurred to me that the standard library should guarantee `command #{Process.quote("args")}` works; just because it is doable in a POSIX shell doesn't mean we could say the same for CMD or any other shell we wish to support. There is not even a guarantee that this call can be equivalently represented by a single Process.run. Moving away from the backtick would necessitate a safe replacement in the macro language (#11456).

I'm not quite sure I can grasp the dilemma here.

It has never occurred to me that the standard library should guarantee `command #{Process.quote("args")}` works; just because it is doable in a POSIX shell doesn't mean we could say the same for CMD or any other shell we wish to support.

It would seem that Process.quote makes exactly that promise though:

This is then safe to pass as part of the command when using shell: true or system().

Whether that promise was correct in the first place might be a different question but I suppose we should try to follow it.

Applying ^ to .quote_windows universally would break use cases where the arguments aren't eventually passed to .spawn as a single concatenated String. I am not 100% sure those use cases don't exist.

Could you elaborate on why such use cases would break?

There is indeed one breakage. When the compiler prepares the linker arguments for MSVC, if they are too long they are written to "#{output_dir}/linker_args.txt". Since it is MSVC that reads them, not cmd.exe, the ^ escape sequences must not be written to this temporary file. However, the existing .quote_windows must still be applied for proper tokenization.


Needs a requirements.txt file

To have this repository handled automatically by devtools it needs a current requirements.txt file

Hi,
I recently removed the requirements.txt file in favour of putting everything in pyproject.toml. A PEP 621-compliant toolchain should be able to extract the information it needs from there.

Oh, good to know i dont have a PEP-621 compliant toolchain, but until all
my toolchain comply ( pycharm latest ) , would be awesome if you re add the
file to git main, i can commit to maintain that file until my tool chain
evolves for the good.. deal?
Saludos,
Ignacio J.Ortega
skype:ignacioj.ortega
El jue, 4 may 2023 a las 12:13, Matthias Valvekens (<
@.***>) escribió:

Hi,
I recently removed the requirements.txt file in favour of putting
everything in pyproject.toml. A PEP 621-compliant toolchain should be able
to extract the information it needs from there.
—
Reply to this email directly, view it on GitHub
https://github.com/MatthiasValvekens/pyHanko/issues/258#issuecomment-1534474879,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAXHYV5RQPTPM6L7DO4S3EDXEN6ODANCNFSM6AAAAAAXVQJ4RM
.
You are receiving this because you authored the thread.Message ID:
@.***>

I do my development in Pycharm as well, FWIW :)
You can always install the dependencies you need into your venv with pip -e .[testing].


wms examples page not work

Steps to reproduce
Steps to reproduce the behavior:

open examples page https://leafletjs.com/examples/wms/wms.html

Expected behavior
demos display wms layers on the map
Current behavior
demos does not display wms layers on the map
Environment

Leaflet version: 1.5
Browser (with version): chrome 78, firefox 70
OS/Platform (with version): manjaro

Additional context
seems that used wms services are down
Minimal example reproducing the issue
https://leafletjs.com/examples/wms/wms.html

If you can provide the address of a publicly-available WMS server, then we can update the tutorial to use that one.

@IvanSanchez sorry i dont know any available wms server
i am created issue just for note for note that example page not work


Convert to pure CMake package

Adapt CMakeLists.txt so we can accomodate building the library without Catkin / in a non-ROS (build) environment.

Edit: as there is no ROS-specific functionality in this package, we should migrate it to be a pure CMake package.
The manifest can remain, and this would allow us to still build it in a ROS workspace (by setting build_type to cmake).

Edit: as there is no ROS-specific functionality in this package, we should migrate it to be a pure CMake package. All catkin_* calls should be removed.
The manifest can remain, and this would allow us to still build it in a ROS workspace (by setting build_type to cmake).
(this would also immediately make non-ROS builds possible, without needing two build scripts or undesirable detection/if-else constructs)

That is great. Just to understand, the same applies to abb_libegm? If that is the case, what changed w.r.t. to the requirement of being able to build the package with catkin_make mentioned in https://github.com/ros-industrial/abb_libegm/issues/3#issuecomment-409187490 ?

Just to understand, the same applies to abb_libegm?

Yes.

If that is the case, what changed w.r.t. to the requirement of being able to build the package with catkin_make mentioned in ros-industrial/abb_libegm#3 (comment) ?

ROS 2 and the existence of Colcon.
Additionally, catkin_tools may be used with ROS 1.

I have created a new branch for converting the package into a plain cmake package.
I.e. similar rationale as in this comment https://github.com/ros-industrial/abb_libegm/issues/3#issuecomment-552378566.

Looks like #69 was merged, so closing.
Thanks @traversaro  and @jontje :+1:


1.4.7 proxy crashed by 1.5.x config from Pilot during upgrade due to RBAC

Bug description
During an upgrade from Istio 1.4.7 to 1.5.1, proxies still running 1.4.7 and with AuthorizationPolicy applied to them appeared to crash soon after control plane upgrade. The below AuthorizationPolicy appears to work fine on 1.4.7 (we have many similar policies running on production workloads).
[Envoy (Epoch 0)] [2020-04-19 16:18:18.379][14][warning][config] [external/envoy/source/common/protobuf/message_validator_impl.cc:28] Unknown field: type envoy.config.rbac.v2.Permission with unknown field set {10}
[Envoy (Epoch 0)] [2020-04-19 16:18:18.379][14][critical][assert] [external/envoy/source/extensions/filters/common/rbac/matchers.cc:32] panic: not reached
[Envoy (Epoch 0)] [2020-04-19 16:18:18.379][14][critical][backtrace] [bazel-out/k8-opt/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:83] Caught Aborted, suspect faulting address 0x5390000000e
[Envoy (Epoch 0)] [2020-04-19 16:18:18.379][14][critical][backtrace] [bazel-out/k8-opt/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:70] Backtrace (use tools/stack_decode.py to get line numbers):
[Envoy (Epoch 0)] [2020-04-19 16:18:18.379][14][critical][backtrace] [bazel-out/k8-opt/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:71] Envoy version: aa9f6a9eadad401d8630be220af2ee8a033a2fdb/1.12.0/Clean/RELEASE/BoringSSL
[Envoy (Epoch 0)] [2020-04-19 16:18:18.380][14][critical][backtrace] [bazel-out/k8-opt/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:75] #0: __restore_rt [0x7f3a9cd41890]
[Envoy (Epoch 0)] [2020-04-19 16:18:18.386][14][critical][backtrace] [bazel-out/k8-opt/bin/external/envoy/source/server/_virtual_includes/backtrace_lib/server/backtrace.h:75] #1: Envoy::Extensions::Filters::Common::RBAC::OrMatcher::OrMatcher() [0x55bcfdf2fc9e]

Full crashlog on an auto-restarting proxy is here
One possible notable fact is that the istio-ingressgateway is not actually installed in this cluster; so the first rule refers to a ServiceAccount that doesn't exist.
Relevant RBAC
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
  creationTimestamp: "2020-01-23T02:14:24Z"
  generation: 2
  name: my-application
  namespace: services
  resourceVersion: "3155823"
  selfLink: /apis/security.istio.io/v1beta1/namespaces/services/authorizationpolicies/my-application
  uid: 133abf0f-3d86-11ea-914f-022e6c8f37c8
spec:
  rules:
  - from:
    - source:
        principals:
        - cluster.local/ns/istio-system/sa/istio-ingressgateway-service-account
    to:
    - operation:
        methods:
        - GET
        - OPTIONS
        paths:
        - '*'
  - to:
    - operation:
        ports:
        - "15090"
  selector:
    matchLabels:
      app.kubernetes.io/name: my-application
---
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
  name: deny-all
  namespace: services
spec: {}

Expected behavior
Proxies running on 1.4.7 can connect to 1.5.1 pilot and keep working until they are rolled; certainly not crashing.....
Would also appreciate a workaround if there is something in our AuthorizationPolicy that is not well understood between the two versions that we can simplify to move forward with this upgrade.
Steps to reproduce the bug
Haven't tried for a minimal reprod at the moment; but this upgrade was done in a smaller/simpler representative environment.
Version (include the output of istioctl version --remote and kubectl version and helm version if you used Helm)
istioctl
citadel version: 1.5.1
galley version: 1.5.1
pilot version: 1.5.1
policy version: 1.5.1
sidecar-injector version: 1.5.1
sidecar-injector version: 1.5.1
telemetry version: 1.5.1
data plane version: 1.4.7 (1 proxies), 1.5.1 (1 proxies)

kubectl
Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.9-eks-502bfb", GitCommit:"502bfb383169b124d87848f89e17a04b9fc1f6f0", GitTreeState:"clean", BuildDate:"2020-02-07T01:31:02Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}

helm
Client: &version.Version{SemVer:"v2.16.6", GitCommit:"dd2e5695da88625b190e6b22e9542550ab503a47", GitTreeState:"clean"}
How was Istio installed?
Via Helm; upgraded by helm upgrade (with some scripting to workaround the ValidatingWebhookConfiguration changes.
Environment where bug was observed (cloud vendor, OS, etc)
AWS EKS

@yangminzhu ^^^

According to this line [Envoy (Epoch 0)] [2020-04-19 16:18:18.379][14][warning][config] [external/envoy/source/common/protobuf/message_validator_impl.cc:28] Unknown field: type envoy.config.rbac.v2.Permission with unknown field set {10}, I think it's actually due to a new field (url_path) we introduced in Envoy in 1.5 that doesn't exist in 1.4.
The url_path is an improvement to handle HTTP paths that strip the query and fragment string before matching, this make sure we don't mismatch on invalid paths with query and fragments.
@chadlwilson Do you still see issues if you delete the current pods so that they start with the 1.5 Envoy sidecars?

This should only happen if you are using paths in AuthorizationPolicy. To workaround this, you could temporarily change to use the request.headers[:path] and change it back after all your Envoys are updated to 1.5:
when:
- key: request.headers[:path]
  values: ["/path1", "/path2"]

I also noted that your policy has paths: ["*"] which is not really enforcing anything, you can just remove this part.

I sent out a PR to only use the url_path field in Envoy versions >= 1.5, it should be in 1.6 but it probably not worth another 1.5.2 just for this issue, please let me know if you have other thoughts, thanks.

@yangminzhu

According to this line [Envoy (Epoch 0)] [2020-04-19 16:18:18.379][14][warning][config] [external/envoy/source/common/protobuf/message_validator_impl.cc:28] Unknown field: type envoy.config.rbac.v2.Permission with unknown field set {10}, I think it's actually due to a new field (url_path) we introduced in Envoy in 1.5 that doesn't exist in 1.4.

Thanks that explains it.

The url_path is an improvement to handle HTTP paths that strip the query and fragment string before matching, this make sure we don't mismatch on invalid paths with query and fragments.

Ahh, that's a great improvement. The inclusion of the query fragment was a cause of much confusion (and potentially security problems if doing suffix matching or /root/*/leaf matching on the path) so this is a good step.

@chadlwilson Do you still see issues if you delete the current pods so that they start with the 1.5 Envoy sidecars?

The 1.5 sidecars did appear to start, however I have not done any active testing to make sure they are all working correctly; traffic getting through/blocked as expected. This was a sanity test upgrade and got blocked on this so didn't go deeper.

This should only happen if you are using paths in AuthorizationPolicy. To workaround this, you could temporarily change to use the request.headers[:path] and change it back after all your Envoys are updated to 1.5:
when:
- key: request.headers[:path]
  values: ["/path1", "/path2"]

Thanks for the suggested workaround; will give this a go. Does this approach work with wildcard matches as well as exact values?

I also noted that your policy has paths: ["*"] which is not really enforcing anything, you can just remove this part.

Noted, we have generally chosen to keep them there so it's explicit to devs that they are allowing traffic on all paths, to trigger a bit of "are you sure that's what you want to do?".

I sent out a PR to only use the url_path field in Envoy versions >= 1.5, it should be in 1.6 but it probably not worth another 1.5.2 just for this issue, please let me know if you have other thoughts, thanks.

I was inferring there was going to be a 1.5.2 for other reasons based on outstanding issues tagged to the 1.5 milestone, so if so I think it would be good for the community to backport this fix as part of that next release.
To my knowledge, and based on current docs, technically skip-upgrades are still not supported by Istio without dropping traffic, so I am a bit nervous about planning for 1.4 -> 1.6. There are also quite a few changes in 1.5 that I would prefer to be able to incrementally move towards (and clean-up after, e.g removal of nodeagent, deprecation of MeshPolicy, auto-mtls, controlPlaneSecurity, mixer CRD removals, preparing for telemetry V2 etc). Having said this, I have noted the discussion in #22874 that seems to be suggesting a 1.4 -> 1.6 kind of upgrade path.

Thanks for the suggested workaround; will give this a go. Does this approach work with wildcard matches as well as exact values?

Yes, it works for both wildcard matches and exact values, but please note that request.headers[:path] uses the raw path in Envoy that doesn't strip the query string. So please remember to change back to use the normal paths field once your Envoy sidecar is updated to 1.5, sorry for the inconvenience.

I was inferring there was going to be a 1.5.2 for other reasons based on outstanding issues tagged to the 1.5 milestone, so if so I think it would be good for the community to backport this fix as part of that next release.

I confirmed with @fpesce that we will have a 1.5.2 but unfortunately it is a bit too late to cherry-pick this to 1.5.2. I will still cherry-pick to 1.5 branch in case we will later have 1.5.3 release.

Thanks for the suggested workaround; will give this a go. Does this approach work with wildcard matches as well as exact values?

Yes, it works for both wildcard matches and exact values, but please note that request.headers[:path] uses the raw path in Envoy that doesn't strip the query string. So please remember to change back to use the normal paths field once your Envoy sidecar is updated to 1.5, sorry for the inconvenience.

Thanks. After looking at this, it seems a bit painful and risky to me to refactor this across all our rules and services. We have many hybrid rules, like the below which seem difficult to express in the same way when using conditions without repeating the entire rule since we need the methods to be whitelisted as well.
    - from:
      - source:
          principals:
            - principal-a
            - principal-b
            - principal-c
      to:
        - operation:
            methods: ["GET", "OPTIONS", "POST"]
            paths: ["/route1", "/route2", "/route3"]
        - operation:
            methods: ["GET"]
            paths: ["/route4*"]
        - operation:
            methods: ["POST", "OPTIONS"]
            paths: ["/route5"]

It feels like a not-so-good idea to me to make such changes over something as important as RBAC that I'm going to have to revert later.

I confirmed with @fpesce that we will have a 1.5.2 but unfortunately it is a bit too late to cherry-pick this to 1.5.2. I will still cherry-pick to 1.5 branch in case we will later have 1.5.3 release.

I see 1.5.2 has been released. I think I shall really hope for a 1.5.3 in short order :-/

1.5.3 has been released - i believe this fix is in that, although not in release notes at https://istio.io/news/releases/1.5.x/announcing-1.5.3/
Haven't yet tested but will close this @yangminzhu - let me know if that's not appropriate.

Confirmed that the issue seems to be gone now in 1.5.3/1.5.4 on my limited/small test cluster. Will proceed to more exhaustive testing with active traffic. Thanks!


Adding slides at specific position

Adding slides at specific position would be a great addition to the library. Without it someone still has to go through the presentation and reorder slides. Of course, this needs to be done only if the order is important. In my use case it is.
Ideal final result of the merge
staticSlide1 ("root.pptx")
staticSlide2 ("root.pptx")
staticSlide3 ("root.pptx")
dynamicSlide1 (pptx-automizer)
dynamicSlide2 (pptx-automizer)
dynamicSlide3 (pptx-automizer)
staticSlide4 ("root.pptx")
staticSlide5 ("root.pptx")
staticSlide6 ("root.pptx")

Great idea! There might even exist a shortcut to achieve this: Take a look at truncate() in src/classes/template.ts. We already have a list of existingSlides which waits to be reordered.
But, to implement this a generic way, we should first be able to apply some kind of presentation-modifier. Reorder slides could be one of those as well as modifying e.g. color schema.

In the meantime, you might be interested in removeExistingSlidesproperty:
ts const automizer = new Automizer({   // ...   // truncate root presentation and start with zero slides   removeExistingSlides: true, })

Thanks for the suggestion.
If I understand it correctly, first I need to add all dynamic slides using ppt.addSlide and then write those changes to XML by calling ppt.rootTemplate.appendSlide(slide).
Now the full XML structure of static and dynamic slides is available and children of p:sldIdLst need to be reordered.
Does this make sense or there is an easier way? I got it to work, but am facing a weird issue where some children of p:sldIdLst have parentNode: null.
async function main() {
  const ppt = automizer.loadRoot('test.pptx').load('dtest.pptx', 'dtest');
  ppt.addSlide('dtest', 1);

  // writes slides to XML and empties slides array because it's already been added to XML
  for (const slide of ppt.rootTemplate.slides) {
    await ppt.rootTemplate.appendSlide(slide);
  }
  ppt.rootTemplate.slides = [];

  // all XML nodes are available now
  const xml = await ppt.rootTemplate.getSlideIdList();
  const existingSlides = xml.getElementsByTagName('p:sldId');

  // reordering logic here

  // save the reordering
  await XmlHelper.writeXmlToArchive(
    await ppt.rootTemplate.archive,
    `ppt/presentation.xml`,
    xml
  );

  const summary = await ppt.write('reorder.pptx');
  return JSON.stringify(summary);
}
main();

Literally seconds after writing the previous message I understood the benefit of removeExistingSlides 🤦

put static and dynamic slides into one .pptx file
set removeExistingSlides to true
load this file in both loadRoot and root
add slides in whatever order you need

const ppt = automizer.loadRoot('test.pptx').load('test.pptx', 'test');

ppt.addSlide('test', 2);
ppt.addSlide('test', 4);
ppt.addSlide('test', 3);
ppt.addSlide('test', 1);

Hi! Exactly, this is the workaround I was suggesting. You can load a root presentation, truncate it and reorder the root presentation slides by appending them in a different order.
But, the better way would be some reusable function inside "// reordering logic here" mentioned above. I was thinking about something like sliceCollection from xml-helper.ts, but extendet to sortCollection.

I've added an example to readme.
But this still needs a better solution.

I have attached a new branch to this issue: feature-modify-presentation.
Please check out the branch and run yarn dev to test it against the demo files.
Thanks a lot so far for the inspiration!

Your suggested code was very close to the final solution. I did not expect to have a lot of logic inside the main() block from your example, as this was designed only to provide a pattern for the output presentation and leave all execution to write().
You will find a new array of callbacks this.modifyPresentation which is applied right after all append-slides-promises are resolved.
If you can confirm this to work properly, I am going to merge it into main branch.

Tried a couple of combinations. It works great if all slide numbers are used in order.
.sortSlides should throw an error if order.length !== slides.length. In some cases it works unexpectedly, in others PPT gets corrupted if order.length < slides.length.
ppt.loadRoot('root.pptx').load('dynamic.pptx', 'dynamic');

ppt.addSlide('dynamic', 1);
ppt.addSlide('dynamic', 2); // total 6 slides in the root now

ppt.modify(ModifyPresentationHelper.sortSlides([4, 5, 1, 2, 6])); // notice 3 is missing. this line corrupts the file

Thanks for pointing out. I've added a function to finally normalize the presentation, which is now limited to enumerate slide ids (starting by 256). PPT will be corrupted if slide collection is not well enumerated.
Thanks a lot for your participation! :1st_place_medal:


[RFC] design doc: proposal for off-cpu profiling

This proposal builds on and follows the approach described in https://github.com/open-telemetry/opentelemetry-ebpf-profiler/pull/114.

Considering that off-CPU profiling is more expensive, it is recommended to add a process filter so that only processes meeting certain criteria are analyzed.

[..], it is recommended to add a process filter so that only processes meeting certain criteria are analyzed.

Filtering for a specific process is, from my point of view, not a viable option, as

the complete architecture of the profiling agent is focused on complete system profiling, so the architecture would need to change.
filtering for a process would not mitigate the named risks
filtering for a process would also add significant additional (management) complexity, as process can fork, become zombies etc.

If off-CPU profiling consumes too many resources, it becomes unsuitable for high-load servers. In many cases, people use profiler to solve problems, and the servers experiencing issues often have insufficient resources. On servers with ample resources, the need for a profiler is not as urgent.

[..]  it becomes unsuitable for high-load servers. In many cases, people use profiler to solve problems, and the servers experiencing issues often have insufficient resources.

The Risks section is exactly about this. And this is the reason, why off-CPU profiling should be added as optional functionality. Meaning, it can be turned on/off as required.
The whole system sampling approach of this agent does work well in production since February 2021 - iirc the date correctly. Also on very high load systems. Consequently one key mitigation strategy to minimize risks for off-CPU profiling is also sampling. In the provided concept scripts, only 3% of the scheduling events (after the dismissal of idle tasks), is considered for further stack unwinding. Depending on the use case and system 3% of scheduling events can be a high or low number. Ultimately the threshold for the sampling (here 3%) should not be hard coded but configurable.

Looks like we have enough consensus here? Unless there are any more concerns, I (or somebody else) can merge this in the next few days.

With https://github.com/open-telemetry/opentelemetry-ebpf-profiler/pull/196 I have opened a draft, that backs this RFC. Once this RFC got merged, I will continue with https://github.com/open-telemetry/opentelemetry-ebpf-profiler/pull/196.

Forgot to mention before: I'm voting for option B

Added the decision to go forward with Option B.


Improve pages layout & style

solve some problems and complete i18n tasks

@RoduanKD
Thanks for your feedback , I've made the changes you requested and I think we're ready for the beta release.