Flaky install.sh script returns invalid version tag #2368

Open
opened 2025-11-20 07:08:44 -05:00 by saavagebueno · 6 comments
Owner

Originally created by @LucaPapay on GitHub (Oct 13, 2025).

Describe the problem

Our CI fails because the install.sh script sometimes failes to parse the latest version and returns mentions_count instead

To Reproduce

Steps to reproduce the behavior:

  • run this in CI
    curl -fsSL https://pkgs.netbird.io/install.sh | sh
    about 1 in 5 times the url it is trying to install is
NetBird UI installation will be omitted as Linux does not run desktop environment
The installation will be performed using binary files
Installing netbird from https://github.com/netbirdio/netbird/releases/download/mentions_count/netbird_mentions_count_linux_amd64.tar.gz

instead of

Run curl -fsSL https://pkgs.netbird.io/install.sh | sh
NetBird UI installation will be omitted as Linux does not run desktop environment
The installation will be performed using binary files
Installing netbird from https://github.com/netbirdio/netbird/releases/download/v0.59.5/netbird_0.59.5_linux_amd64.tar.gz

the error seems to stem from this function in the install.sh script

get_release() {
    local RELEASE=$1
    if [ "$RELEASE" = "latest" ]; then
        local TAG="latest"
        local URL="https://pkgs.netbird.io/releases/latest"
    else
        local TAG="tags/${RELEASE}"
        local URL="https://api.github.com/repos/${OWNER}/${REPO}/releases/${TAG}"
    fi
    if [ -n "$GITHUB_TOKEN" ]; then
          curl -H  "Authorization: token ${GITHUB_TOKEN}" -s "${URL}" \
              | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
    else
          curl -s "${URL}" \
              | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
    fi
}

Expected behavior

install netbird always

Are you using NetBird Cloud?

We are self hosting but this should not matter

NetBird version

all versions

Is any other VPN software installed?

--

Debug output

To help us resolve the problem, please attach the following anonymized status output

netbird status -dA

Create and upload a debug bundle, and share the returned file key:

netbird debug for 1m -AS -U

Uploaded files are automatically deleted after 30 days.

Alternatively, create the file only and attach it here manually:

netbird debug for 1m -AS

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Have you tried these troubleshooting steps?

  • Reviewed client troubleshooting (if applicable)
  • Checked for newer NetBird versions
  • Searched for similar issues on GitHub (including closed ones)
  • Restarted the NetBird client
  • Disabled other VPN software
  • Checked firewall settings
Originally created by @LucaPapay on GitHub (Oct 13, 2025). **Describe the problem** Our CI fails because the install.sh script sometimes failes to parse the latest version and returns mentions_count instead **To Reproduce** Steps to reproduce the behavior: - run this in CI ```curl -fsSL https://pkgs.netbird.io/install.sh | sh``` about 1 in 5 times the url it is trying to install is ``` NetBird UI installation will be omitted as Linux does not run desktop environment The installation will be performed using binary files Installing netbird from https://github.com/netbirdio/netbird/releases/download/mentions_count/netbird_mentions_count_linux_amd64.tar.gz ``` instead of ``` Run curl -fsSL https://pkgs.netbird.io/install.sh | sh NetBird UI installation will be omitted as Linux does not run desktop environment The installation will be performed using binary files Installing netbird from https://github.com/netbirdio/netbird/releases/download/v0.59.5/netbird_0.59.5_linux_amd64.tar.gz ``` the error seems to stem from this function in the install.sh script ``` get_release() { local RELEASE=$1 if [ "$RELEASE" = "latest" ]; then local TAG="latest" local URL="https://pkgs.netbird.io/releases/latest" else local TAG="tags/${RELEASE}" local URL="https://api.github.com/repos/${OWNER}/${REPO}/releases/${TAG}" fi if [ -n "$GITHUB_TOKEN" ]; then curl -H "Authorization: token ${GITHUB_TOKEN}" -s "${URL}" \ | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' else curl -s "${URL}" \ | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' fi } ``` **Expected behavior** install netbird always **Are you using NetBird Cloud?** We are self hosting but this should not matter **NetBird version** all versions **Is any other VPN software installed?** -- **Debug output** To help us resolve the problem, please attach the following anonymized status output netbird status -dA Create and upload a debug bundle, and share the returned file key: netbird debug for 1m -AS -U *Uploaded files are automatically deleted after 30 days.* Alternatively, create the file only and attach it here manually: netbird debug for 1m -AS **Screenshots** If applicable, add screenshots to help explain your problem. **Additional context** Add any other context about the problem here. **Have you tried these troubleshooting steps?** - [ ] Reviewed [client troubleshooting](https://docs.netbird.io/how-to/troubleshooting-client) (if applicable) - [ ] Checked for newer NetBird versions - [ ] Searched for similar issues on GitHub (including closed ones) - [ ] Restarted the NetBird client - [ ] Disabled other VPN software - [ ] Checked firewall settings
saavagebueno added the triage-needed label 2025-11-20 07:08:44 -05:00
Author
Owner

@ovsyankinaa commented on GitHub (Oct 16, 2025):

the same error each time

@ovsyankinaa commented on GitHub (Oct 16, 2025): + the same error each time
Author
Owner

@czyber commented on GitHub (Oct 17, 2025):

How can it be that this is just ignored?

I posted about this on your slack two weeks ago and also was just ignored.

@czyber commented on GitHub (Oct 17, 2025): How can it be that this is just ignored? I posted about this on your slack two weeks ago and also was just ignored.
Author
Owner

@mlsmaycon commented on GitHub (Oct 17, 2025):

Hello folks, thanks for reporting the issue. We are working on a fix.

@mlsmaycon commented on GitHub (Oct 17, 2025): Hello folks, thanks for reporting the issue. We are working on a fix.
Author
Owner

@mlsmaycon commented on GitHub (Oct 20, 2025):

Hey folks, the issue happened because sometimes we were getting a 304 from upstream as our PKG services were trying their best to cache things. We've added a handler for that, and we should see an improvement in stability. I suggest we keep this one open for a week and see if it happens again.

@mlsmaycon commented on GitHub (Oct 20, 2025): Hey folks, the issue happened because sometimes we were getting a 304 from upstream as our PKG services were trying their best to cache things. We've added a handler for that, and we should see an improvement in stability. I suggest we keep this one open for a week and see if it happens again.
Author
Owner

@LucaPapay commented on GitHub (Oct 20, 2025):

Thanks for the update, i will let you know if we see the flaky behaviour again.

@LucaPapay commented on GitHub (Oct 20, 2025): Thanks for the update, i will let you know if we see the flaky behaviour again.
Author
Owner

@LucaPapay commented on GitHub (Oct 21, 2025):

Hey, it seemed to be much more stable since yesterday but just 2 minutes ago it failed our latest production release. So the error does not seem to be fixed entirely. Please investigate the problem further. If I can provide you with any additonal info I would be happy to help get this fixed.

@LucaPapay commented on GitHub (Oct 21, 2025): Hey, it seemed to be much more stable since yesterday but just 2 minutes ago it failed our latest production release. So the error does not seem to be fixed entirely. Please investigate the problem further. If I can provide you with any additonal info I would be happy to help get this fixed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2368