twitchdev/twitch-cli

[Bug] Twitch token subcommand fails with segmentation fault

Closed this issue · 0 comments

What is the problem?

Invoking the example command from the documentation, I'm getting an error

$ twitch token -u -s 'user:read:email user:edit'

Additional information

  • Same happens if I specify the client id as a flag.
  • Twitch CLI version is 1.1.21
$ twitch version
twitch-cli/1.1.21
  • Cli was installed via brew
  • twitch-cli.env file does not exist, and setting --config to another location doesn't help.

Operating System

Mac OS 14.0

Architecture Version (x86, x64, arm, etc)

arm (Apple Silicon M1 Pro)

Steps to reproduce

  1. Execute: twitch token -u -s 'user:read:email user:edit'

Relevant log output

No Client ID or Secret found in configuration. Triggering configuration now.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x1028a957c]

goroutine 1 [running]:
github.com/twitchdev/twitch-cli/cmd.loginCmdRun(0x1400016d200?, {0x140001981e0, 0x0, 0x3})
	/go/src/github.com/twitchdev/twitch-cli/cmd/token.go:53 +0x18c
github.com/spf13/cobra.(*Command).execute(0x102faa780, {0x140001981b0, 0x3, 0x3})
	/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:852 +0x554
github.com/spf13/cobra.(*Command).ExecuteC(0x102faa500)
	/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960 +0x310
github.com/spf13/cobra.(*Command).Execute(...)
	/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:897
github.com/twitchdev/twitch-cli/cmd.Execute()
	/go/src/github.com/twitchdev/twitch-cli/cmd/root.go:26 +0x24
main.main()
	/go/src/github.com/twitchdev/twitch-cli/main.go:54 +0x2fc