-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kiota crashes with NullReferenceException after update #6035
Comments
Thanks for raising this @bkoelman Unfourtunately, I'm not able to replicate the error using the openApi description and the arguments you provided. |
I'm unable to reproduce it anymore. I've tried 7x with debug switch on Windows/Ubuntu/macOS, then 6x without debug switch. It would be helpful to dump the stack trace on the console in such cases. |
Stack traces are enabled by default when built in debug. But we don't distribute debug builds. Let us know if you have any additional comments or questions. |
Well, I agree that printing a stack trace for functional errors that are supposed to happen sometimes (for example: OAS file not found or invalid) is annoying for users. But this one belongs to the class of errors that are never supposed to happen, and typically indicate an internal bug. I think they should always be printed with rich info, possibly asking to create an issue. Exceptions like NullReferenceException, TypeLoadException, DivideByZeroException, InvalidCastException, IndexOutOfRangeException, OverflowException etc. May also include FormatException and ArgumentException, depending on whether they could happen under normal circumstances. |
There's a chance this could be related to microsoft/OpenAPI.NET#1202. So, once we resolve #5936 and pull in a version with NRT information this may be resolved. |
What are you generating using Kiota, clients or plugins?
API Client/SDK
In what context or format are you using Kiota?
Nuget tool
Client library/SDK language
Csharp
Describe the bug
After update from v1.21.0 to v1.22.3, kiota crashes with the following error on Ubuntu:
Expected behavior
No crash.
How to reproduce
Run the following command:
Open API description file
Contents of swagger.g.json:
https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/2212fc2c685446bebf86c905814a014f1a521cbd/test/OpenApiTests/RestrictedControllers/GeneratedSwagger/swagger.g.json
Kiota Version
1.22.3
Latest Kiota version known to work for scenario above?(Not required)
1.21.0
Known Workarounds
None
Configuration
Ubuntu 24.04.1 LTS (GitHub Actions runner)
Debug output
No response
Other information
No response
The text was updated successfully, but these errors were encountered: