Cannot login/register with Tailscale Windows client #362

Closed
opened 2025-12-29 01:27:40 +01:00 by adam · 9 comments
Owner

Originally created by @rstewart868 on GitHub (Nov 2, 2022).

Issue description

Unless I'm doing something wrong, I cannot login/register with Tailscale Windows client.

To Reproduce

  1. Install Headscale v0.17.0-beta2 on Linux box with direct public IP
  2. Configure config.yaml to set server_url to hs.domain.tld:443 and listen_addr to 0.0.0.0:443 and tls_letsencrypt_hostname to hs.domain.tld
  3. Run headscale serve and add namespace cso
  4. Install tailscale-ipn-setup-1.32.2.exe on Windows 10 21H2, visit hs.domain.tld/windows and download/execute registry file.
  5. Restart tailscaled service and Tailscale GUI.
  6. Click Login on Windows Tailscale client, directs browser to https://hs.domain.tld:443/register/f27329529....
  7. Headscale reports Unauthorized in browser
  8. Add nodekey: prefix to hash, registers correctly.

Seems to be an issue with latest commit to api.go regex.

Context info

Headscale v0.17.0-beta2 on Linux Debian 11
Windows Tailscale client 1.32.2

2022-11-02T09:17:24-07:00 INF The HTTP2 server was closed error=EOF
2022-11-02T09:17:24-07:00 INF ../../home/runner/work/headscale/headscale/protocol_common.go:145 > New machine not yet in the database follow_up= machine=HPSFF node_key=[8nMpU] node_key_old= noise=true
2022-11-02T09:17:24-07:00 INF ../../home/runner/work/headscale/headscale/protocol_common.go:525 > Successfully sent auth url machine=HPSFF noise=true
2022-11-02T09:17:24-07:00 WRN Invalid node key passed to registration url node_key=f27329529....
Originally created by @rstewart868 on GitHub (Nov 2, 2022). <!-- Headscale is a multinational community across the globe. Our common language is English. Please consider raising the issue in this language. --> <!-- If you have a question, please consider using our Discord for asking questions --> **Issue description** Unless I'm doing something wrong, I cannot login/register with Tailscale Windows client. **To Reproduce** 1) Install Headscale v0.17.0-beta2 on Linux box with direct public IP 2) Configure config.yaml to set server_url to hs.domain.tld:443 and listen_addr to 0.0.0.0:443 and tls_letsencrypt_hostname to hs.domain.tld 3) Run `headscale serve` and add namespace `cso` 4) Install `tailscale-ipn-setup-1.32.2.exe` on Windows 10 21H2, visit hs.domain.tld/windows and download/execute registry file. 5) Restart tailscaled service and Tailscale GUI. 6) Click Login on Windows Tailscale client, directs browser to https://hs.domain.tld:443/register/f27329529.... 7) Headscale reports Unauthorized in browser 8) Add `nodekey:` prefix to hash, registers correctly. Seems to be an issue with latest commit to api.go regex. **Context info** Headscale v0.17.0-beta2 on Linux Debian 11 Windows Tailscale client 1.32.2 ``` 2022-11-02T09:17:24-07:00 INF The HTTP2 server was closed error=EOF 2022-11-02T09:17:24-07:00 INF ../../home/runner/work/headscale/headscale/protocol_common.go:145 > New machine not yet in the database follow_up= machine=HPSFF node_key=[8nMpU] node_key_old= noise=true 2022-11-02T09:17:24-07:00 INF ../../home/runner/work/headscale/headscale/protocol_common.go:525 > Successfully sent auth url machine=HPSFF noise=true 2022-11-02T09:17:24-07:00 WRN Invalid node key passed to registration url node_key=f27329529.... ```
adam added the bug label 2025-12-29 01:27:40 +01:00
adam closed this issue 2025-12-29 01:27:40 +01:00
Author
Owner

@rstewart868 commented on GitHub (Nov 2, 2022):

Maybe changing utils.go from

2bb34751d1

var NodePublicKeyRegex = regexp.MustCompile("nodekey:[a-fA-F0-9]+")

to

var NodePublicKeyRegex = regexp.MustCompile("(nodekey:)?[a-fA-F0-9]+")

Edit: Actually this isn't a good fix since the headscale nodes register command needs a key without the prefix.

@rstewart868 commented on GitHub (Nov 2, 2022): Maybe changing utils.go from https://github.com/juanfont/headscale/commit/2bb34751d19dcdfdf188db437e93a75ed9b6c14a ``` var NodePublicKeyRegex = regexp.MustCompile("nodekey:[a-fA-F0-9]+") ``` to ``` var NodePublicKeyRegex = regexp.MustCompile("(nodekey:)?[a-fA-F0-9]+") ``` Edit: Actually this isn't a good fix since the `headscale nodes register` command needs a key without the prefix.
Author
Owner

@jesset commented on GitHub (Nov 7, 2022):

The same happened to me, finally revert headscale server from 0.17.0-beta2 to 0.17.0-alpha4

@jesset commented on GitHub (Nov 7, 2022): The same happened to me, finally revert headscale server from 0.17.0-beta2 to 0.17.0-alpha4
Author
Owner

@ademasi commented on GitHub (Nov 7, 2022):

This also happen from the linux client, reverted to 0.16.4 allows registering new machine.

@ademasi commented on GitHub (Nov 7, 2022): This also happen from the linux client, reverted to 0.16.4 allows registering new machine.
Author
Owner

@matt1432 commented on GitHub (Nov 10, 2022):

Also happened to me on android and linux, so I reverted to 0.17.0-alpha4 and it worked again.

@matt1432 commented on GitHub (Nov 10, 2022): Also happened to me on android and linux, so I reverted to 0.17.0-alpha4 and it worked again.
Author
Owner

@NetworkEngineer509 commented on GitHub (Nov 13, 2022):

Can confirm after updating to the latest build that I started having this issue.

@NetworkEngineer509 commented on GitHub (Nov 13, 2022): Can confirm after updating to the latest build that I started having this issue.
Author
Owner

@lorenzo95 commented on GitHub (Nov 14, 2022):

Same. Was just trying to register a device before heading to the airport lol as it always happens.
Getting unauthorized on 0.17.0-beta2 android 1.32.2. Manual registration worked.

@lorenzo95 commented on GitHub (Nov 14, 2022): Same. Was just trying to register a device before heading to the airport lol as it always happens. Getting unauthorized on 0.17.0-beta2 android 1.32.2. Manual registration worked.
Author
Owner

@juanfont commented on GitHub (Nov 15, 2022):

@NetworkEngineer509 @lorenzo95 can you try with the latest beta?

@juanfont commented on GitHub (Nov 15, 2022): @NetworkEngineer509 @lorenzo95 can you try with the latest beta?
Author
Owner

@ImpostorKeanu commented on GitHub (Nov 15, 2022):

Issue seems to be fixed for me @juanfont!

@ImpostorKeanu commented on GitHub (Nov 15, 2022): Issue seems to be fixed for me @juanfont!
Author
Owner

@edgar-vincent commented on GitHub (Nov 15, 2022):

I can confirm that it seems to be fixed for me too.

@edgar-vincent commented on GitHub (Nov 15, 2022): I can confirm that it seems to be fixed for me too.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#362