Skip to content

Commit bc8e60d

Browse files
authored
[build-tools] Handle ASC SDK version issue (90725) (#3464)
## Why UNKNOWN submit failures include App Store Connect SDK compatibility error `90725`. This should be surfaced as actionable EAS guidance (rebuild with newer iOS SDK/Xcode image) instead of generic unknown. ## How - add `90725` detection in `upload_to_asc` failed-state handling - throw `EAS_UPLOAD_TO_ASC_SDK_VERSION_ISSUE` with EAS-specific remediation - include docs URL to iOS build image/Xcode configuration docs - add unit tests for `isSdkVersionIssueError` ## Examples - https://expo.dev/uuid/019cbbe7-9d71-7c90-80b5-a98870478265 - https://expo.dev/uuid/019cbf52-3cbd-7491-b35e-c3fc2f24afc9 - https://expo.dev/uuid/019cbf4f-41d9-7ab7-8e85-e53596526a82 ## Test Plan - `yarn --cwd packages/build-tools jest-unit src/steps/functions/__tests__/uploadToAsc.test.ts` - `yarn --cwd packages/build-tools typecheck` - `yarn fmt`
1 parent 99b8d67 commit bc8e60d

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

packages/build-tools/src/steps/functions/__tests__/uploadToAsc.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
isClosedVersionTrainError,
33
isInvalidBundleIdentifierError,
44
isMissingPurposeStringError,
5+
isSdkVersionIssueError,
56
parseMissingUsageDescriptionKeys,
67
} from '../uploadToAsc';
78

@@ -58,6 +59,20 @@ describe(isMissingPurposeStringError, () => {
5859
});
5960
});
6061

62+
describe(isSdkVersionIssueError, () => {
63+
it('returns true when all errors are SDK-version-issue codes', () => {
64+
expect(isSdkVersionIssueError([{ code: '90725' }, { code: '90725' }])).toBe(true);
65+
});
66+
67+
it('returns false when any other error code is present', () => {
68+
expect(isSdkVersionIssueError([{ code: '90725' }, { code: '90062' }])).toBe(false);
69+
});
70+
71+
it('returns false when there are no errors', () => {
72+
expect(isSdkVersionIssueError([])).toBe(false);
73+
});
74+
});
75+
6176
describe(parseMissingUsageDescriptionKeys, () => {
6277
it('extracts missing UsageDescription keys from ASC messages', () => {
6378
expect(

packages/build-tools/src/steps/functions/uploadToAsc.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,17 @@ export function createUploadToAscBuildFunction(): BuildFunction {
266266
}
267267

268268
if (state.state === 'FAILED') {
269+
if (isSdkVersionIssueError(errors)) {
270+
throw new UserError(
271+
'EAS_UPLOAD_TO_ASC_SDK_VERSION_ISSUE',
272+
'Build upload was rejected by App Store Connect because the IPA was built with an iOS SDK that is too old for current App Store Connect requirements. ' +
273+
'In an Expo project, this usually means the build used an outdated EAS iOS image or the project still depends on an Expo SDK / native setup that does not support the required Xcode toolchain. ' +
274+
'Upgrade to a supported Expo SDK if needed and/or select a newer iOS image in `eas.json`, rebuild, and submit again.',
275+
{
276+
docsUrl: 'https://docs.expo.dev/workflow/upgrading-expo-sdk-walkthrough/',
277+
}
278+
);
279+
}
269280
if (isInvalidBundleIdentifierError(errors)) {
270281
const ipaInfoResult = await asyncResult(readIpaInfoAsync(ipaPath));
271282
const ipaBundleIdentifier = ipaInfoResult.ok
@@ -331,6 +342,10 @@ export function isClosedVersionTrainError(messages: { code: string }[]): boolean
331342
);
332343
}
333344

345+
export function isSdkVersionIssueError(messages: { code: string }[]): boolean {
346+
return messages.length > 0 && messages.every(message => message.code === '90725');
347+
}
348+
334349
export function isInvalidBundleIdentifierError(messages: { code: string }[]): boolean {
335350
return (
336351
messages.length > 0 && messages.every(message => ['90054', '90055'].includes(message.code))

0 commit comments

Comments
 (0)