-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Fresh 1.7.3 CLI client installed via brew on OSX.
I'm facing the following issue while running algolia profile list:
Fetching configured profiles ⣽panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x10 pc=0x1050f2290]
goroutine 1 [running]:
github.com/algolia/algoliasearch-client-go/v4/algolia/search.(*APIClient).prepareRequest(0x0, {0x10557d928, 0x105abff40}, {0x1052dc05a, 0xa}, {0x1052d7d66, 0x3}, {0x0?, 0x0?}, 0x0?, ...)
/home/runner/go/pkg/mod/github.com/algolia/algoliasearch-client-go/v4@v4.35.0/algolia/search/client.go:198 +0x140
github.com/algolia/algoliasearch-client-go/v4/algolia/search.(*APIClient).ListIndicesWithHTTPInfo(0x0, {0x0?, 0x0?}, {0x0, 0x0, 0x1052baaac?})
/home/runner/go/pkg/mod/github.com/algolia/algoliasearch-client-go/v4@v4.35.0/algolia/search/api_search.go:5613 +0x2f0
github.com/algolia/algoliasearch-client-go/v4/algolia/search.(*APIClient).ListIndices(0x0, {0x0?, 0x0?}, {0x0, 0x0, 0x0})
/home/runner/go/pkg/mod/github.com/algolia/algoliasearch-client-go/v4@v4.35.0/algolia/search/api_search.go:5640 +0x78
github.com/algolia/cli/pkg/cmd/profile/list.runListCmd(0x1400000c360)
/home/runner/work/cli/cli/pkg/cmd/profile/list/list.go:84 +0x2c8
github.com/algolia/cli/pkg/cmd/profile/list.NewListCmd.func1(0x140001b6c08?, {0x105abff40?, 0x0?, 0x0?})
/home/runner/work/cli/cli/pkg/cmd/profile/list/list.go:43 +0x3c
github.com/spf13/cobra.(*Command).execute(0x140001b6c08, {0x105abff40, 0x0, 0x0})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1015 +0x82c
github.com/spf13/cobra.(*Command).ExecuteC(0x140001b6308)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1148 +0x350
github.com/spf13/cobra.(*Command).ExecuteContextC(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1080
github.com/algolia/cli/pkg/cmd/root.Execute()
/home/runner/work/cli/cli/pkg/cmd/root/root.go:201 +0x268
main.main()
/home/runner/work/cli/cli/cmd/algolia/main.go:10 +0x1c
I've also faced a couple issues while trying to setup my profile for the first time.
The code snippet is outdated here: https://www.algolia.com/developers/algolia-cli
Suggesting --admin-api-key instead of --api-key
Also while using the suggested command (with a newly created API key, with all permissions) (not copy pasting my creds for obvious reasons):
algolia profile add --name "my-profile" --app-id "my-app-id" --api-key "my-api-key" --default
This answers:
profile 'my-profile' not found