You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug]: checkLatestRelease() fails when GitHub API returns compact JSON #8775
This is related to #6162 which addressed a similar issue in checkLatestRelease() but did not fix the root cause.
The checkLatestRelease() function in deployments/cli/community/install.sh uses grep to extract the tag_name from the GitHub API response:
grep -o '"tag_name": "[^"]*"'
This assumes a space after the colon ("tag_name": "v1.2.3"), but the GitHub API sometimes returns compact JSON without spaces ("tag_name":"v1.2.3"), causing grep to match nothing and the upgrade to fail with:
Failed to check for the latest release. Exiting...
Fix: Replace the grep | sed pipeline with python3 which is available on all supported systems:
local latest_release=$(curl -sSL https://api.github.com/repos/$GH_REPO/releases/latest | python3 -c "import sys,json; print(json.load(sys.stdin)['tag_name'])")
Affected:setup.sh Option 5 (Upgrade)
Steps to reproduce
Run ./setup.sh
Select Option 5 (Upgrade)
Script calls checkLatestRelease() which calls the GitHub API
GitHub API returns compact JSON without spaces after colons
grep -o '"tag_name": "[^"]*"' matches nothing
Script exits with "Failed to check for the latest release. Exiting..."
Environment
Production
Browser
None
Variant
Self-hosted
Version
v1.2.3
Reacted by Tejpal Sahota, Matyáš Caras, Helder Lima, Wojciech Janota, Profitroll, Nate Haby, Lev Kovalenko, seriousm4x, MMatic, Adam and 1 more
The install script for the community edition is broken because of this bug. The solution proposed by @uncoden works flawlessly. By default the setup.sh script always fails like this:
--------------------------------------------
____ _ /////////
| _ \| | __ _ _ __ ___ /////////
| |_) | |/ _` | '_ \ / _ \ ///// /////
| __/| | (_| | | | | __/ ///// /////
|_| |_|\__,_|_| |_|\___| ////
////
--------------------------------------------
Project management tool from the future
--------------------------------------------
Select a Action you want to perform:
1) Install
2) Start
3) Stop
4) Restart
5) Upgrade
6) View Logs
7) Backup Data
8) Exit
Action [2]: 1
Begin Installing Plane
Checking for the latest release...
Failed to check for the latest release. Exiting...
Please wait while we check the availability of Docker images for the selected release () with X86_64 support.invalid reference format
X86_64 images are not available for selected release ().
Syncing environment variables...
Updating custom variables...
Invalid arguments supplied
Reacted by kuenzelIT, Tejpal Sahota, gab and Alejandro C.
I can also confirm that the fix by @uncoden is working
It's a bit of a dark pattern to make the community edition harder to install when an install script could easily do all the same steps. Even putting the whole thing under a drop down menu is a dark pattern.
Reacted by thomassaphir, Süleyman KENAR, Wojciech Janota, Lev Kovalenko and gab
#8911 isn't merged, but also would break under some circumstances. I ran into this today and the problem here is that GitHub does not consistently return the json formatted in such a way that this regex: grep -o '"tag_name": "[^"]*"' would catch it, as sometimes it returns: '"tag_name":"[^"]*"' - which is the fix supplied. I suggest instead grep -o '"tag_name":\s*"[^"]*"' which would catch both.
This is a problem and I had time to spin my wheels on this one a bit, so I'll supply the fix as well.
Confirming this on a fresh v1.4.1 self-host install (macOS, Apple Silicon, Docker 29.2.1). setup.sh install aborts right away with Failed to check for the latest release. Exiting....
Since there are now three open PRs fixing the same line, here is a comparison of what each one actually produces, plus the reason the bug is repo dependent.
Why it reproduces on Plane and not everywhere
The REST API returns minified JSON for this repo's releases/latest payload, so there is no space after the colon and '"tag_name": "' never matches:
$ curl -sSL https://api.github.com/repos/makeplane/plane/releases/latest | head -c 60{"url":"https://api.github.com/repos/makeplane/plane/releases/366666730"
$ curl -sSL https://api.github.com/repos/facebook/react/releases/latest | head -c 60{ "url": "https://api.github.com/repos/react/react/releases/356654919"
The Plane payload is ~15 KB (long changelog plus 6 assets), the React one is ~2.3 KB. Adding -H "Accept: application/vnd.github+json" returns pretty printed JSON for the very same Plane URL. So the response shape is not stable, and a fix should handle both rather than swap one hardcoded shape for the other.
Affected lines on preview:
deployments/cli/community/install.sh:60
deployments/swarm/community/swarm.sh:41
Worth noting that checkLatestRelease is called from two places, so this blocks both a fresh install and upgrade on an existing instance.
Comparison of the three open PRs
Run on macOS with the system BSD grep 2.6.0-FreeBSD and BSD sed, against a compact and a pretty fixture:
install.sh has a typo in the sed expression. s/"tag_name":\*"// is a literal \* rather than \s*, so the prefix is never stripped and APP_RELEASE ends up as tag_name:v1.4.1 on both input shapes.
swarm.sh uses \s inside sed. That is a GNU extension, and BSD sed on macOS does not honor it, so the pretty case regresses from currently working to tag_name: v1.4.1.
#9555 and #8911 both use POSIX safe patterns (: * and :[ ]*) and return the correct value on both shapes. #9555 only patches install.sh, which leaves swarm.sh broken. #8911 is the only one that is both correct and complete, so that looks like the one to merge.
then run each grep and sed pair against both files.
Workaround until a fix lands
Patch the downloaded script before running it, which fixes the grep pattern and the sed expression in one pass:
curl -fsSL -o setup.sh https://github.com/makeplane/plane/releases/latest/download/setup.sh
sed -i '''s/"tag_name": "/"tag_name": *"/g' setup.sh # drop the '' on GNU sed
chmod +x setup.sh && ./setup.sh install
Verified: checkLatestRelease returns v1.4.1 after the patch, and the install then completes normally.
Activity
makeplane commentedon Mar 19, 2026
Synced with Plane Workspace 🔄
[GIT-126] [bug]: checkLatestRelease() fails when GitHub API returns compact JSON
dynnian commentedon Mar 24, 2026
The install script for the community edition is broken because of this bug. The solution proposed by @uncoden works flawlessly. By default the setup.sh script always fails like this:
fix: use python3 JSON parser in checkLatestRelease() instead of grep
fix: use python3 JSON parser in checkLatestRelease() instead of grep
GrandNewbien commentedon Apr 9, 2026
I can also confirm that the fix by @uncoden is working
It's a bit of a dark pattern to make the community edition harder to install when an install script could easily do all the same steps. Even putting the whole thing under a drop down menu is a dark pattern.
sjsadowski commentedon Aug 4, 2026
#8911 isn't merged, but also would break under some circumstances. I ran into this today and the problem here is that GitHub does not consistently return the json formatted in such a way that this regex:
grep -o '"tag_name": "[^"]*"'would catch it, as sometimes it returns:'"tag_name":"[^"]*"'- which is the fix supplied. I suggest insteadgrep -o '"tag_name":\s*"[^"]*"'which would catch both.This is a problem and I had time to spin my wheels on this one a bit, so I'll supply the fix as well.
daib-elbuzarov commentedon Aug 8, 2026
Confirming this on a fresh v1.4.1 self-host install (macOS, Apple Silicon, Docker 29.2.1).
setup.sh installaborts right away withFailed to check for the latest release. Exiting....Since there are now three open PRs fixing the same line, here is a comparison of what each one actually produces, plus the reason the bug is repo dependent.
Why it reproduces on Plane and not everywhere
The REST API returns minified JSON for this repo's
releases/latestpayload, so there is no space after the colon and'"tag_name": "'never matches:The Plane payload is ~15 KB (long changelog plus 6 assets), the React one is ~2.3 KB. Adding
-H "Accept: application/vnd.github+json"returns pretty printed JSON for the very same Plane URL. So the response shape is not stable, and a fix should handle both rather than swap one hardcoded shape for the other.Affected lines on
preview:deployments/cli/community/install.sh:60deployments/swarm/community/swarm.sh:41Worth noting that
checkLatestReleaseis called from two places, so this blocks both a fresh install andupgradeon an existing instance.Comparison of the three open PRs
Run on macOS with the system BSD grep 2.6.0-FreeBSD and BSD sed, against a compact and a pretty fixture:
previewv1.4.1install.shtag_name:v1.4.1tag_name: v1.4.1swarm.shv1.4.1tag_name: v1.4.1v1.4.1v1.4.1v1.4.1v1.4.1Two problems in #9548:
install.shhas a typo in the sed expression.s/"tag_name":\*"//is a literal\*rather than\s*, so the prefix is never stripped andAPP_RELEASEends up astag_name:v1.4.1on both input shapes.swarm.shuses\sinside sed. That is a GNU extension, and BSD sed on macOS does not honor it, so the pretty case regresses from currently working totag_name: v1.4.1.#9555 and #8911 both use POSIX safe patterns (
: *and:[ ]*) and return the correct value on both shapes. #9555 only patchesinstall.sh, which leavesswarm.shbroken. #8911 is the only one that is both correct and complete, so that looks like the one to merge.Reproducing the table
then run each grep and sed pair against both files.
Workaround until a fix lands
Patch the downloaded script before running it, which fixes the grep pattern and the sed expression in one pass:
Verified:
checkLatestReleasereturnsv1.4.1after the patch, and the install then completes normally.