confluentinc / confluent-kafka-dotnet

Confluent's Apache Kafka .NET client
https://github.com/confluentinc/confluent-kafka-dotnet/wiki
Apache License 2.0
2.78k stars 847 forks source link

Crashes withot logs when using oauth #2158

Open Cheshirre opened 6 months ago

Cheshirre commented 6 months ago

Description

Crashes without logs when using authorization type "OAUTHBEARER".

client.OAuthBearerSetToken(token.TokenValue, token.Expiration, **null**);

OS -> Ubuntu Linux, MacOS, etc. Nuget package: Confluent.Kafka, Version=2.3.0.0

How to reproduce

Reproduces on unix OS family: local or in docker container. Works on windows.

Set principal to null in client.OAuthBearerSetToken(token.TokenValue, token.Expiration, **null**): https://github.com/confluentinc/confluent-kafka-dotnet/blob/master/test/Confluent.Kafka.IntegrationTests/Tests/OauthBearerToken_PublishConsume.cs

Works, when principal set to empty string.

Checklist

Please provide the following information:

anchitj commented 4 months ago

Can you provide debug logs?

Cheshirre commented 4 months ago

Can you provide debug logs?

There are no logs becouse this issue https://github.com/confluentinc/confluent-kafka-dotnet/issues/1834

fabianpersson commented 1 month ago

Still an issue. I am unable to provide any logs, since it crashes with exit code 139 (memory violation issue) OS: Windows 10 (on WSL)/Confluent.Kafka v2.4.0

I was able to get it work with just an empty string however

shlomiassaf commented 1 month ago

Happens to me as well OSX with latest nuget

If principal is set to null it will exit with CODE 139 in with or without a debug session. If principal is set to an empty string, all is ok.