[Bug] preauthkeys list - panic: strconv: illegal AppendInt/FormatInt base #1015

Closed
opened 2025-12-29 02:27:32 +01:00 by adam · 1 comment
Owner

Originally created by @jasonrepos on GitHub (May 11, 2025).

Is this a support request?

  • This is not a support request

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Bug when trying to list users preauthkeys using Headscale 0.26.0-beta.2

root@test-server:/opt/client1/etc/headscale# docker exec -it client1 headscale version
0.26.0-beta.2
root@test-server:/opt/client1/etc/headscale#
root@test-server:/opt/client1/etc/headscale# docker exec -it client1 headscale users list
ID | Name | Username | Email | Created
1 | | jason | | 2025-05-11 07:37:23

root@test-server:/opt/client1/etc/headscale# docker exec -it client1 headscale preauthkeys create -u 1
2025-05-11T07:37:47Z TRC expiration has been set expiration=3600000
658b8ce91937875f40d79e3bc764ffb30a9a4a6e29fa071a
root@test-server:/opt/client1/etc/headscale# docker exec -it client1 headscale preauthkeys list -u 1
panic: strconv: illegal AppendInt/FormatInt base

goroutine 1 [running]:
strconv.formatBits({0x0?, 0xedfb258db?, 0x25696a9b?}, 0xc00003aaf8?, 0xc000059160?, 0x0?, 0x0?)
/nix/store/rv9g1p18w52vip6652svdgy138wgx7dj-go-1.24.2/share/go/src/strconv/itoa.go:90 +0x44d
strconv.FormatUint(0x0?, 0x2af76a8?)
/nix/store/rv9g1p18w52vip6652svdgy138wgx7dj-go-1.24.2/share/go/src/strconv/itoa.go:18 +0x89
github.com/juanfont/headscale/cmd/headscale/cli.init.func24(0x3d32420, {0x22ba983?, 0x4?, 0x22ba853?})
/home/runner/work/headscale/headscale/cmd/headscale/cli/preauthkeys.go:115 +0x571
github.com/spf13/cobra.(*Command).execute(0x3d32420, {0xc000420640, 0x2, 0x2})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1019 +0xa7b
github.com/spf13/cobra.(*Command).ExecuteC(0x3d329a0)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1148 +0x40c
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1071
github.com/juanfont/headscale/cmd/headscale/cli.Execute()
/home/runner/work/headscale/headscale/cmd/headscale/cli/root.go:103 +0x1a
main.main()
/home/runner/work/headscale/headscale/cmd/headscale/headscale.go:42 +0x1fe
root@test-server:/opt/client1/etc/headscale#

Expected Behavior

I would expect to see the preauthkey

Steps To Reproduce

  1. Generate the preauthkey
  2. Try to list the preauthkey

Environment

- OS: Ubuntu 24.04
- Headscale version: 0.26.0-beta.2
- Tailscale version: N/A

Runtime environment

  • Headscale is behind a (reverse) proxy
  • Headscale runs in a container

Debug information

root@test-server:/opt/client1/etc/headscale# docker exec -it client1 headscale preauthkeys list -u 1
panic: strconv: illegal AppendInt/FormatInt base

goroutine 1 [running]:
strconv.formatBits({0x0?, 0xedfb258db?, 0x25696a9b?}, 0xc00003aaf8?, 0xc000059160?, 0x0?, 0x0?)
/nix/store/rv9g1p18w52vip6652svdgy138wgx7dj-go-1.24.2/share/go/src/strconv/itoa.go:90 +0x44d
strconv.FormatUint(0x0?, 0x2af76a8?)
/nix/store/rv9g1p18w52vip6652svdgy138wgx7dj-go-1.24.2/share/go/src/strconv/itoa.go:18 +0x89
github.com/juanfont/headscale/cmd/headscale/cli.init.func24(0x3d32420, {0x22ba983?, 0x4?, 0x22ba853?})
/home/runner/work/headscale/headscale/cmd/headscale/cli/preauthkeys.go:115 +0x571
github.com/spf13/cobra.(*Command).execute(0x3d32420, {0xc000420640, 0x2, 0x2})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1019 +0xa7b
github.com/spf13/cobra.(*Command).ExecuteC(0x3d329a0)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1148 +0x40c
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1071
github.com/juanfont/headscale/cmd/headscale/cli.Execute()
/home/runner/work/headscale/headscale/cmd/headscale/cli/root.go:103 +0x1a
main.main()
/home/runner/work/headscale/headscale/cmd/headscale/headscale.go:42 +0x1fe
root@test-server:/opt/client1/etc/headscale#

