ComposioHQ/composio · error · Error
Swift package resolution completed but BetterSwiftAX ${fileN
Error message
Swift package resolution completed but BetterSwiftAX ${fileName} was not found. What it means
The patcher found the BetterSwiftAX checkout but one of the specific source files it rewrites (betterSwiftAxFallbackFiles list) is missing, meaning the upstream file was renamed, moved, or split in the resolved version.
Source
Thrown at ts/packages/cli-local-tools/scripts/build-beeper-imessage-binaries.ts:124
const patchBetterSwiftAxForCurrentSdk = async () => {
await $`swift package resolve`.cwd(submodulePath);
const checkoutRoot = path.join(
submodulePath,
'.build/checkouts/BetterSwiftAX/Sources/AccessibilityControl'
);
if (!(await exists(checkoutRoot))) {
throw new Error(
'Swift package resolution completed but the BetterSwiftAX AccessibilityControl checkout was not found.'
);
}
let replacementCount = 0;
for (const fileName of betterSwiftAxFallbackFiles) {
const sourcePath = path.join(checkoutRoot, fileName);
if (!(await exists(sourcePath))) {
throw new Error(
`Swift package resolution completed but BetterSwiftAX ${fileName} was not found.`
);
}
const source = await fs.readFile(sourcePath, 'utf8');
let fileReplacementCount = 0;
const patched = source.replace(betterSwiftAxConstantReferencePattern, constantName => {
fileReplacementCount += 1;
return betterSwiftAxConstantLiteral(constantName);
});
if (patched !== source) {
await fs.chmod(sourcePath, 0o644).catch(() => undefined);
await fs.writeFile(sourcePath, patched, 'utf8');
replacementCount += fileReplacementCount;
}
}
View on GitHub (pinned to 64b1b85502)
Solutions
- Pin BetterSwiftAX back to the last-known-good version in Package.resolved.
- Locate where the constants moved (grep for kAX in .build/checkouts/BetterSwiftAX) and update betterSwiftAxFallbackFiles or the path logic.
Defensive patterns
Strategy: validation
Validate before calling
for (const fileName of betterSwiftAxFallbackFiles) {
if (!(await exists(path.join(checkoutRoot, fileName)))) throw new Error(`missing ${fileName}`);
} Prevention
- Pin BetterSwiftAX to the tested revision.
- When bumping the dependency, diff the Sources tree for the fallback files first.
When it happens
Trigger: The resolved BetterSwiftAX revision no longer contains one of the fallback source files at the expected path inside Sources/AccessibilityControl.
Common situations: Upstream refactor renaming the file containing kAX constant fallbacks; dependency drift after an unpinned resolve.
Related errors
- Swift package resolution completed but the BetterSwiftAX Acc
- File not found: {file}. Please provide a valid file path.
- Refusing to auto-upload "{attempted}": the file does not exi
- Unsupported BetterSwiftAX constant fallback: ${constantName}
- Building Beeper iMessage local-tool binaries requires macOS
AI-assisted analysis of ComposioHQ/composio@64b1b85502 (2026-08-28).
Data as JSON: /api/errors/6d93bf807eb5b5d6.
Report an issue: GitHub.