badges/shields · warning · NotFound
arch not found
Error message
arch not found
What it means
The Snapcraft version badge's `transform` filters the Snap Store channel-map by architecture, track, then risk. This NotFound is thrown when no channel in the store's channel-map matches the requested `arch` (default amd64 in `handle`). It means the snap has no published release for that CPU architecture.
Source
Thrown at services/snapcraft/snapcraft-version.service.js:68
}),
],
},
},
}
static defaultBadgeData = { label: 'snapcraft' }
static render({ version }) {
return renderVersionBadge({ version })
}
static transform(apiData, track, risk, arch) {
const channelMap = apiData['channel-map']
let filteredChannelMap = channelMap.filter(
({ channel }) => channel.architecture === arch,
)
if (filteredChannelMap.length === 0) {
throw new NotFound({ prettyMessage: 'arch not found' })
}
filteredChannelMap = filteredChannelMap.filter(
({ channel }) => channel.track === track,
)
if (filteredChannelMap.length === 0) {
throw new NotFound({ prettyMessage: 'track not found' })
}
filteredChannelMap = filteredChannelMap.filter(
({ channel }) => channel.risk === risk,
)
if (filteredChannelMap.length === 0) {
throw new NotFound({ prettyMessage: 'risk not found' })
}
return filteredChannelMap[0]
}
async handle({ package: packageName, track, risk }, { arch = 'amd64' }) {View on GitHub (pinned to 766fd8bc89)
Solutions
- Check the snap's store listing (or run `snap info <name>`) to see which architectures it actually supports
- Use the default arch (omit the arch param, defaults to amd64) or pick a supported one like arm64/armhf
- Fix typos in the arch query parameter, using Snap Store naming (amd64, arm64, armhf, i386, ppc64el, s390x)
- If the arch should exist, publish the snap for it (snapcraft --target-arch) and retry
Example fix
// before /badge/snapcraft-version/my-snap?arch=arm // after /badge/snapcraft-version/my-snap?arch=arm64
Defensive patterns
Strategy: try-catch
Validate before calling
const SUPPORTED_ARCHS = ['amd64','arm64','armhf','i386','ppc64el','s390x'];
if (arch && !SUPPORTED_ARCHS.includes(arch)) throw new Error(`unknown arch: ${arch}`); Type guard
const isSupportedArch = (a) => typeof a === 'string' && ['amd64','arm64','armhf','i386','ppc64el','s390x'].includes(a);
Try / catch
try {
const badge = await getSnapcraftVersion({ package: name, track, risk, arch });
} catch (err) {
if (err prettyMessage === 'arch not found') {
// fall back to default arch=amd64 or render 'unsupported arch' badge
} else throw err;
} Prevention
- Look up the snap's supported architectures with `snap info <name>` before choosing the arch param
- Omit arch to accept the amd64 default
- Use exact Snap Store arch names (amd64, arm64, armhf, i386, ppc64el, s390x)
When it happens
Trigger: Calling the /snapcraft-version badge endpoint with an `arch` query param (e.g. arm64, armhf, ppc64el) that the snap does not publish any channel for.
Common situations: Requesting an arch badge for a snap that only supports amd64; typo in arch name (e.g. 'arm' instead of 'armhf'); snap recently published to a new architecture and the requester assumed it exists.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
AI-assisted analysis of badges/shields@766fd8bc89 (2026-08-30).
Data as JSON: /api/errors/23ae84f5e5407cc8.
Report an issue: GitHub.