exercism / cli

A Go based command line tool for exercism.org.
https://exercism.org/docs/using/solving-exercises/working-locally
MIT License
1.33k stars 360 forks source link

Cli problems configuring token #962

Closed dnberlin closed 3 years ago

dnberlin commented 4 years ago
$ ./exercism configure -v --token=xxxxx
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
github.com/exercism/cli/debug.DumpRequest(0x90b4900)
    /Users/ekingery/dev/exercism/cli/debug/debug.go:50 +0x6c4
github.com/exercism/cli/api.(*Client).Do(0x90fde04, 0x90b4900, 0x3, 0x909a2c0, 0x1f)
    /Users/ekingery/dev/exercism/cli/api/client.go:66 +0x21
github.com/exercism/cli/api.(*Client).IsPingable(0x90fde04, 0x0, 0x0)
    /Users/ekingery/dev/exercism/cli/api/client.go:100 +0xf1
github.com/exercism/cli/cmd.runConfigure(0x84b688e, 0x5, 0x901e285, 0xe, 0x909a2a0, 0x1f, 0x84c483f, 0x1a, 0xffe20ed5, 0x8, ...)
    /Users/ekingery/dev/exercism/cli/cmd/configure.go:94 +0xa2b
github.com/exercism/cli/cmd.glob..func1(0x88d25e0, 0x9084420, 0x0, 0x2, 0x0, 0x0)
    /Users/ekingery/dev/exercism/cli/cmd/configure.go:43 +0xe3
github.com/spf13/cobra.(*Command).execute(0x88d25e0, 0x9084400, 0x2, 0x2, 0x88d25e0, 0x9084400)
    /Users/ekingery/golang/pkg/mod/github.com/spf13/cobra@v0.0.0-20170731170427-b26b538f6930/command.go:649 +0x2e4
github.com/spf13/cobra.(*Command).ExecuteC(0x88d2a60, 0x0, 0x0, 0x8440980)
    /Users/ekingery/golang/pkg/mod/github.com/spf13/cobra@v0.0.0-20170731170427-b26b538f6930/command.go:728 +0x21f
github.com/spf13/cobra.(*Command).Execute(...)
    /Users/ekingery/golang/pkg/mod/github.com/spf13/cobra@v0.0.0-20170731170427-b26b538f6930/command.go:687
github.com/exercism/cli/cmd.Execute()
    /Users/ekingery/dev/exercism/cli/cmd/root.go:39 +0x23
main.main()
    /Users/ekingery/dev/exercism/cli/exercism/main.go:6 +0x17
NobbZ commented 4 years ago

I have removed it anyway and also added some formatting to your post.

Can you perhaps also share some information about your system?

OS, in docker, in virtualization, cloudhosted etc?

dnberlin commented 4 years ago

System Info

System:    Kernel: 5.4.0-47-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 4.6.7 
           wm: muffin dm: LightDM Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal 
Machine:   Type: Laptop System: LENOVO product: 20AQ0069GE v: ThinkPad T440s serial: <filter> 
           Chassis: type: 10 serial: <filter> 
           Mobo: LENOVO model: 20AQ0069GE v: 0B98401 PRO serial: <filter> UEFI: LENOVO 
           v: GJET91WW (2.41 ) date: 09/21/2016 
Battery:   ID-1: BAT0 charge: 6.9 Wh condition: 16.9/23.2 Wh (73%) volts: 11.0/11.1 
           model: SANYO 45N1109 serial: <filter> status: Discharging 
           ID-2: BAT1 charge: 0.8 Wh condition: 14.8/23.2 Wh (64%) volts: 11.0/11.1 
           model: SANYO 45N1125 serial: <filter> status: Unknown 
CPU:       Topology: Dual Core model: Intel Core i7-4600U bits: 64 type: MT MCP arch: Haswell 
           rev: 1 L2 cache: 4096 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 21550 
           Speed: 914 MHz min/max: 800/3300 MHz Core speeds (MHz): 1: 825 2: 819 3: 817 4: 816 
Graphics:  Device-1: Intel Haswell-ULT Integrated Graphics vendor: Lenovo driver: i915 v: kernel 
           bus ID: 00:02.0 chip ID: 8086:0a16 
           Display: x11 server: X.Org 1.20.8 driver: modesetting unloaded: fbdev,vesa 
           resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4400 (HSW GT2) v: 4.5 Mesa 20.0.8 
           compat-v: 3.0 direct render: Yes 
Audio:     Device-1: Intel Haswell-ULT HD Audio vendor: Lenovo driver: snd_hda_intel v: kernel 
           bus ID: 00:03.0 chip ID: 8086:0a0c 
           Device-2: Intel 8 Series HD Audio vendor: Lenovo driver: snd_hda_intel v: kernel 
           bus ID: 00:1b.0 chip ID: 8086:9c20 
           Sound Server: ALSA v: k5.4.0-47-generic 
Network:   Device-1: Intel Ethernet I218-LM vendor: Lenovo ThinkPad X240 driver: e1000e v: 3.2.6-k 
           port: 3080 bus ID: 00:19.0 chip ID: 8086:155a 
           IF: enp0s25 state: down mac: <filter> 
           Device-2: Intel Wireless 7260 driver: iwlwifi v: kernel port: efa0 bus ID: 03:00.0 
           chip ID: 8086:08b2 
           IF: wlp3s0 state: up mac: <filter> 
           IF-ID-1: wwan0 state: down mac: <filter> 
Drives:    Local Storage: total: 238.47 GiB used: 49.84 GiB (20.9%) 
           ID-1: /dev/sda vendor: Samsung model: MZ7TD256HAFV-000L9 size: 238.47 GiB 
           speed: 6.0 Gb/s serial: <filter> 
Partition: ID-1: / size: 233.24 GiB used: 49.83 GiB (21.4%) fs: ext4 dev: /dev/sda2 
Sensors:   System Temperatures: cpu: 50.0 C mobo: 0.0 C 
           Fan Speeds (RPM): cpu: 2480 
Repos:     No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb http: //mirror.bauhuette.fh-aachen.de/linuxmint ulyana main upstream import backport
           2: deb http: //artfiles.org/ubuntu.com focal main restricted universe multiverse
           3: deb http: //artfiles.org/ubuntu.com focal-updates main restricted universe multiverse
           4: deb http: //artfiles.org/ubuntu.com focal-backports main restricted universe multiverse
           5: deb http: //security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
           6: deb http: //archive.canonical.com/ubuntu/ focal partner
           Active apt repos in: /etc/apt/sources.list.d/skype-stable.list 
           1: deb [arch=amd64] https: //repo.skype.com/deb stable main
           Active apt repos in: /etc/apt/sources.list.d/spotify.list 
           1: deb http: //repository.spotify.com stable non-free
Info:      Processes: 229 Uptime: 50m Memory: 11.58 GiB used: 1.79 GiB (15.5%) Init: systemd 
           v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Client: Unknown python3.8 client 
           inxi: 3.0.38 
NobbZ commented 3 years ago

Can you perhaps also add some info about how you installed exercism? What does exercism debug show, which exercism and exercism version? If any of those just prints the stacktrace, you do not need to copy everything, just tell us that it also panics.

haguro commented 3 years ago

FYI this occurs when passing the verbose flag with configure. Looking into it.