Skip to content

fix(avm): clearer error when prebuilt release binary is missing#4248

Open
Ansh-699 wants to merge 2 commits into
otter-sec:masterfrom
Ansh-699:fix-avm-4159
Open

fix(avm): clearer error when prebuilt release binary is missing#4248
Ansh-699 wants to merge 2 commits into
otter-sec:masterfrom
Ansh-699:fix-avm-4159

Conversation

@Ansh-699
Copy link
Copy Markdown
Contributor

@Ansh-699 Ansh-699 commented Feb 16, 2026

Fix avm install for <=0.30 by avoiding symlink collisions during source install and improving 404 messaging for missing binaries. Closes #4159.

fixed avm installs for older Anchor versions by installing from source into a temporary root and then moving the built binary into the versioned path, which avoids collisions with the anchor symlink, also improved error handling so missing prebuilt binaries return a clear 404 message and suggest --from-source, instead of a misleading “binary exists” failure.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 16, 2026

@Ansh-699 is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

Comment thread avm/src/lib.rs Outdated
Comment on lines 458 to 469
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
match res.status() {
StatusCode::NOT_FOUND => bail!(
"No prebuilt binary found for version `{version}` (HTTP 404). \
Try `avm install {version} --from-source`."
),
status if !status.is_success() => bail!(
"Failed to download the binary for version `{version}` (status code: {})",
res.status()
),
_ => (),
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@jamie-osec
Copy link
Copy Markdown
Collaborator

Would you mind fixing the conflicts here?

@Ansh-699 Ansh-699 changed the title Fix avm install for legacy versions fix(avm): clearer error when prebuilt release binary is missing May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

avm install fails for versions ≤ 0.30.0 with misleading "binary exists" error & 404 missing assets

2 participants