Originally created by @jasonrepos on GitHub (May 11, 2025). ### Is this a support request? - [x] This is not a support request ### Is there an existing issue for this? - [x] I have searched the existing issues ### Current Behavior Bug when trying to list users preauthkeys using Headscale 0.26.0-beta.2 root@test-server:/opt/client1/etc/headscale# docker exec -it client1 headscale version 0.26.0-beta.2 root@test-server:/opt/client1/etc/headscale# root@test-server:/opt/client1/etc/headscale# docker exec -it client1 headscale users list ID | Name | Username | Email | Created 1 | | jason | | 2025-05-11 07:37:23 root@test-server:/opt/client1/etc/headscale# docker exec -it client1 headscale preauthkeys create -u 1 2025-05-11T07:37:47Z TRC expiration has been set expiration=3600000 658b8ce91937875f40d79e3bc764ffb30a9a4a6e29fa071a root@test-server:/opt/client1/etc/headscale# docker exec -it client1 headscale preauthkeys list -u 1 panic: strconv: illegal AppendInt/FormatInt base goroutine 1 [running]: strconv.formatBits({0x0?, 0xedfb258db?, 0x25696a9b?}, 0xc00003aaf8?, 0xc000059160?, 0x0?, 0x0?) /nix/store/rv9g1p18w52vip6652svdgy138wgx7dj-go-1.24.2/share/go/src/strconv/itoa.go:90 +0x44d strconv.FormatUint(0x0?, 0x2af76a8?) /nix/store/rv9g1p18w52vip6652svdgy138wgx7dj-go-1.24.2/share/go/src/strconv/itoa.go:18 +0x89 github.com/juanfont/headscale/cmd/headscale/cli.init.func24(0x3d32420, {0x22ba983?, 0x4?, 0x22ba853?}) /home/runner/work/headscale/headscale/cmd/headscale/cli/preauthkeys.go:115 +0x571 github.com/spf13/cobra.(*Command).execute(0x3d32420, {0xc000420640, 0x2, 0x2}) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1019 +0xa7b github.com/spf13/cobra.(*Command).ExecuteC(0x3d329a0) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1148 +0x40c github.com/spf13/cobra.(*Command).Execute(...) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1071 github.com/juanfont/headscale/cmd/headscale/cli.Execute() /home/runner/work/headscale/headscale/cmd/headscale/cli/root.go:103 +0x1a main.main() /home/runner/work/headscale/headscale/cmd/headscale/headscale.go:42 +0x1fe root@test-server:/opt/client1/etc/headscale# ### Expected Behavior I would expect to see the preauthkey ### Steps To Reproduce 1. Generate the preauthkey 2. Try to list the preauthkey ### Environment ```markdown - OS: Ubuntu 24.04 - Headscale version: 0.26.0-beta.2 - Tailscale version: N/A ``` ### Runtime environment - [x] Headscale is behind a (reverse) proxy - [x] Headscale runs in a container ### Debug information root@test-server:/opt/client1/etc/headscale# docker exec -it client1 headscale preauthkeys list -u 1 panic: strconv: illegal AppendInt/FormatInt base goroutine 1 [running]: strconv.formatBits({0x0?, 0xedfb258db?, 0x25696a9b?}, 0xc00003aaf8?, 0xc000059160?, 0x0?, 0x0?) /nix/store/rv9g1p18w52vip6652svdgy138wgx7dj-go-1.24.2/share/go/src/strconv/itoa.go:90 +0x44d strconv.FormatUint(0x0?, 0x2af76a8?) /nix/store/rv9g1p18w52vip6652svdgy138wgx7dj-go-1.24.2/share/go/src/strconv/itoa.go:18 +0x89 github.com/juanfont/headscale/cmd/headscale/cli.init.func24(0x3d32420, {0x22ba983?, 0x4?, 0x22ba853?}) /home/runner/work/headscale/headscale/cmd/headscale/cli/preauthkeys.go:115 +0x571 github.com/spf13/cobra.(*Command).execute(0x3d32420, {0xc000420640, 0x2, 0x2}) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1019 +0xa7b github.com/spf13/cobra.(*Command).ExecuteC(0x3d329a0) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1148 +0x40c github.com/spf13/cobra.(*Command).Execute(...) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.9.1/command.go:1071 github.com/juanfont/headscale/cmd/headscale/cli.Execute() /home/runner/work/headscale/headscale/cmd/headscale/cli/root.go:103 +0x1a main.main() /home/runner/work/headscale/headscale/cmd/headscale/headscale.go:42 +0x1fe root@test-server:/opt/client1/etc/headscale#
adam added the bug label 2025-12-29 02:27:32 +01:00
adam closed this issue 2025-12-29 02:27:32 +01:00
Author
Owner

@AVTaran commented on GitHub (May 12, 2025):

The same issue.
OS: Amazon Linux 2

@AVTaran commented on GitHub (May 12, 2025): The same issue. `OS: Amazon Linux 2`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1015