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

client.Group.ListAssignedApplicationsForGroup returns an application properly, but gives error for nonexistent index #292

Closed
pputman12 opened this issue Apr 20, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@pputman12
Copy link

Describe the bug?

image

When trying to call ListAssignedApplicationsForGroup, I get an error:

image

I'm writing a test that creates an okta group and app, with a rule that should assign them, so I'm testing if it exists, and it does when printing it out:

image

I've isolated the problem down to ListAssignedApplicationsForGroup but not sure why its complaining about index out of range.

What is expected to happen?

its expected to just run the test successfully, since the application exists and is assigned to the group

What is the actual behavior?

It does pull down the application, and I can see it searches for it and finds it, but I get an error saying index out of range

Reproduction Steps?

Try to call this method with these parameters:

ctx, client, err := oktaTest.NewConnection(
oktaCon.testOrg,
oktaCon.testUrl,
oktaCon.testApiToken,
)
if err != nil {
fmt.Printf("Could not connect to okta %v", err)
}

oktaGroupApps, _, err := client.Group.ListAssignedApplicationsForGroup(ctx, groupId, nil)

oktaGroupApps will have the proper application, but it will still error out at the end. It panics and recovers somehow?

Additional Information?

No response

Golang Version

1.18 and 1.18.1

SDK Version

latest

OS version

Darwin Patricks-MacBook-Pro.local 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:46:32 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T6000 arm64

@pputman12 pputman12 added the bug Something isn't working label Apr 20, 2022
@monde monde self-assigned this Apr 20, 2022
@monde
Copy link
Collaborator

monde commented Apr 20, 2022

@pputman12 thanks for giving me a head start into debugging this. I will look into it.

@monde monde reopened this Apr 20, 2022
@monde
Copy link
Collaborator

monde commented Apr 20, 2022

Just checking @pputman12, did you close this ticket inadvertently? I'm going to write some code to see if I can repo this in my dev env.

@pputman12
Copy link
Author

pputman12 commented Apr 20, 2022 via email

@monde
Copy link
Collaborator

monde commented Apr 20, 2022

ok, no problem! I have new integration test to add to the next release 😄

@monde monde closed this as completed Apr 20, 2022
@pputman12
Copy link
Author

pputman12 commented Apr 20, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants