Skip to content
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

dotnet8 Okta.Sdk requires Microsoft.Bcl.AsyncInterfaces v7.0.0.0 but doesn't specify the requirement #721

Open
twhitex opened this issue Jun 4, 2024 · 2 comments
Labels

Comments

@twhitex
Copy link

twhitex commented Jun 4, 2024

Describe the bug?

We are on dotnet8. Something in Okta.Sdk relies on Microsoft.Bcl.AsyncInterfaces v7.0.0 or greater but is not specifically requiring this package. Building the project is fine. However, if we run our project and call any Okta.Sdk apis, it will crash until we add a reference to Microsoft.Bcl.AsyncInterfaces v7.0.0 or greater.

What is expected to happen?

Should not receive a runtime error.

What is the actual behavior?

Runtime error when using any Okta.Sdk apis.

Reproduction Steps?

create new dotnet8 console project
dotnet new console --name yourprojname

add reference
add Okta.Sdk 7.0.6 reference

add the following code to program.cs - replacing yourtoken and yourdomain with the correct parameters
using Okta.Sdk.Api;
using Okta.Sdk.Client;

var userApi = new UserApi(new Configuration { Token = "yourtoken", OktaDomain = "yourdomain" });
var users = userApi.ListUsers();

run the project
error received:
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
File name: 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at Program.<Main>$(String[] args)

Additional Information?

No response

.NET Version

8.0.204

SDK Version

7.0.6

OS version

No comment

@twhitex twhitex added the bug label Jun 4, 2024
@bryanapellanes-okta
Copy link
Contributor

@twhitex I apologize for the delayed response. Thanks for reporting this, I've entered an internal ticket for review and prioritization: OKTA-742391

@kdcllc
Copy link

kdcllc commented Aug 16, 2024

@bryanapellanes-okta I am running into the same issue and in addition, I have a console app that that works but in AspNetCore the same code returns (0) and no error.

       var config = new Configuration
        {
            OktaDomain = "",
            Token = ""
        };
        var apiClient = new GroupApi(config);
        var client = await apiClient.ListGroups().ToListAsync(cancellationToken: applicationLifetime.ApplicationStopping);

        logger.LogInformation("Groups: {0}", client.Count);

I verified that this issue is related to #736

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants