You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently upgraded our project to .NET 8 and updated the HttpClient-Interception package to its latest version. Following this upgrade, we are encountering an issue where multiple tests are failing due to authorization failures.
Environment
.NET Version: 8.0
HttpClient-Interception Version: 4.1.0
OS: Windows
Issue Description
Prior to the upgrade, all our tests were passing consistently. The tests that are failing are specifically those that rely on HttpClient-Interception for mocking HTTP requests and responses. These tests are now failing with an "unauthorized" error, although no changes were made to the test setup or the codebase, apart from the version upgrades.
Steps to Reproduce
Upgrade the project to .NET 8.
Upgrade HttpClient-Interception to the latest version.
Run the existing tests which involve HTTP request mocking.
Expected Behavior
Tests that were passing previously should continue to pass after the upgrade, assuming no changes to the test logic or setup.
Actual Behavior
Tests involving mocked HTTP requests are failing with an "unauthorized" error.
Additional Information
Error logs/output:
Shouldly.ShouldAssertException : response.response.StatusCode
should be
HttpStatusCode.Created
but was
HttpStatusCode.Unauthorized
Could you please provide any insights into why this might be happening? Are there any breaking changes in the latest version of HttpClient-Interception that could affect authorization? Also, are there any additional configurations or steps that we need to consider after upgrading to .NET 8 and the latest version of HttpClient-Interception?
Any guidance or suggestions would be greatly appreciated.
Thank you for your help!
The text was updated successfully, but these errors were encountered:
Could you provide a minimal reproducible sample project demonstrating the failure? Otherwise it's hard to guide you on what might be wrong.
There shouldn't be any changes in the library that would break things for .NET 8. I use this library extensively in my personal projects that intercept authorization-related requests to third-party OAuth providers, and they haven't had any issues related to this library.
Two changes I am aware of that have impacted things using this library related to .NET 8 are:
Some of the ASP.NET Core OAuth providers were updated to use newer API versions, causing paths to change. In these cases, the interceptions needed updating - example martincostello/alexa-london-travel-site@be766f1.
Versions of AWS SDKs targeting net8.0 use HttpClient.Send() in some places, which wasn't supported for interception. This support was added by Add Interceptor Overload for Send #694 which was part of the 4.1.0 release.
We recently upgraded our project to .NET 8 and updated the HttpClient-Interception package to its latest version. Following this upgrade, we are encountering an issue where multiple tests are failing due to authorization failures.
Environment
.NET Version: 8.0
HttpClient-Interception Version: 4.1.0
OS: Windows
Issue Description
Prior to the upgrade, all our tests were passing consistently. The tests that are failing are specifically those that rely on HttpClient-Interception for mocking HTTP requests and responses. These tests are now failing with an "unauthorized" error, although no changes were made to the test setup or the codebase, apart from the version upgrades.
Steps to Reproduce
Upgrade the project to .NET 8.
Upgrade HttpClient-Interception to the latest version.
Run the existing tests which involve HTTP request mocking.
Expected Behavior
Tests that were passing previously should continue to pass after the upgrade, assuming no changes to the test logic or setup.
Actual Behavior
Tests involving mocked HTTP requests are failing with an "unauthorized" error.
Additional Information
Error logs/output:
Shouldly.ShouldAssertException : response.response.StatusCode
should be
HttpStatusCode.Created
but was
HttpStatusCode.Unauthorized
Could you please provide any insights into why this might be happening? Are there any breaking changes in the latest version of HttpClient-Interception that could affect authorization? Also, are there any additional configurations or steps that we need to consider after upgrading to .NET 8 and the latest version of HttpClient-Interception?
Any guidance or suggestions would be greatly appreciated.
Thank you for your help!
The text was updated successfully, but these errors were encountered: