awslabs / ssosync

Populate AWS SSO directly with your G Suite users and groups using either a CLI or AWS Lambda
Apache License 2.0
517 stars 178 forks source link

panic: runtime error: invalid memory address or nil pointer dereference #128

Closed BamiNYC closed 5 months ago

BamiNYC commented 1 year ago

Describe the bug When running ssosync to sync AWS IAM Identity Center with Google Workspace, I ran into the follow error...

INFO[0013] get existing aws groups

INFO[0013] get existing aws users

DEBU[0013] IdentityStoreId: d-

panic: runtime error: invalid memory address or nil pointer dereference

[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x16f0e5f]

goroutine 1 [running]:

github.com/awslabs/ssosync/internal.ConvertSdkUserObjToNative(0xc0001c4240)

                /Users/xxxxxxxxx/Documents/Innovative/jazel/ssosync/internal/sync.go:860 +0xbf

github.com/awslabs/ssosync/internal.ListUsersPagesCallbackFn(0xc0008ac6b8?, 0x1)

                /Users/xxxxxxxx/Documents/Innovative/jazel/ssosync/internal/sync.go:848 +0x65

github.com/aws/aws-sdk-go/service/identitystore.(*IdentityStore).ListUsersPagesWithContext(0xc0001a62e8, {0x1be8910?, 0xc00019c000}, 0xc00010a930, 0x198c828, {0x0, 0x0, 0x0})

                /Users/xxxxxxxxxxx/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.102/service/identitystore/api.go:1897 +0x1f0

github.com/aws/aws-sdk-go/service/identitystore.(*IdentityStore).ListUsersPages(0xc0001fa000?, 0x5?, 0xc0008ac800?)

                /Users/xxxxxxxxxx/go/pkg/mod/github.com/aws/aws-sdk-go@v1.44.102/service/identitystore/api.go:1871 +0x3a

github.com/awslabs/ssosync/internal.(*syncGSuite).GetUsers(0xc0008adbe8)

                /Users/xxxxxxxxxxx/Documents/Innovative/jazel/ssosync/internal/sync.go:833 +0x10f

github.com/awslabs/ssosync/internal.(*syncGSuite).SyncGroupsUsers(0xc0008adbe8, {0x2066049ac, 0x9})

                /Users/xxxxxxxxxxxxx/Documents/Innovative/jazel/ssosync/internal/sync.go:318 +0x436

github.com/awslabs/ssosync/internal.DoSync({0x1be88d8, 0xc00054ec40}, 0xc00055a360)

                /Users/xxxxxxxxxx/Documents/Innovative/jazel/ssosync/internal/sync.go:747 +0x485

github.com/awslabs/ssosync/cmd.glob..func1(0x20f81e0?, {0x192d6f8?, 0xd?, 0xd?})

                /Users/xxxxxxxxxxx/Documents/Innovative/jazel/ssosync/cmd/root.go:57 +0x5b

github.com/spf13/cobra.(*Command).execute(0x20f81e0, {0xc0001ae010, 0xd, 0xd})

                /Users/xxxxxxxxxxxx/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:852 +0x67c

github.com/spf13/cobra.(*Command).ExecuteC(0x20f81e0)

                /Users/xxxxxxxxxxx/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960 +0x39d

github.com/spf13/cobra.(*Command).Execute(...)

                /Users/xxxxxxxxxx/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:897

github.com/awslabs/ssosync/cmd.Execute()

                /Users/xxxxxxxxxx/Documents/Innovative/jazel/ssosync/cmd/root.go:74 +0x93

main.main()

main.main()To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Ran with args '...'
  3. See error

Expected behavior A clear and concise description of what you expected to happen.

Additional context Add any other context about the problem here.

ChrisPates commented 5 months ago

Can you share an redacted configuration you used, also what version of the binary and how you were running it:

The error appears to becoming from within the SDK so it could be an issue with connecting to the instance Identity Store api itself.