@expo/build-tools 0.1.151 → 0.1.153

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,24 +23,89 @@ exports.buildErrorHandlers = [
23
23
  regexp: /CDN: trunk URL couldn't be downloaded.* Response: 429 429: Too Many Requests/,
24
24
  createError: () => new TrackedBuildError('COCOAPODS_TO_MANY_REQUEST', 'cocoapods: too many requests'),
25
25
  },
26
+ {
27
+ phase: eas_build_job_1.BuildPhase.INSTALL_DEPENDENCIES,
28
+ // Host key verification failed.
29
+ // fatal: Could not read from remote repository.
30
+ regexp: /Host key verification failed\.\nfatal: Could not read from remote repository/,
31
+ createError: () => new TrackedBuildError('NPM_INSTALL_SSH_AUTHENTICATION', 'Missing ssh key.'),
32
+ },
33
+ {
34
+ phase: eas_build_job_1.BuildPhase.INSTALL_DEPENDENCIES,
35
+ // error functions@1.0.0: The engine "node" is incompatible with this module. Expected version "14". Got "16.13.2"
36
+ // error Found incompatible module.
37
+ regexp: /The engine "node" is incompatible with this module\. Expected version/,
38
+ createError: () => new TrackedBuildError('NODE_ENGINE_INCOMPATIBLE', 'node: Incompatible engine field.'),
39
+ },
40
+ {
41
+ phase: eas_build_job_1.BuildPhase.INSTALL_DEPENDENCIES,
42
+ // error An unexpected error occurred: "https://registry.yarnpkg.com/@react-native/normalize-color/-/normalize-color-2.0.0.tgz: Request failed \"500 Internal Server Error\"".
43
+ // or
44
+ // error An unexpected error occurred: "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz: Request failed \"503 Service Unavailable\"".
45
+ regexp: /An unexpected error occurred: "https:\/\/registry.yarnpkg.com\/.*Request failed \\"5/,
46
+ createError: () => new TrackedBuildError('YARN_REGISTRY_5XX_RESPONSE', 'yarn: 5xx response.'),
47
+ },
26
48
  {
27
49
  phase: eas_build_job_1.BuildPhase.PREBUILD,
28
- regexp: /Input is required, but Expo CLI is in non-interactive mode/,
29
- createError: () => new TrackedBuildError('EXPO_CLI_INPUT_REQUIRED_ERROR', `expo-cli: input required in non-interactive mode`),
50
+ // Input is required, but Expo CLI is in non-interactive mode
51
+ // or
52
+ // CommandError: Input is required, but 'npx expo' is in non-interactive mode.
53
+ regexp: /Input is required, but .* is in non-interactive mode/,
54
+ createError: () => new TrackedBuildError('EXPO_CLI_INPUT_REQUIRED_ERROR', `expo-cli: Input required in non-interactive mode.`),
30
55
  },
31
56
  {
32
57
  platform: eas_build_job_1.Platform.IOS,
33
58
  phase: eas_build_job_1.BuildPhase.PREBUILD,
34
59
  // [03:03:05] [ios.infoPlist]: withIosInfoPlistBaseMod: GoogleService-Info.plist is empty
35
60
  regexp: /withIosInfoPlistBaseMod: GoogleService-Info\.plist is empty/,
36
- createError: () => new TrackedBuildError('EXPO_CLI_EMPTY_GOOGLE_SERVICES_PLIST_ERROR', `expo-cli: empty GoogleService-Info.plist`),
61
+ createError: () => new TrackedBuildError('EXPO_CLI_EMPTY_GOOGLE_SERVICES_PLIST_ERROR', `expo-cli: Empty GoogleService-Info.plist.`),
37
62
  },
38
63
  {
39
64
  platform: eas_build_job_1.Platform.IOS,
40
65
  phase: eas_build_job_1.BuildPhase.PREBUILD,
41
66
  // [01:52:04] [ios.xcodeproj]: withIosXcodeprojBaseMod: Path to GoogleService-Info.plist is not defined. Please specify the `expo.ios.googleServicesFile` field in app.json.
42
67
  regexp: /withIosXcodeprojBaseMod: Path to GoogleService-Info\.plist is not defined/,
43
- createError: () => new TrackedBuildError('EXPO_CLI_NOT_DEFINED_GOOGLE_SERVICES_PLIST_ERROR', `expo-cli: path to GoogleService-Info.plist not defined`),
68
+ createError: () => new TrackedBuildError('EXPO_CLI_NOT_DEFINED_GOOGLE_SERVICES_PLIST_ERROR', `expo-cli: Path to GoogleService-Info.plist is not defined.`),
69
+ },
70
+ {
71
+ phase: eas_build_job_1.BuildPhase.PREBUILD,
72
+ // Error: [android.dangerous]: withAndroidDangerousBaseMod: ENOENT: no such file or directory, open './assets/adaptive-icon.png'
73
+ // at Object.openSync (node:fs:585:3)
74
+ // at readFileSync (node:fs:453:35)
75
+ // at calculateHash (/home/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:14:91)
76
+ // at createCacheKey (/home/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:19:18)
77
+ // at Object.createCacheKeyWithDirectoryAsync (/home/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:24:33)
78
+ // at generateImageAsync (/home/expo/workingdir/build/node_modules/@expo/image-utils/build/Image.js:151:34)
79
+ // at async generateIconAsync (/home/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withAndroidIcons.js:369:11)
80
+ // at async /home/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withAndroidIcons.js:310:21
81
+ // at async Promise.all (index 0)
82
+ // at async generateMultiLayerImageAsync (/home/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withAndroidIcons.js:306:3)
83
+ // or
84
+ // Error: [ios.dangerous]: withIosDangerousBaseMod: ENOENT: no such file or directory, open './assets/images/app_icon_staging.png'
85
+ // at Object.openSync (fs.js:497:3)
86
+ // at readFileSync (fs.js:393:35)
87
+ // at calculateHash (/Users/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:14:91)
88
+ // at createCacheKey (/Users/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:19:18)
89
+ // at Object.createCacheKeyWithDirectoryAsync (/Users/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:24:33)
90
+ // at generateImageAsync (/Users/expo/workingdir/build/node_modules/@expo/image-utils/build/Image.js:151:34)
91
+ // at async setIconsAsync (/Users/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withIosIcons.js:169:15)
92
+ // at async /Users/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withIosIcons.js:71:5
93
+ // at async action (/Users/expo/workingdir/build/node_modules/@expo/config-plugins/build/plugins/withMod.js:235:23)
94
+ // at async interceptingMod (/Users/expo/workingdir/build/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21)
95
+ regexp: /ENOENT: no such file or directory[\s\S]*prebuild-config\/build\/plugins\/icons\/with(Android|Ios)Icons\.js/,
96
+ createError: () => new TrackedBuildError('EXPO_CLI_MISSING_ICON', 'expo-cli: Missing icon.'),
97
+ },
98
+ {
99
+ phase: eas_build_job_1.BuildPhase.PREBUILD,
100
+ // Cannot determine which native SDK version your project uses because the module `expo` is not installed. Please install it with `yarn add expo` and try again.
101
+ regexp: /Cannot determine which native SDK version your project uses because the module `expo` is not installed/,
102
+ createError: () => new TrackedBuildError('EXPO_CLI_EXPO_PACKAGE_MISSING', 'expo-cli: "expo" package missing.'),
103
+ },
104
+ {
105
+ phase: eas_build_job_1.BuildPhase.INSTALL_PODS,
106
+ // The Swift pod `FirebaseCoreInternal` depends upon `GoogleUtilities`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static
107
+ regexp: /The Swift pod .* depends upon .* which does not define modules/,
108
+ createError: () => new TrackedBuildError('SWIFT_POD_INCOMPATIBLE_DEPENDENCY', 'pod: Swift pod depends on a pod that does not define modules.'),
44
109
  },
45
110
  {
46
111
  platform: eas_build_job_1.Platform.IOS,
@@ -49,7 +114,14 @@ exports.buildErrorHandlers = [
49
114
  // [!] No podspec exists at path `/Users/expo/.cocoapods/repos/24-repository-cocoapods-proxy/Specs/1/9/2/libwebp/1.2.0/libwebp.podspec.json`.
50
115
  regexp: /Adding spec repo .* with CDN .*\n\s*\[!\] No podspec exists at path `(.*)`/,
51
116
  // Some pods are hosted on git registries that are not supported e.g. chromium.googlesource.com
52
- createError: (match) => new TrackedBuildError('COCOAPODS_CACHE_INCOMPATIBLE_REPO_ERROR', `cocoapods: missing podspec ${match[1]}`),
117
+ createError: (match) => new TrackedBuildError('COCOAPODS_CACHE_INCOMPATIBLE_REPO_ERROR', `cocoapods: Missing podspec ${match[1]}.`),
118
+ },
119
+ {
120
+ platform: eas_build_job_1.Platform.IOS,
121
+ phase: eas_build_job_1.BuildPhase.INSTALL_PODS,
122
+ // [!] Invalid `Podfile` file: 783: unexpected token at 'info Run CLI with --verbose flag for more details.
123
+ regexp: /\[!\] Invalid `Podfile` file: .* unexpected token at 'info Run CLI with --verbose flag for more details./,
124
+ createError: () => new TrackedBuildError('NODE_ENV_PRODUCTION_DEFINED', 'npm: NODE_ENV=production was defined.'),
53
125
  },
54
126
  ...[eas_build_job_1.BuildPhase.INSTALL_DEPENDENCIES, eas_build_job_1.BuildPhase.PREBUILD].map((phase) => ({
55
127
  phase,
@@ -81,5 +153,72 @@ exports.buildErrorHandlers = [
81
153
  : undefined,
82
154
  createError: () => new TrackedBuildError('COCOAPODS_CACHE_ERROR', `cocoapods: cache error`),
83
155
  },
156
+ {
157
+ phase: eas_build_job_1.BuildPhase.INSTALL_PODS,
158
+ // [!] Invalid `Podfile` file: uninitialized constant Pod::Podfile::FlipperConfiguration.
159
+ regexp: /\[!\] Invalid `Podfile` file/,
160
+ createError: () => new TrackedBuildError('INVALID_PODFILE', 'pod: Invalid Podfile file.'),
161
+ },
162
+ {
163
+ phase: eas_build_job_1.BuildPhase.INSTALL_DEPENDENCIES,
164
+ // info There appears to be trouble with your network connection. Retrying...
165
+ regexp: /info There appears to be trouble with your network connection. Retrying/,
166
+ createError: () => new TrackedBuildError('YARN_INSTALL_TROUBLE_WITH_NETWORK_CONNECTION', 'yarn: There appears to be trouble with your network connection'),
167
+ },
168
+ {
169
+ phase: eas_build_job_1.BuildPhase.RUN_GRADLEW,
170
+ platform: eas_build_job_1.Platform.ANDROID,
171
+ // Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8
172
+ regexp: /Android Gradle plugin requires Java .* to run. You are currently using Java/,
173
+ createError: () => new TrackedBuildError('INCOMPATIBLE_JAVA_VERSION', 'gradle: Incompatible java version.'),
174
+ },
175
+ {
176
+ phase: eas_build_job_1.BuildPhase.RUN_GRADLEW,
177
+ platform: eas_build_job_1.Platform.ANDROID,
178
+ // > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
179
+ // > Android resource compilation failed
180
+ // ERROR:/home/expo/workingdir/build/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: AAPT: error: failed to read PNG signature: file does not start with PNG signature.
181
+ regexp: /AAPT: error: failed to read PNG signature: file does not start with PNG signature/,
182
+ createError: () => new TrackedBuildError('INVALID_PNG_SIGNATURE', 'gradle: Invalid PNG signature.'),
183
+ },
184
+ {
185
+ phase: eas_build_job_1.BuildPhase.RUN_GRADLEW,
186
+ platform: eas_build_job_1.Platform.ANDROID,
187
+ // Execution failed for task ':app:processReleaseGoogleServices'.
188
+ // > Malformed root json
189
+ regexp: /Execution failed for task ':app:processReleaseGoogleServices'.*\s.*Malformed root json/,
190
+ createError: () => new TrackedBuildError('GRADLE_MALFORMED_GOOGLE_SERVICES_JSON', 'gradle: Malformed google-services.json.'),
191
+ },
192
+ {
193
+ phase: eas_build_job_1.BuildPhase.RUN_GRADLEW,
194
+ platform: eas_build_job_1.Platform.ANDROID,
195
+ // Execution failed for task ':app:bundleReleaseJsAndAssets'.
196
+ // > Process 'command 'node'' finished with non-zero exit value 1
197
+ regexp: /Execution failed for task ':app:bundleReleaseJsAndAssets'.*\s.*Process 'command 'node'' finished with non-zero exit value/,
198
+ createError: () => new TrackedBuildError('GRADLE_BUILD_BUNDLER_ERROR', "gradle: ':app:bundleReleaseJsAndAssets' failed."),
199
+ },
200
+ {
201
+ phase: eas_build_job_1.BuildPhase.RUN_FASTLANE,
202
+ platform: eas_build_job_1.Platform.IOS,
203
+ // error: exportArchive: exportOptionsPlist error for key "iCloudContainerEnvironment": expected one of {Development, Production}, but no value was provided
204
+ regexp: /exportArchive: exportOptionsPlist error for key "iCloudContainerEnvironment"/,
205
+ createError: () => new TrackedBuildError('MISSING_ICLOUD_CONTAINER_ENVIRONMENT', 'fastlane: Missing iCloudContainerEnvironment in exportOptionsPlist.'),
206
+ },
207
+ {
208
+ phase: eas_build_job_1.BuildPhase.RUN_FASTLANE,
209
+ platform: eas_build_job_1.Platform.IOS,
210
+ // The following build commands failed:
211
+ // PhaseScriptExecution [CP-User]\ Generate\ app.manifest\ for\ expo-updates /Users/expo/Library/Developer/Xcode/DerivedData/Kenkohub-eqseedlxbgrzjqagscbclhbtstwh/Build/Intermediates.noindex/ArchiveIntermediates/Kenkohub/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/EXUpdates.build/Script-BB6B5FD28815C045A20B2E5E3FEEBD6E.sh (in target 'EXUpdates' from project 'Pods')
212
+ regexp: /The following build commands failed.*\s.*\[CP-User\]\\ Generate\\ app\.manifest\\ for\\ expo-updates/,
213
+ createError: () => new TrackedBuildError('XCODE_BUILD_UPDATES_PHASE_SCRIPT', 'fastlane: Generating app.manifest for expo-updates failed.'),
214
+ },
215
+ {
216
+ phase: eas_build_job_1.BuildPhase.RUN_FASTLANE,
217
+ platform: eas_build_job_1.Platform.IOS,
218
+ // The following build commands failed:
219
+ // PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/expo/Library/Developer/Xcode/DerivedData/cnaxwpahkhcjluhigkcwrturapmm/Build/Intermediates.noindex/ArchiveIntermediates/Test/IntermediateBuildFilesPath/Test.build/Release-iphoneos/Test.build/Script-00DD1BFF151E006B06BC.sh (in target 'Test' from project 'Test')
220
+ regexp: /The following build commands failed.*\s.*PhaseScriptExecution Bundle\\ React\\ Native\\ code\\ and\\ images \/Users\/expo/,
221
+ createError: () => new TrackedBuildError('XCODE_BUILD_BUNDLER_ERROR', 'fastlane: Bundle React Native code and images failed.'),
222
+ },
84
223
  ];
85
224
  //# sourceMappingURL=buildErrorHandlers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildErrorHandlers.js","sourceRoot":"","sources":["../../src/buildErrors/buildErrorHandlers.ts"],"names":[],"mappings":";;;;;;AAAA,uDAA2D;AAC3D,uEAA+C;AAI/C,MAAa,iBAAkB,SAAQ,KAAK;IAC1C,YAAmB,SAAiB,EAAS,OAAe;QAC1D,KAAK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AAC,YAAY;QAC9B,MAAM,EAAE,CAAC,EAAE,GAAG,EAAgB,EAAE,EAAE,CAChC,GAAG,CAAC,6BAA6B;YAC/B,CAAC,CAAC,IAAI,MAAM,CAAC,IAAA,sBAAY,EAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;YAC7D,CAAC,CAAC,SAAS;QACf,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,iBAAiB,CAAC,uBAAuB,EAAE,wBAAwB,CAAC;KAC5F;CACF,CAAC","sourcesContent":["import { BuildPhase, Platform } from '@expo/eas-build-job';\nimport escapeRegExp from 'lodash/escapeRegExp';\n\nimport { ErrorContext, ErrorHandler } from './errors.types';\n\nexport class TrackedBuildError extends Error {\n constructor(public errorCode: string, public message: string) {\n super(message);\n }\n}\n\nexport const buildErrorHandlers: ErrorHandler<TrackedBuildError>[] = [\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n // example log:\n // CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/2/a/e/MultiplatformBleAdapter/0.0.3/MultiplatformBleAdapter.podspec.json Response: 429 429: Too Many Requests\n regexp: /CDN: trunk URL couldn't be downloaded.* Response: 429 429: Too Many Requests/,\n createError: () =>\n new TrackedBuildError('COCOAPODS_TO_MANY_REQUEST', 'cocoapods: too many requests'),\n },\n {\n phase: BuildPhase.PREBUILD,\n regexp: /Input is required, but Expo CLI is in non-interactive mode/,\n createError: () =>\n new TrackedBuildError(\n 'EXPO_CLI_INPUT_REQUIRED_ERROR',\n `expo-cli: input required in non-interactive mode`\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.PREBUILD,\n // [03:03:05] [ios.infoPlist]: withIosInfoPlistBaseMod: GoogleService-Info.plist is empty\n regexp: /withIosInfoPlistBaseMod: GoogleService-Info\\.plist is empty/,\n createError: () =>\n new TrackedBuildError(\n 'EXPO_CLI_EMPTY_GOOGLE_SERVICES_PLIST_ERROR',\n `expo-cli: empty GoogleService-Info.plist`\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.PREBUILD,\n // [01:52:04] [ios.xcodeproj]: withIosXcodeprojBaseMod: Path to GoogleService-Info.plist is not defined. Please specify the `expo.ios.googleServicesFile` field in app.json.\n regexp: /withIosXcodeprojBaseMod: Path to GoogleService-Info\\.plist is not defined/,\n createError: () =>\n new TrackedBuildError(\n 'EXPO_CLI_NOT_DEFINED_GOOGLE_SERVICES_PLIST_ERROR',\n `expo-cli: path to GoogleService-Info.plist not defined`\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n // Adding spec repo `24-repository-cocoapods-proxy` with CDN `http://10.254.24.7:8081/repository/cocoapods-proxy/`\n // [!] No podspec exists at path `/Users/expo/.cocoapods/repos/24-repository-cocoapods-proxy/Specs/1/9/2/libwebp/1.2.0/libwebp.podspec.json`.\n regexp: /Adding spec repo .* with CDN .*\\n\\s*\\[!\\] No podspec exists at path `(.*)`/,\n // Some pods are hosted on git registries that are not supported e.g. chromium.googlesource.com\n createError: (match: RegExpMatchArray) =>\n new TrackedBuildError(\n 'COCOAPODS_CACHE_INCOMPATIBLE_REPO_ERROR',\n `cocoapods: missing podspec ${match[1]}`\n ),\n },\n ...[BuildPhase.INSTALL_DEPENDENCIES, BuildPhase.PREBUILD].map((phase) => ({\n phase,\n // example log:\n // [stderr] WARN tarball tarball data for @typescript-eslint/typescript-estree@5.26.0 (sha512-cozo/GbwixVR0sgfHItz3t1yXu521yn71Wj6PlYCFA3WPhy51CUPkifFKfBis91bDclGmAY45hhaAXVjdn4new==) seems to be corrupted. Trying again.\n regexp: /tarball tarball data for ([^ ]*) .* seems to be corrupted. Trying again/,\n createError: (match: RegExpMatchArray) =>\n new TrackedBuildError('NPM_CORRUPTED_PACKAGE', `npm: corrupted package ${match[1]}`),\n })),\n ...[BuildPhase.INSTALL_DEPENDENCIES, BuildPhase.PREBUILD].map((phase) => ({\n phase,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_NPM_CACHE_URL\n ? new RegExp(escapeRegExp(env.EAS_BUILD_NPM_CACHE_URL))\n : undefined,\n createError: () => new TrackedBuildError('NPM_CACHE_ERROR', `npm: cache error`),\n })),\n {\n platform: Platform.ANDROID,\n phase: BuildPhase.RUN_GRADLEW,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_MAVEN_CACHE_URL\n ? new RegExp(escapeRegExp(env.EAS_BUILD_MAVEN_CACHE_URL))\n : undefined,\n createError: () => new TrackedBuildError('MAVEN_CACHE_ERROR', `maven: cache error`),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_COCOAPODS_CACHE_URL\n ? new RegExp(escapeRegExp(env.EAS_BUILD_COCOAPODS_CACHE_URL))\n : undefined,\n createError: () => new TrackedBuildError('COCOAPODS_CACHE_ERROR', `cocoapods: cache error`),\n },\n];\n"]}
1
+ {"version":3,"file":"buildErrorHandlers.js","sourceRoot":"","sources":["../../src/buildErrors/buildErrorHandlers.ts"],"names":[],"mappings":";;;;;;AAAA,uDAA2D;AAC3D,uEAA+C;AAI/C,MAAa,iBAAkB,SAAQ,KAAK;IAC1C,YAAmB,SAAiB,EAAS,OAAe;QAC1D,KAAK,CAAC,OAAO,CAAC,CAAC;QADE,cAAS,GAAT,SAAS,CAAQ;QAAS,YAAO,GAAP,OAAO,CAAQ;IAE5D,CAAC;CACF;AAJD,8CAIC;AAEY,QAAA,kBAAkB,GAAsC;IACnE;QACE,QAAQ,EAAE,wBAAQ,CAAC,GAAG;QACtB,KAAK,EAAE,0BAAU,CAAC,YAAY;QAC9B,eAAe;QACf,4LAA4L;QAC5L,MAAM,EAAE,8EAA8E;QACtF,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,iBAAiB,CAAC,2BAA2B,EAAE,8BAA8B,CAAC;KACrF;IACD;QACE,KAAK,EAAE,0BAAU,CAAC,oBAAoB;QACtC,gCAAgC;QAChC,gDA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C1B,iEAAiE;QACjE,wBAAwB;QACxB,MAAM,EAAE,wFAAwF;QAChG,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,iBAAiB,CACnB,uCAAuC,EACvC,yCAAyC,CAC1C;KACJ;IACD;QACE,KAAK,EAAE,0BAAU,CAAC,WAAW;QAC7B,QAAQ,EAAE,wBAAQ,CAAC,OAAO;QAC1B,6DAA6D;QAC7D,iEAAiE;QACjE,MAAM,EAAE,2HAA2H;QACnI,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,iBAAiB,CACnB,4BAA4B,EAC5B,iDAAiD,CAClD;KACJ;IACD;QACE,KAAK,EAAE,0BAAU,CAAC,YAAY;QAC9B,QAAQ,EAAE,wBAAQ,CAAC,GAAG;QACtB,4JAA4J;QAC5J,MAAM,EAAE,8EAA8E;QACtF,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,iBAAiB,CACnB,sCAAsC,EACtC,qEAAqE,CACtE;KACJ;IACD;QACE,KAAK,EAAE,0BAAU,CAAC,YAAY;QAC9B,QAAQ,EAAE,wBAAQ,CAAC,GAAG;QACtB,uCAAuC;QACvC,0XAA0X;QAC1X,MAAM,EAAE,sGAAsG;QAC9G,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,iBAAiB,CACnB,kCAAkC,EAClC,4DAA4D,CAC7D;KACJ;IACD;QACE,KAAK,EAAE,0BAAU,CAAC,YAAY;QAC9B,QAAQ,EAAE,wBAAQ,CAAC,GAAG;QACtB,uCAAuC;QACvC,2UAA2U;QAC3U,MAAM,EAAE,2HAA2H;QACnI,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,iBAAiB,CACnB,2BAA2B,EAC3B,uDAAuD,CACxD;KACJ;CACF,CAAC","sourcesContent":["import { BuildPhase, Platform } from '@expo/eas-build-job';\nimport escapeRegExp from 'lodash/escapeRegExp';\n\nimport { ErrorContext, ErrorHandler } from './errors.types';\n\nexport class TrackedBuildError extends Error {\n constructor(public errorCode: string, public message: string) {\n super(message);\n }\n}\n\nexport const buildErrorHandlers: ErrorHandler<TrackedBuildError>[] = [\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n // example log:\n // CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/2/a/e/MultiplatformBleAdapter/0.0.3/MultiplatformBleAdapter.podspec.json Response: 429 429: Too Many Requests\n regexp: /CDN: trunk URL couldn't be downloaded.* Response: 429 429: Too Many Requests/,\n createError: () =>\n new TrackedBuildError('COCOAPODS_TO_MANY_REQUEST', 'cocoapods: too many requests'),\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // Host key verification failed.\n // fatal: Could not read from remote repository.\n regexp: /Host key verification failed\\.\\nfatal: Could not read from remote repository/,\n createError: () => new TrackedBuildError('NPM_INSTALL_SSH_AUTHENTICATION', 'Missing ssh key.'),\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // error functions@1.0.0: The engine \"node\" is incompatible with this module. Expected version \"14\". Got \"16.13.2\"\n // error Found incompatible module.\n regexp: /The engine \"node\" is incompatible with this module\\. Expected version/,\n createError: () =>\n new TrackedBuildError('NODE_ENGINE_INCOMPATIBLE', 'node: Incompatible engine field.'),\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // error An unexpected error occurred: \"https://registry.yarnpkg.com/@react-native/normalize-color/-/normalize-color-2.0.0.tgz: Request failed \\\"500 Internal Server Error\\\"\".\n // or\n // error An unexpected error occurred: \"https://registry.yarnpkg.com/request/-/request-2.88.2.tgz: Request failed \\\"503 Service Unavailable\\\"\".\n regexp: /An unexpected error occurred: \"https:\\/\\/registry.yarnpkg.com\\/.*Request failed \\\\\"5/,\n createError: () => new TrackedBuildError('YARN_REGISTRY_5XX_RESPONSE', 'yarn: 5xx response.'),\n },\n {\n phase: BuildPhase.PREBUILD,\n // Input is required, but Expo CLI is in non-interactive mode\n // or\n // CommandError: Input is required, but 'npx expo' is in non-interactive mode.\n regexp: /Input is required, but .* is in non-interactive mode/,\n createError: () =>\n new TrackedBuildError(\n 'EXPO_CLI_INPUT_REQUIRED_ERROR',\n `expo-cli: Input required in non-interactive mode.`\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.PREBUILD,\n // [03:03:05] [ios.infoPlist]: withIosInfoPlistBaseMod: GoogleService-Info.plist is empty\n regexp: /withIosInfoPlistBaseMod: GoogleService-Info\\.plist is empty/,\n createError: () =>\n new TrackedBuildError(\n 'EXPO_CLI_EMPTY_GOOGLE_SERVICES_PLIST_ERROR',\n `expo-cli: Empty GoogleService-Info.plist.`\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.PREBUILD,\n // [01:52:04] [ios.xcodeproj]: withIosXcodeprojBaseMod: Path to GoogleService-Info.plist is not defined. Please specify the `expo.ios.googleServicesFile` field in app.json.\n regexp: /withIosXcodeprojBaseMod: Path to GoogleService-Info\\.plist is not defined/,\n createError: () =>\n new TrackedBuildError(\n 'EXPO_CLI_NOT_DEFINED_GOOGLE_SERVICES_PLIST_ERROR',\n `expo-cli: Path to GoogleService-Info.plist is not defined.`\n ),\n },\n {\n phase: BuildPhase.PREBUILD,\n // Error: [android.dangerous]: withAndroidDangerousBaseMod: ENOENT: no such file or directory, open './assets/adaptive-icon.png'\n // at Object.openSync (node:fs:585:3)\n // at readFileSync (node:fs:453:35)\n // at calculateHash (/home/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:14:91)\n // at createCacheKey (/home/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:19:18)\n // at Object.createCacheKeyWithDirectoryAsync (/home/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:24:33)\n // at generateImageAsync (/home/expo/workingdir/build/node_modules/@expo/image-utils/build/Image.js:151:34)\n // at async generateIconAsync (/home/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withAndroidIcons.js:369:11)\n // at async /home/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withAndroidIcons.js:310:21\n // at async Promise.all (index 0)\n // at async generateMultiLayerImageAsync (/home/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withAndroidIcons.js:306:3)\n // or\n // Error: [ios.dangerous]: withIosDangerousBaseMod: ENOENT: no such file or directory, open './assets/images/app_icon_staging.png'\n // at Object.openSync (fs.js:497:3)\n // at readFileSync (fs.js:393:35)\n // at calculateHash (/Users/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:14:91)\n // at createCacheKey (/Users/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:19:18)\n // at Object.createCacheKeyWithDirectoryAsync (/Users/expo/workingdir/build/node_modules/@expo/image-utils/build/Cache.js:24:33)\n // at generateImageAsync (/Users/expo/workingdir/build/node_modules/@expo/image-utils/build/Image.js:151:34)\n // at async setIconsAsync (/Users/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withIosIcons.js:169:15)\n // at async /Users/expo/workingdir/build/node_modules/@expo/prebuild-config/build/plugins/icons/withIosIcons.js:71:5\n // at async action (/Users/expo/workingdir/build/node_modules/@expo/config-plugins/build/plugins/withMod.js:235:23)\n // at async interceptingMod (/Users/expo/workingdir/build/node_modules/@expo/config-plugins/build/plugins/withMod.js:126:21)\n regexp: /ENOENT: no such file or directory[\\s\\S]*prebuild-config\\/build\\/plugins\\/icons\\/with(Android|Ios)Icons\\.js/,\n createError: () => new TrackedBuildError('EXPO_CLI_MISSING_ICON', 'expo-cli: Missing icon.'),\n },\n {\n phase: BuildPhase.PREBUILD,\n // Cannot determine which native SDK version your project uses because the module `expo` is not installed. Please install it with `yarn add expo` and try again.\n regexp: /Cannot determine which native SDK version your project uses because the module `expo` is not installed/,\n createError: () =>\n new TrackedBuildError('EXPO_CLI_EXPO_PACKAGE_MISSING', 'expo-cli: \"expo\" package missing.'),\n },\n {\n phase: BuildPhase.INSTALL_PODS,\n // The Swift pod `FirebaseCoreInternal` depends upon `GoogleUtilities`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static\n regexp: /The Swift pod .* depends upon .* which does not define modules/,\n createError: () =>\n new TrackedBuildError(\n 'SWIFT_POD_INCOMPATIBLE_DEPENDENCY',\n 'pod: Swift pod depends on a pod that does not define modules.'\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n // Adding spec repo `24-repository-cocoapods-proxy` with CDN `http://10.254.24.7:8081/repository/cocoapods-proxy/`\n // [!] No podspec exists at path `/Users/expo/.cocoapods/repos/24-repository-cocoapods-proxy/Specs/1/9/2/libwebp/1.2.0/libwebp.podspec.json`.\n regexp: /Adding spec repo .* with CDN .*\\n\\s*\\[!\\] No podspec exists at path `(.*)`/,\n // Some pods are hosted on git registries that are not supported e.g. chromium.googlesource.com\n createError: (match: RegExpMatchArray) =>\n new TrackedBuildError(\n 'COCOAPODS_CACHE_INCOMPATIBLE_REPO_ERROR',\n `cocoapods: Missing podspec ${match[1]}.`\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n // [!] Invalid `Podfile` file: 783: unexpected token at 'info Run CLI with --verbose flag for more details.\n regexp: /\\[!\\] Invalid `Podfile` file: .* unexpected token at 'info Run CLI with --verbose flag for more details./,\n createError: () =>\n new TrackedBuildError('NODE_ENV_PRODUCTION_DEFINED', 'npm: NODE_ENV=production was defined.'),\n },\n ...[BuildPhase.INSTALL_DEPENDENCIES, BuildPhase.PREBUILD].map((phase) => ({\n phase,\n // example log:\n // [stderr] WARN tarball tarball data for @typescript-eslint/typescript-estree@5.26.0 (sha512-cozo/GbwixVR0sgfHItz3t1yXu521yn71Wj6PlYCFA3WPhy51CUPkifFKfBis91bDclGmAY45hhaAXVjdn4new==) seems to be corrupted. Trying again.\n regexp: /tarball tarball data for ([^ ]*) .* seems to be corrupted. Trying again/,\n createError: (match: RegExpMatchArray) =>\n new TrackedBuildError('NPM_CORRUPTED_PACKAGE', `npm: corrupted package ${match[1]}`),\n })),\n ...[BuildPhase.INSTALL_DEPENDENCIES, BuildPhase.PREBUILD].map((phase) => ({\n phase,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_NPM_CACHE_URL\n ? new RegExp(escapeRegExp(env.EAS_BUILD_NPM_CACHE_URL))\n : undefined,\n createError: () => new TrackedBuildError('NPM_CACHE_ERROR', `npm: cache error`),\n })),\n {\n platform: Platform.ANDROID,\n phase: BuildPhase.RUN_GRADLEW,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_MAVEN_CACHE_URL\n ? new RegExp(escapeRegExp(env.EAS_BUILD_MAVEN_CACHE_URL))\n : undefined,\n createError: () => new TrackedBuildError('MAVEN_CACHE_ERROR', `maven: cache error`),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_COCOAPODS_CACHE_URL\n ? new RegExp(escapeRegExp(env.EAS_BUILD_COCOAPODS_CACHE_URL))\n : undefined,\n createError: () => new TrackedBuildError('COCOAPODS_CACHE_ERROR', `cocoapods: cache error`),\n },\n {\n phase: BuildPhase.INSTALL_PODS,\n // [!] Invalid `Podfile` file: uninitialized constant Pod::Podfile::FlipperConfiguration.\n regexp: /\\[!\\] Invalid `Podfile` file/,\n createError: () => new TrackedBuildError('INVALID_PODFILE', 'pod: Invalid Podfile file.'),\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // info There appears to be trouble with your network connection. Retrying...\n regexp: /info There appears to be trouble with your network connection. Retrying/,\n createError: () =>\n new TrackedBuildError(\n 'YARN_INSTALL_TROUBLE_WITH_NETWORK_CONNECTION',\n 'yarn: There appears to be trouble with your network connection'\n ),\n },\n {\n phase: BuildPhase.RUN_GRADLEW,\n platform: Platform.ANDROID,\n // Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8\n regexp: /Android Gradle plugin requires Java .* to run. You are currently using Java/,\n createError: () =>\n new TrackedBuildError('INCOMPATIBLE_JAVA_VERSION', 'gradle: Incompatible java version.'),\n },\n {\n phase: BuildPhase.RUN_GRADLEW,\n platform: Platform.ANDROID,\n // > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable\n // > Android resource compilation failed\n // ERROR:/home/expo/workingdir/build/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: AAPT: error: failed to read PNG signature: file does not start with PNG signature.\n regexp: /AAPT: error: failed to read PNG signature: file does not start with PNG signature/,\n createError: () =>\n new TrackedBuildError('INVALID_PNG_SIGNATURE', 'gradle: Invalid PNG signature.'),\n },\n {\n phase: BuildPhase.RUN_GRADLEW,\n platform: Platform.ANDROID,\n // Execution failed for task ':app:processReleaseGoogleServices'.\n // > Malformed root json\n regexp: /Execution failed for task ':app:processReleaseGoogleServices'.*\\s.*Malformed root json/,\n createError: () =>\n new TrackedBuildError(\n 'GRADLE_MALFORMED_GOOGLE_SERVICES_JSON',\n 'gradle: Malformed google-services.json.'\n ),\n },\n {\n phase: BuildPhase.RUN_GRADLEW,\n platform: Platform.ANDROID,\n // Execution failed for task ':app:bundleReleaseJsAndAssets'.\n // > Process 'command 'node'' finished with non-zero exit value 1\n regexp: /Execution failed for task ':app:bundleReleaseJsAndAssets'.*\\s.*Process 'command 'node'' finished with non-zero exit value/,\n createError: () =>\n new TrackedBuildError(\n 'GRADLE_BUILD_BUNDLER_ERROR',\n \"gradle: ':app:bundleReleaseJsAndAssets' failed.\"\n ),\n },\n {\n phase: BuildPhase.RUN_FASTLANE,\n platform: Platform.IOS,\n // error: exportArchive: exportOptionsPlist error for key \"iCloudContainerEnvironment\": expected one of {Development, Production}, but no value was provided\n regexp: /exportArchive: exportOptionsPlist error for key \"iCloudContainerEnvironment\"/,\n createError: () =>\n new TrackedBuildError(\n 'MISSING_ICLOUD_CONTAINER_ENVIRONMENT',\n 'fastlane: Missing iCloudContainerEnvironment in exportOptionsPlist.'\n ),\n },\n {\n phase: BuildPhase.RUN_FASTLANE,\n platform: Platform.IOS,\n // The following build commands failed:\n //\tPhaseScriptExecution [CP-User]\\ Generate\\ app.manifest\\ for\\ expo-updates /Users/expo/Library/Developer/Xcode/DerivedData/Kenkohub-eqseedlxbgrzjqagscbclhbtstwh/Build/Intermediates.noindex/ArchiveIntermediates/Kenkohub/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/EXUpdates.build/Script-BB6B5FD28815C045A20B2E5E3FEEBD6E.sh (in target 'EXUpdates' from project 'Pods')\n regexp: /The following build commands failed.*\\s.*\\[CP-User\\]\\\\ Generate\\\\ app\\.manifest\\\\ for\\\\ expo-updates/,\n createError: () =>\n new TrackedBuildError(\n 'XCODE_BUILD_UPDATES_PHASE_SCRIPT',\n 'fastlane: Generating app.manifest for expo-updates failed.'\n ),\n },\n {\n phase: BuildPhase.RUN_FASTLANE,\n platform: Platform.IOS,\n // The following build commands failed:\n //\tPhaseScriptExecution Bundle\\ React\\ Native\\ code\\ and\\ images /Users/expo/Library/Developer/Xcode/DerivedData/cnaxwpahkhcjluhigkcwrturapmm/Build/Intermediates.noindex/ArchiveIntermediates/Test/IntermediateBuildFilesPath/Test.build/Release-iphoneos/Test.build/Script-00DD1BFF151E006B06BC.sh (in target 'Test' from project 'Test')\n regexp: /The following build commands failed.*\\s.*PhaseScriptExecution Bundle\\\\ React\\\\ Native\\\\ code\\\\ and\\\\ images \\/Users\\/expo/,\n createError: () =>\n new TrackedBuildError(\n 'XCODE_BUILD_BUNDLER_ERROR',\n 'fastlane: Bundle React Native code and images failed.'\n ),\n },\n];\n"]}
@@ -1,3 +1,3 @@
1
1
  import { errors } from '@expo/eas-build-job';
2
2
  import { ErrorContext } from './errors.types';
3
- export declare function resolveBuildPhaseError(error: any, logLines: string[], errorContext: ErrorContext): errors.BuildError;
3
+ export declare function resolveBuildPhaseErrorAsync(error: any, logLines: string[], errorContext: ErrorContext, buildLogsDirectory: string): Promise<errors.BuildError>;
@@ -1,38 +1,62 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveBuildPhaseError = void 0;
6
+ exports.resolveBuildPhaseErrorAsync = void 0;
4
7
  const eas_build_job_1 = require("@expo/eas-build-job");
8
+ const fs_extra_1 = __importDefault(require("fs-extra"));
9
+ const xcodeBuildLogs_1 = require("../ios/xcodeBuildLogs");
10
+ const errors_types_1 = require("./errors.types");
5
11
  const userErrorHandlers_1 = require("./userErrorHandlers");
6
12
  const buildErrorHandlers_1 = require("./buildErrorHandlers");
7
- function resolveError(errorHandlers, logLines, errorContext) {
13
+ async function maybeReadXcodeBuildLogs(phase, buildLogsDirectory) {
14
+ if (phase !== eas_build_job_1.BuildPhase.RUN_FASTLANE) {
15
+ return;
16
+ }
17
+ try {
18
+ const xcodeBuildLogsPath = await (0, xcodeBuildLogs_1.findXcodeBuildLogsPathAsync)(buildLogsDirectory);
19
+ if (!xcodeBuildLogsPath) {
20
+ return;
21
+ }
22
+ return await fs_extra_1.default.readFile(xcodeBuildLogsPath, 'utf-8');
23
+ }
24
+ catch (err) {
25
+ return undefined;
26
+ }
27
+ }
28
+ function resolveError(errorHandlers, logLines, errorContext, xcodeBuildLogs) {
8
29
  const { job, phase } = errorContext;
9
30
  const { platform } = job;
10
31
  const logs = logLines.join('\n');
11
32
  const handlers = errorHandlers
12
33
  .filter((handler) => handler.platform === platform || !handler.platform)
13
- .filter((handler) => handler.phase === phase || !handler.phase);
34
+ .filter((handler) => (handler.phase === errors_types_1.XCODE_BUILD_PHASE && phase === eas_build_job_1.BuildPhase.RUN_FASTLANE) ||
35
+ handler.phase === phase ||
36
+ !handler.phase);
14
37
  for (const handler of handlers) {
15
38
  const regexp = typeof handler.regexp === 'function' ? handler.regexp(errorContext) : handler.regexp;
16
39
  if (!regexp) {
17
40
  continue;
18
41
  }
19
- const match = logs.match(regexp);
42
+ const match = handler.phase === errors_types_1.XCODE_BUILD_PHASE ? xcodeBuildLogs === null || xcodeBuildLogs === void 0 ? void 0 : xcodeBuildLogs.match(regexp) : logs.match(regexp);
20
43
  if (match) {
21
44
  return handler.createError(match, errorContext);
22
45
  }
23
46
  }
24
47
  return undefined;
25
48
  }
26
- function resolveBuildPhaseError(error, logLines, errorContext) {
49
+ async function resolveBuildPhaseErrorAsync(error, logLines, errorContext, buildLogsDirectory) {
27
50
  var _a, _b, _c;
28
51
  const { phase } = errorContext;
29
52
  if (error instanceof eas_build_job_1.errors.BuildError) {
30
53
  return error;
31
54
  }
55
+ const xcodeBuildLogs = await maybeReadXcodeBuildLogs(phase, buildLogsDirectory);
32
56
  const userFacingError = error instanceof eas_build_job_1.errors.UserFacingError
33
57
  ? error
34
- : (_a = resolveError(userErrorHandlers_1.userErrorHandlers, logLines, errorContext)) !== null && _a !== void 0 ? _a : new eas_build_job_1.errors.UnknownError();
35
- const buildError = resolveError(buildErrorHandlers_1.buildErrorHandlers, logLines, errorContext);
58
+ : (_a = resolveError(userErrorHandlers_1.userErrorHandlers, logLines, errorContext, xcodeBuildLogs)) !== null && _a !== void 0 ? _a : new eas_build_job_1.errors.UnknownError();
59
+ const buildError = resolveError(buildErrorHandlers_1.buildErrorHandlers, logLines, errorContext, xcodeBuildLogs);
36
60
  const isUnknownUserError = !userFacingError ||
37
61
  [
38
62
  eas_build_job_1.errors.ErrorCode.UNKNOWN_ERROR,
@@ -50,5 +74,5 @@ function resolveBuildPhaseError(error, logLines, errorContext) {
50
74
  buildPhase: phase,
51
75
  });
52
76
  }
53
- exports.resolveBuildPhaseError = resolveBuildPhaseError;
77
+ exports.resolveBuildPhaseErrorAsync = resolveBuildPhaseErrorAsync;
54
78
  //# sourceMappingURL=detectError.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"detectError.js","sourceRoot":"","sources":["../../src/buildErrors/detectError.ts"],"names":[],"mappings":";;;AAAA,uDAA6C;AAG7C,2DAAwD;AACxD,6DAA0D;AAE1D,SAAS,YAAY,CACnB,aAAgC,EAChC,QAAkB,EAClB,YAA0B;IAE1B,MAAM,EAAE,GAAG,EAA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YAAY,EAAE,CAAC;IAC3F,MAAM,UAAU,GAAG,YAAY,CAAC,uCAAkB,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;IAE5E,MAAM,kBAAkB,GACtB,CAAC,eAAe;QACf;YACC,sBAAM,CAAC,SAAS,CAAC,aAAa;YAC9B,sBAAM,CAAC,SAAS,CAAC,oBAAoB;YACrC,sBAAM,CAAC,SAAS,CAAC,sBAAsB;SAC3B,CAAC,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;IACrD,MAAM,OAAO,GACX,MAAA,CAAC,kBAAkB,CAAC,CAAC,CAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,mCAAI,eAAe,CAAC,OAAO,CAAC;IAClG,MAAM,SAAS,GACb,MAAA,CAAC,kBAAkB,CAAC,CAAC,CAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,SAAS,CAAC,mCACxE,eAAe,CAAC,SAAS,CAAC;IAE5B,OAAO,IAAI,sBAAM,CAAC,UAAU,CAAC,OAAO,EAAE;QACpC,SAAS;QACT,mBAAmB,EAAE,eAAe,CAAC,SAAS;QAC9C,iBAAiB,EAAE,eAAe,CAAC,OAAO;QAC1C,OAAO,EAAE,eAAe,CAAC,OAAO;QAChC,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,KAAK;KAClB,CAAC,CAAC;AACL,CAAC;AApCD,wDAoCC","sourcesContent":["import { errors } from '@expo/eas-build-job';\n\nimport { ErrorContext, ErrorHandler } from './errors.types';\nimport { userErrorHandlers } from './userErrorHandlers';\nimport { buildErrorHandlers } from './buildErrorHandlers';\n\nfunction resolveError<T extends Error>(\n errorHandlers: ErrorHandler<T>[],\n logLines: string[],\n errorContext: ErrorContext\n): T | undefined {\n const { job, phase } = errorContext;\n const { platform } = job;\n const logs = logLines.join('\\n');\n const handlers = errorHandlers\n .filter((handler) => handler.platform === platform || !handler.platform)\n .filter((handler) => handler.phase === phase || !handler.phase);\n for (const handler of handlers) {\n const regexp =\n typeof handler.regexp === 'function' ? handler.regexp(errorContext) : handler.regexp;\n if (!regexp) {\n continue;\n }\n const match = logs.match(regexp);\n if (match) {\n return handler.createError(match, errorContext);\n }\n }\n return undefined;\n}\n\nexport function resolveBuildPhaseError(\n error: any,\n logLines: string[],\n errorContext: ErrorContext\n): errors.BuildError {\n const { phase } = errorContext;\n if (error instanceof errors.BuildError) {\n return error;\n }\n const userFacingError =\n error instanceof errors.UserFacingError\n ? error\n : resolveError(userErrorHandlers, logLines, errorContext) ?? new errors.UnknownError();\n const buildError = resolveError(buildErrorHandlers, logLines, errorContext);\n\n const isUnknownUserError =\n !userFacingError ||\n ([\n errors.ErrorCode.UNKNOWN_ERROR,\n errors.ErrorCode.UNKNOWN_GRADLE_ERROR,\n errors.ErrorCode.UNKNOWN_FASTLANE_ERROR,\n ] as string[]).includes(userFacingError.errorCode);\n const message =\n (isUnknownUserError ? buildError?.message : userFacingError.message) ?? userFacingError.message;\n const errorCode =\n (isUnknownUserError ? buildError?.errorCode : userFacingError.errorCode) ??\n userFacingError.errorCode;\n\n return new errors.BuildError(message, {\n errorCode,\n userFacingErrorCode: userFacingError.errorCode,\n userFacingMessage: userFacingError.message,\n docsUrl: userFacingError.docsUrl,\n innerError: error,\n buildPhase: phase,\n });\n}\n"]}
1
+ {"version":3,"file":"detectError.js","sourceRoot":"","sources":["../../src/buildErrors/detectError.ts"],"names":[],"mappings":";;;;;;AAAA,uDAAyD;AACzD,wDAA0B;AAE1B,0DAAoE;AAEpE,iDAA+E;AAC/E,2DAAwD;AACxD,6DAA0D;AAE1D,KAAK,UAAU,uBAAuB,CACpC,KAAiB,EACjB,kBAA0B;IAE1B,IAAI,KAAK,KAAK,0BAAU,CAAC,YAAY,EAAE;QACrC,OAAO;KACR;IAED,IAAI;QACF,MAAM,kBAAkB,GAAG,MAAM,IAAA,4CAA2B,EA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,UAAU,uBAAV,UAAU,CAAE,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,SAAS,CAAC,mCACxE,eAAe,CAAC,SAAS,CAAC;IAE5B,OAAO,IAAI,sBAAM,CAAC,UAAU,CAAC,OAAO,EAAE;QACpC,SAAS;QACT,mBAAmB,EAAE,eAAe,CAAC,SAAS;QAC9C,iBAAiB,EAAE,eAAe,CAAC,OAAO;QAC1C,OAAO,EAAE,eAAe,CAAC,OAAO;QAChC,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,KAAK;KAClB,CAAC,CAAC;AACL,CAAC;AAvCD,kEAuCC","sourcesContent":["import { BuildPhase, errors } from '@expo/eas-build-job';\nimport fs from 'fs-extra';\n\nimport { findXcodeBuildLogsPathAsync } from '../ios/xcodeBuildLogs';\n\nimport { ErrorContext, ErrorHandler, XCODE_BUILD_PHASE } from './errors.types';\nimport { userErrorHandlers } from './userErrorHandlers';\nimport { buildErrorHandlers } from './buildErrorHandlers';\n\nasync function maybeReadXcodeBuildLogs(\n phase: BuildPhase,\n buildLogsDirectory: string\n): Promise<string | undefined> {\n if (phase !== BuildPhase.RUN_FASTLANE) {\n return;\n }\n\n try {\n const xcodeBuildLogsPath = await findXcodeBuildLogsPathAsync(buildLogsDirectory);\n\n if (!xcodeBuildLogsPath) {\n return;\n }\n\n return await fs.readFile(xcodeBuildLogsPath, 'utf-8');\n } catch (err: any) {\n return undefined;\n }\n}\n\nfunction resolveError<TError extends Error>(\n errorHandlers: ErrorHandler<TError>[],\n logLines: string[],\n errorContext: ErrorContext,\n xcodeBuildLogs?: string\n): TError | undefined {\n const { job, phase } = errorContext;\n const { platform } = job;\n const logs = logLines.join('\\n');\n const handlers = errorHandlers\n .filter((handler) => handler.platform === platform || !handler.platform)\n .filter(\n (handler) =>\n (handler.phase === XCODE_BUILD_PHASE && phase === BuildPhase.RUN_FASTLANE) ||\n handler.phase === phase ||\n !handler.phase\n );\n\n for (const handler of handlers) {\n const regexp =\n typeof handler.regexp === 'function' ? handler.regexp(errorContext) : handler.regexp;\n if (!regexp) {\n continue;\n }\n const match =\n handler.phase === XCODE_BUILD_PHASE ? xcodeBuildLogs?.match(regexp) : logs.match(regexp);\n\n if (match) {\n return handler.createError(match, errorContext);\n }\n }\n return undefined;\n}\n\nexport async function resolveBuildPhaseErrorAsync(\n error: any,\n logLines: string[],\n errorContext: ErrorContext,\n buildLogsDirectory: string\n): Promise<errors.BuildError> {\n const { phase } = errorContext;\n if (error instanceof errors.BuildError) {\n return error;\n }\n const xcodeBuildLogs = await maybeReadXcodeBuildLogs(phase, buildLogsDirectory);\n const userFacingError =\n error instanceof errors.UserFacingError\n ? error\n : resolveError(userErrorHandlers, logLines, errorContext, xcodeBuildLogs) ??\n new errors.UnknownError();\n const buildError = resolveError(buildErrorHandlers, logLines, errorContext, xcodeBuildLogs);\n\n const isUnknownUserError =\n !userFacingError ||\n ([\n errors.ErrorCode.UNKNOWN_ERROR,\n errors.ErrorCode.UNKNOWN_GRADLE_ERROR,\n errors.ErrorCode.UNKNOWN_FASTLANE_ERROR,\n ] as string[]).includes(userFacingError.errorCode);\n const message =\n (isUnknownUserError ? buildError?.message : userFacingError.message) ?? userFacingError.message;\n const errorCode =\n (isUnknownUserError ? buildError?.errorCode : userFacingError.errorCode) ??\n userFacingError.errorCode;\n\n return new errors.BuildError(message, {\n errorCode,\n userFacingErrorCode: userFacingError.errorCode,\n userFacingMessage: userFacingError.message,\n docsUrl: userFacingError.docsUrl,\n innerError: error,\n buildPhase: phase,\n });\n}\n"]}
@@ -4,9 +4,10 @@ export interface ErrorContext {
4
4
  job: Job;
5
5
  env: Env;
6
6
  }
7
+ export declare const XCODE_BUILD_PHASE = "XCODE_BUILD";
7
8
  export interface ErrorHandler<T extends Error> {
8
9
  regexp: RegExp | ((ctx: ErrorContext) => RegExp | undefined);
9
10
  platform?: Platform;
10
- phase?: BuildPhase;
11
+ phase?: BuildPhase | typeof XCODE_BUILD_PHASE;
11
12
  createError: (matchResult: RegExpMatchArray, errCtx: ErrorContext) => T | undefined;
12
13
  }
@@ -1,3 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.XCODE_BUILD_PHASE = void 0;
4
+ exports.XCODE_BUILD_PHASE = 'XCODE_BUILD';
3
5
  //# sourceMappingURL=errors.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.types.js","sourceRoot":"","sources":["../../src/buildErrors/errors.types.ts"],"names":[],"mappings":"","sourcesContent":["import { BuildPhase, Env, Job, Platform } from '@expo/eas-build-job';\n\nexport interface ErrorContext {\n phase: BuildPhase;\n job: Job;\n env: Env;\n}\n\nexport interface ErrorHandler<T extends Error> {\n regexp: RegExp | ((ctx: ErrorContext) => RegExp | undefined);\n platform?: Platform;\n phase?: BuildPhase;\n createError: (matchResult: RegExpMatchArray, errCtx: ErrorContext) => T | undefined;\n}\n"]}
1
+ {"version":3,"file":"errors.types.js","sourceRoot":"","sources":["../../src/buildErrors/errors.types.ts"],"names":[],"mappings":";;;AAQa,QAAA,iBAAiB,GAAG,aAAa,CAAC","sourcesContent":["import { BuildPhase, Env, Job, Platform } from '@expo/eas-build-job';\n\nexport interface ErrorContext {\n phase: BuildPhase;\n job: Job;\n env: Env;\n}\n\nexport const XCODE_BUILD_PHASE = 'XCODE_BUILD';\n\nexport interface ErrorHandler<T extends Error> {\n regexp: RegExp | ((ctx: ErrorContext) => RegExp | undefined);\n platform?: Platform;\n phase?: BuildPhase | typeof XCODE_BUILD_PHASE;\n createError: (matchResult: RegExpMatchArray, errCtx: ErrorContext) => T | undefined;\n}\n"]}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.userErrorHandlers = void 0;
4
4
  const eas_build_job_1 = require("@expo/eas-build-job");
5
+ const errors_types_1 = require("./errors.types");
5
6
  var UserFacingError = eas_build_job_1.errors.UserFacingError;
6
7
  exports.userErrorHandlers = [
7
8
  {
@@ -49,6 +50,15 @@ exports.userErrorHandlers = [
49
50
  regexp: /Cannot copy google-services\.json/,
50
51
  createError: () => new UserFacingError('EAS_BUILD_MISSING_GOOGLE_SERVICES_JSON_ERROR', '"google-services.json" is missing, make sure that file exists. Remember that EAS Build only uploads the files tracked by git.'),
51
52
  },
53
+ {
54
+ platform: eas_build_job_1.Platform.ANDROID,
55
+ phase: eas_build_job_1.BuildPhase.RUN_GRADLEW,
56
+ // Execution failed for task ':app:processReleaseGoogleServices'.
57
+ // > File google-services.json is missing. The Google Services Plugin cannot function without it.
58
+ // Searched Location:
59
+ regexp: /File google-services\.json is missing\. The Google Services Plugin cannot function without it/,
60
+ createError: () => new UserFacingError('EAS_BUILD_MISSING_GOOGLE_SERVICES_JSON_ERROR', '"google-services.json" is missing, make sure that file exists. Remember that EAS Build only uploads the files tracked by git.'),
61
+ },
52
62
  {
53
63
  platform: eas_build_job_1.Platform.IOS,
54
64
  phase: eas_build_job_1.BuildPhase.PREBUILD,
@@ -123,6 +133,29 @@ You are seeing this error because either:
123
133
  return undefined;
124
134
  },
125
135
  },
136
+ {
137
+ platform: eas_build_job_1.Platform.IOS,
138
+ phase: errors_types_1.XCODE_BUILD_PHASE,
139
+ // Prepare packages
140
+ // Computing target dependency graph and provisioning inputs
141
+ // Create build description
142
+ // Build description signature: 33a5c28977280822abe5e7bd7fe02529
143
+ // Build description path: /Users/expo/Library/Developer/Xcode/DerivedData/testapp-fazozgerxcvvfifkipojsjftgyih/Build/Intermediates.noindex/ArchiveIntermediates/testapp/IntermediateBuildFilesPath/XCBuildData/33a5c28977280822abe5e7bd7fe02529-desc.xcbuild
144
+ // note: Building targets in dependency order
145
+ // /Users/expo/workingdir/build/managed/ios/Pods/Pods.xcodeproj: error: Signing for "EXConstants-EXConstants" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'EXConstants-EXConstants' from project 'Pods')
146
+ // /Users/expo/workingdir/build/managed/ios/Pods/Pods.xcodeproj: error: Signing for "React-Core-AccessibilityResources" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'React-Core-AccessibilityResources' from project 'Pods')
147
+ // warning: Run script build phase '[CP-User] Generate app.manifest for expo-updates' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXUpdates' from project 'Pods')
148
+ // warning: Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'testapp' from project 'testapp')
149
+ // warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'testapp' from project 'testapp')
150
+ // warning: Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'EXConstants' from project 'Pods')
151
+ // /Users/expo/workingdir/build/managed/ios/Pods/Pods.xcodeproj: error: Signing for "EXUpdates-EXUpdates" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'EXUpdates-EXUpdates' from project 'Pods')
152
+ regexp: /error: Signing for "[a-zA-Z-0-9_]+" requires a development team/,
153
+ createError: (_, { job }) => job.type === eas_build_job_1.Workflow.MANAGED
154
+ ? new UserFacingError('XCODE_CODE_SIGNING_ERROR', `Starting from Xcode 14, resource bundles are signed by default, which requires setting the development team for each resource bundle target.
155
+ To resolve this issue, downgrade to an older Xcode version using the "image" field in eas.json, or upgrade to SDK 46 or higher.`, 'https://docs.expo.dev/build-reference/infrastructure/#ios-build-server-configurations')
156
+ : new UserFacingError('XCODE_CODE_SIGNING_ERROR', `Starting from Xcode 14, resource bundles are signed by default, which requires setting the development team for each resource bundle target.
157
+ To resolve this issue, downgrade to an older Xcode version using the "image" field in eas.json, or turn off signing resource bundles in your Podfile: https://expo.fyi/r/disable-bundle-resource-signing`, 'https://docs.expo.dev/build-reference/infrastructure/#ios-build-server-configurations'),
158
+ },
126
159
  {
127
160
  platform: eas_build_job_1.Platform.ANDROID,
128
161
  phase: eas_build_job_1.BuildPhase.RUN_GRADLEW,
@@ -1 +1 @@
1
- {"version":3,"file":"userErrorHandlers.js","sourceRoot":"","sources":["../../src/buildErrors/userErrorHandlers.ts"],"names":[],"mappings":";;;AAAA,uDAA6E;AAI7E,IAAO,eAAe,GAAG,sBAAM,CAAC,eAAe,CAAC;AAEnC,QAAA,iBAAiB,GAAoC;IAChE;QACE,QAAQ,EAAE,wBAAQ,CAAC,GAAG;QACtB,KAAK,EAAE,0BAAU,CAAC,YAAY;QAC9B,MAAM,EAAE,4BAA4B;QACpC,eAAe;QACf,gHAAgH;QAChH,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,eAAe,CACjB,+CAA+C,EAC/C;;qEAE6D,EAC7D,iDAAiD,CAClD;KACJ;IACD;QACE,QAAQ,EAAE,wBAAQ,CAAC,GAAG;QACtB,KAAK,EAAE,0BAAU,CAAC,YAAY;QAC9B,MAAM,EAAE,gDAAgD;QACxD,eAAe;QACf,mPAAmP;QACnP,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,eAAe,CACjB,6CAA6C,EAC7C,iRAAiR,EACjR,iDAAiD,CAClD;KACJ;IACD;QACE,QAAQ,EAAE,wBAAQ,CAAC,OAAO;QAC1B,KAAK,EAAE,0BAAU,CAAC,WAAW;QAC7B,eAAe;QACf,wJAAwJ;QACxJ,MAAM,EAAE,yBAAyB;QACjC,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,eAAe,CACjB,yCAAyC,EACzC,sHAAsH,CACvH;KACJ;IACD;QACE,QAAQ,EAAE,wBAAQ,CAAC,OAAO;QAC1B,KAAK,EAAE,0BAAU,CAAC,WAAW;QAC7B,eAAe;QACf,qIAAqI;QACrI,MAAM,EAAE,oCAAoC;QAC5C,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,eAAe,CACjB,wCAAwC,EAC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{ BuildPhase, errors, Platform, Workflow } from '@expo/eas-build-job';\n\nimport { ErrorHandler } from './errors.types';\n\nimport UserFacingError = errors.UserFacingError;\n\nexport const userErrorHandlers: ErrorHandler<UserFacingError>[] = [\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n regexp: /requires CocoaPods version/,\n // example log:\n // [!] `React` requires CocoaPods version `>= 1.10.1`, which is not satisfied by your current version, `1.10.0`.\n createError: () =>\n new UserFacingError(\n 'EAS_BUILD_UNSUPPORTED_COCOAPODS_VERSION_ERROR',\n `Your project requires a newer version of CocoaPods. You can update it in the build profile in eas.json by either:\n- changing the current version under key \"cocoapods\"\n- switching to an image that supports that version under key \"image\"`,\n 'https://docs.expo.dev/build-reference/eas-json/'\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.RUN_FASTLANE,\n regexp: /Could not find 'bundler' (.*) required by your/,\n // example log:\n // /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'bundler' (2.2.3) required by your /Users/expo/project/build/ios/Gemfile.lock. (Gem::MissingSpecVersionError)\n createError: () =>\n new UserFacingError(\n 'EAS_BUILD_UNSUPPORTED_BUNDLER_VERSION_ERROR',\n `Your project requires a different version of the Ruby \"bundler\" program than the version installed in this EAS Build environment. You can specify which version of \"bundler\" to install by specifying the version under \"build\"→[buildProfileName]→\"ios\"→\"bundler\" in eas.json.`,\n 'https://docs.expo.dev/build-reference/eas-json/'\n ),\n },\n {\n platform: Platform.ANDROID,\n phase: BuildPhase.RUN_GRADLEW,\n // example log:\n // > Failed to read key keyalias from store \"/build/workingdir/build/generic/keystore-5787e6af-3002-4cb7-8a57-3e73d13313c2.jks\": Invalid keystore format\n regexp: /Invalid keystore format/,\n createError: () =>\n new UserFacingError(\n 'EAS_BUILD_INVALID_KEYSTORE_FORMAT_ERROR',\n 'The keystore used in this build is malformed or it has an unsupported type. Make sure you provided the correct file.'\n ),\n },\n {\n platform: Platform.ANDROID,\n phase: BuildPhase.RUN_GRADLEW,\n // example log:\n // > Failed to read key keyalias from store \"/build/workingdir/build/generic/keystore-286069a8-4bb9-48a6-add9-acf6b58ea06d.jks\": null\n regexp: /Failed to read key[^\\n]+from store/,\n createError: () =>\n new UserFacingError(\n 'EAS_BUILD_INVALID_KEYSTORE_ALIAS_ERROR',\n 'The alias specified for this keystore does not exist. Make sure you specified the correct value.'\n ),\n },\n {\n platform: Platform.ANDROID,\n phase: BuildPhase.PREBUILD,\n // example log:\n // [15:42:05] Error: Cannot copy google-services.json from /build/workingdir/build/managed/abc to /build/workingdir/build/managed/android/app/google-services.json\n // or\n // [11:17:29] [android.dangerous]: withAndroidDangerousBaseMod: Cannot copy google-services.json from /home/expo/workingdir/build/test/test-google-services.json to /home/expo/workingdir/build/android/app/google-services.json. Please make sure the source and destination paths exist.\n // [11:17:29] Error: [android.dangerous]: withAndroidDangerousBaseMod: Cannot copy google-services.json from /home/expo/workingdir/build/test/test-google-services.json to /home/expo/workingdir/build/android/app/google-services.json. Please make sure the source and destination paths exist.\n regexp: /Cannot copy google-services\\.json/,\n createError: () =>\n new UserFacingError(\n 'EAS_BUILD_MISSING_GOOGLE_SERVICES_JSON_ERROR',\n '\"google-services.json\" is missing, make sure that file exists. Remember that EAS Build only uploads the files tracked by git.'\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.PREBUILD,\n // example log:\n // [08:44:18] ENOENT: no such file or directory, copyfile '/Users/expo/workingdir/build/managed/abc' -> '/Users/expo/workingdir/build/managed/ios/testapp/GoogleService-Info.plist'\n regexp: /ENOENT: no such file or directory, copyfile .*GoogleService-Info.plist/,\n createError: () =>\n new UserFacingError(\n 'EAS_BUILD_MISSING_GOOGLE_SERVICES_PLIST_ERROR',\n '\"GoogleService-Info.plist\" is missing, make sure that file exists. Remember that EAS Build only uploads the files tracked by git.'\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n // example log:\n // [!] CocoaPods could not find compatible versions for pod \"Firebase/Core\":\n // In snapshot (Podfile.lock):\n // Firebase/Core (= 6.14.0)\n // In Podfile:\n // EXFirebaseCore (from `../node_modules/expo-firebase-core/ios`) was resolved to 3.0.0, which depends on\n // Firebase/Core (= 7.7.0)\n // You have either:\n // * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.\n // * changed the constraints of dependency `Firebase/Core` inside your development pod `EXFirebaseCore`.\n // You should run `pod update Firebase/Core` to apply changes you've made.\n regexp: /CocoaPods could not find compatible versions for pod /,\n createError: (_, { job }) => {\n const usingDefaultCacheConfig = job.cache.key === '' || !job.cache.key;\n return job.type === Workflow.MANAGED\n ? new UserFacingError(\n 'EAS_BUILD_INCOMPATIBLE_PODS_MANAGED_WORKFLOW_ERROR',\n `Compatible versions of some pods could not be resolved.\nYou are seeing this error because either:\n - Versions in the Podfile.lock cached by EAS do not match required values in Podspecs of some of the libraries. To fix that ${\n usingDefaultCacheConfig\n ? 'add the \"cache.key\" field (it can be set to any value) in the build profile in eas.json to invalidate the cache.'\n : 'update value of the \"cache.key\" field in the build profile in eas.json to invalidate the cache.'\n }\n - Some of the pods used in your project depend on different versions of the same pod. See logs for more information.\n`\n )\n : new UserFacingError(\n 'EAS_BUILD_INCOMPATIBLE_PODS_GENERIC_WORKFLOW_ERROR',\n `Compatible versions of some pods could not be resolved.\nYou are seeing this error because either:\n - Versions in the Podfile.lock cached by EAS do not match required values in Podspecs of some of the libraries. To fix that ${\n usingDefaultCacheConfig\n ? 'add the \"cache.key\" field (it can be set to any value) in the build profile in eas.json to invalidate the cache.'\n : 'update value of the \"cache.key\" field in the build profile in eas.json to invalidate the cache.'\n }\n - Some of the pods used in your project depend on different versions of the same pod. See logs for more information.\n`\n );\n },\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // example log:\n // [stderr] error https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz: Integrity check failed for \"react-native\" (computed integrity doesn't match our records, got \"sha512-3jHI2YufrJi7eIABRf/DN/I2yOkmIZ0vAyezTz+PAUJiEs4v//5LLojWEU+W53AZsnuaEMcl/4fVy4bd+OuUbA== sha1-o9QuQTXIkc8VozXPaZIullB9a40=\")\n regexp: /Integrity check failed for \"(.*)\" \\(computed integrity doesn't match our records, got/,\n createError: (matchResult: RegExpMatchArray) => {\n if (matchResult.length >= 2) {\n return new UserFacingError(\n 'EAS_BUILD_YARN_LOCK_CHECKSUM_ERROR',\n `Checksum for package \"${matchResult[1]}\" does not match value in registry. To fix that:\n- run \"yarn cache clean\"\n- remove yarn.lock (or only the section for that package)\n- run \"yarn install --force\"`\n );\n }\n return undefined;\n },\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // example log:\n // yarn install v1.22.17\n // [1/4] Resolving packages...\n // [2/4] Fetching packages...\n // [1/4] Resolving packages...\n // [2/4] Fetching packages...\n // [stderr] error https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: \"ENOENT: no such file or directory, chmod '/Users/expo/Library/Caches/Yarn/v6/npm-jest-util-26.6.2-907535dbe4d5a6cb4c47ac9b926f6af29576cbc1-integrity/node_modules/jest-util/build/pluralize.d.ts'\"\n regexp: /\\[1\\/4\\] Resolving packages...\\s*\\[2\\/4\\] Fetching packages...\\s*\\[1\\/4\\] Resolving packages...\\s*\\[2\\/4\\] Fetching packages.../,\n createError: (matchResult: RegExpMatchArray) => {\n if (matchResult) {\n return new UserFacingError(\n 'EAS_BUILD_YARN_MULTIPLE_INSTANCES_ERROR',\n `One of project dependencies is starting new install process while the main one is still in progress, which might result in corrupted packages. Most likely the reason for error is \"prepare\" script in git-referenced dependency of your project. Learn more: https://github.com/yarnpkg/yarn/issues/7212#issuecomment-493720324`\n );\n }\n return undefined;\n },\n },\n {\n platform: Platform.ANDROID,\n phase: BuildPhase.RUN_GRADLEW,\n regexp: /.*/,\n createError: () =>\n new UserFacingError(\n errors.ErrorCode.UNKNOWN_GRADLE_ERROR,\n 'Gradle build failed with unknown error. See logs for the \"Run gradlew\" phase for more information.'\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.RUN_FASTLANE,\n regexp: /.*/,\n createError: () =>\n new UserFacingError(\n errors.ErrorCode.UNKNOWN_FASTLANE_ERROR,\n `Fastlane build failed with unknown error. See logs for the \"Run fastlane\" and \"Xcode Logs\" phases for more information.\nFastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.`\n ),\n },\n];\n"]}
1
+ {"version":3,"file":"userErrorHandlers.js","sourceRoot":"","sources":["../../src/buildErrors/userErrorHandlers.ts"],"names":[],"mappings":";;;AAAA,uDAA6E;AAE7E,iDAAiE;AAEjE,IAAO,eAAe,GAAG,sBAAM,CAAC,eAAe,CAAC;AAEnC,QAAA,iBAAiB,GAAoC;IAChE;QACE,QAAQ,EAAE,wBAAQ,CAAC,GAAG;QACtB,KAAK,EAAE,0BAAU,CAAC,YAAY;QAC9B,MAAM,EAAE,4BAA4B;QACpC,eAAe;QACf,gHAAgH;QAChH,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,eAAe,CACjB,+CAA+C,EAC/C;;qEAE6D,EAC7D,iDAAiD,CAClD;KACJ;IACD;QACE,QAAQ,EAAE,wBAAQ,CAAC,GAAG;QACtB,KAAK,EAAE,0BAAU,CAAC,YAAY;QAC9B,MAAM,EAAE,gDAAgD;QACxD,eAAe;QACf,mPAAmP;QACnP,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,eAAe,CACjB,6CAA6C,EAC7C,iRAAiR,EACjR,iDAAiD,CAClD;KACJ;IACD;QACE,QAAQ,EAAE,wBAAQ,CAAC,OAAO;QAC1B,KAAK,EAAE,0BAAU,CAAC,WAAW;QAC7B,eAAe;QACf,wJAAwJ;QACxJ,MAAM,EAAE,yBAAyB;QACjC,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,eAAe,CACjB,yCAAyC,EACzC,sHAAsH,CACvH;KACJ;IACD;Q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AQ,CAAC,GAAG;QACtB,KAAK,EAAE,gCAAiB;QACxB,mBAAmB;QACnB,4DAA4D;QAC5D,2BAA2B;QAC3B,gEAAgE;QAChE,6PAA6P;QAC7P,6CAA6C;QAC7C,oQAAoQ;QACpQ,wRAAwR;QACxR,8XAA8X;QAC9X,6VAA6V;QAC7V,kXAAkX;QAClX,6YAA6Y;QAC7Y,4PAA4P;QAC5P,MAAM,EAAE,iEAAiE;QACzE,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAC1B,GAAG,CAAC,IAAI,KAAK,wBAAQ,CAAC,OAAO;YAC3B,CAAC,CAAC,IAAI,eAAe,CACjB,0BAA0B,EAC1B;gIACoH,EACpH,uFAAuF,CACxF;YACH,CAAC,CAAC,IAAI,eAAe,CACjB,0BAA0B,EAC1B;yMAC6L,EAC7L,uFAAuF,CACxF;KACR;IACD;QACE,QAAQ,EAAE,wBAAQ,CAAC,OAAO;QAC1B,KAAK,EAAE,0BAAU,CAAC,WAAW;QAC7B,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,eAAe,CACjB,sBAAM,CAAC,SAAS,CAAC,oBAAoB,EACrC,oGAAoG,CACrG;KACJ;IACD;QACE,QAAQ,EAAE,wBAAQ,CAAC,GAAG;QACtB,KAAK,EAAE,0BAAU,CAAC,YAAY;QAC9B,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,eAAe,CACjB,sBAAM,CAAC,SAAS,CAAC,sBAAsB,EACvC;kLAC0K,CAC3K;KACJ;CACF,CAAC","sourcesContent":["import { BuildPhase, errors, Platform, Workflow } from '@expo/eas-build-job';\n\nimport { ErrorHandler, XCODE_BUILD_PHASE } from './errors.types';\n\nimport UserFacingError = errors.UserFacingError;\n\nexport const userErrorHandlers: ErrorHandler<UserFacingError>[] = [\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n regexp: /requires CocoaPods version/,\n // example log:\n // [!] `React` requires CocoaPods version `>= 1.10.1`, which is not satisfied by your current version, `1.10.0`.\n createError: () =>\n new UserFacingError(\n 'EAS_BUILD_UNSUPPORTED_COCOAPODS_VERSION_ERROR',\n `Your project requires a newer version of CocoaPods. You can update it in the build profile in eas.json by either:\n- changing the current version under key \"cocoapods\"\n- switching to an image that supports that version under key \"image\"`,\n 'https://docs.expo.dev/build-reference/eas-json/'\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.RUN_FASTLANE,\n regexp: /Could not find 'bundler' (.*) required by your/,\n // example log:\n // /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'bundler' (2.2.3) required by your /Users/expo/project/build/ios/Gemfile.lock. (Gem::MissingSpecVersionError)\n createError: () =>\n new UserFacingError(\n 'EAS_BUILD_UNSUPPORTED_BUNDLER_VERSION_ERROR',\n `Your project requires a different version of the Ruby \"bundler\" program than the version installed in this EAS Build environment. You can specify which version of \"bundler\" to install by specifying the version under \"build\"→[buildProfileName]→\"ios\"→\"bundler\" in eas.json.`,\n 'https://docs.expo.dev/build-reference/eas-json/'\n ),\n },\n {\n platform: Platform.ANDROID,\n phase: BuildPhase.RUN_GRADLEW,\n // example log:\n // > Failed to read key keyalias from store \"/build/workingdir/build/generic/keystore-5787e6af-3002-4cb7-8a57-3e73d13313c2.jks\": Invalid keystore format\n regexp: /Invalid keystore format/,\n createError: () =>\n new UserFacingError(\n 'EAS_BUILD_INVALID_KEYSTORE_FORMAT_ERROR',\n 'The keystore used in this build is malformed or it has an unsupported type. Make sure you provided the correct file.'\n ),\n },\n {\n platform: Platform.ANDROID,\n phase: BuildPhase.RUN_GRADLEW,\n // example log:\n // > Failed to read key keyalias from store \"/build/workingdir/build/generic/keystore-286069a8-4bb9-48a6-add9-acf6b58ea06d.jks\": null\n regexp: /Failed to read key[^\\n]+from store/,\n createError: () =>\n new UserFacingError(\n 'EAS_BUILD_INVALID_KEYSTORE_ALIAS_ERROR',\n 'The alias specified for this keystore does not exist. Make sure you specified the correct value.'\n ),\n },\n {\n platform: Platform.ANDROID,\n phase: BuildPhase.PREBUILD,\n // example log:\n // [15:42:05] Error: Cannot copy google-services.json from /build/workingdir/build/managed/abc to /build/workingdir/build/managed/android/app/google-services.json\n // or\n // [11:17:29] [android.dangerous]: withAndroidDangerousBaseMod: Cannot copy google-services.json from /home/expo/workingdir/build/test/test-google-services.json to /home/expo/workingdir/build/android/app/google-services.json. Please make sure the source and destination paths exist.\n // [11:17:29] Error: [android.dangerous]: withAndroidDangerousBaseMod: Cannot copy google-services.json from /home/expo/workingdir/build/test/test-google-services.json to /home/expo/workingdir/build/android/app/google-services.json. Please make sure the source and destination paths exist.\n regexp: /Cannot copy google-services\\.json/,\n createError: () =>\n new UserFacingError(\n 'EAS_BUILD_MISSING_GOOGLE_SERVICES_JSON_ERROR',\n '\"google-services.json\" is missing, make sure that file exists. Remember that EAS Build only uploads the files tracked by git.'\n ),\n },\n {\n platform: Platform.ANDROID,\n phase: BuildPhase.RUN_GRADLEW,\n // Execution failed for task ':app:processReleaseGoogleServices'.\n // > File google-services.json is missing. The Google Services Plugin cannot function without it.\n // Searched Location:\n regexp: /File google-services\\.json is missing\\. The Google Services Plugin cannot function without it/,\n createError: () =>\n new UserFacingError(\n 'EAS_BUILD_MISSING_GOOGLE_SERVICES_JSON_ERROR',\n '\"google-services.json\" is missing, make sure that file exists. Remember that EAS Build only uploads the files tracked by git.'\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.PREBUILD,\n // example log:\n // [08:44:18] ENOENT: no such file or directory, copyfile '/Users/expo/workingdir/build/managed/abc' -> '/Users/expo/workingdir/build/managed/ios/testapp/GoogleService-Info.plist'\n regexp: /ENOENT: no such file or directory, copyfile .*GoogleService-Info.plist/,\n createError: () =>\n new UserFacingError(\n 'EAS_BUILD_MISSING_GOOGLE_SERVICES_PLIST_ERROR',\n '\"GoogleService-Info.plist\" is missing, make sure that file exists. Remember that EAS Build only uploads the files tracked by git.'\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n // example log:\n // [!] CocoaPods could not find compatible versions for pod \"Firebase/Core\":\n // In snapshot (Podfile.lock):\n // Firebase/Core (= 6.14.0)\n // In Podfile:\n // EXFirebaseCore (from `../node_modules/expo-firebase-core/ios`) was resolved to 3.0.0, which depends on\n // Firebase/Core (= 7.7.0)\n // You have either:\n // * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.\n // * changed the constraints of dependency `Firebase/Core` inside your development pod `EXFirebaseCore`.\n // You should run `pod update Firebase/Core` to apply changes you've made.\n regexp: /CocoaPods could not find compatible versions for pod /,\n createError: (_, { job }) => {\n const usingDefaultCacheConfig = job.cache.key === '' || !job.cache.key;\n return job.type === Workflow.MANAGED\n ? new UserFacingError(\n 'EAS_BUILD_INCOMPATIBLE_PODS_MANAGED_WORKFLOW_ERROR',\n `Compatible versions of some pods could not be resolved.\nYou are seeing this error because either:\n - Versions in the Podfile.lock cached by EAS do not match required values in Podspecs of some of the libraries. To fix that ${\n usingDefaultCacheConfig\n ? 'add the \"cache.key\" field (it can be set to any value) in the build profile in eas.json to invalidate the cache.'\n : 'update value of the \"cache.key\" field in the build profile in eas.json to invalidate the cache.'\n }\n - Some of the pods used in your project depend on different versions of the same pod. See logs for more information.\n`\n )\n : new UserFacingError(\n 'EAS_BUILD_INCOMPATIBLE_PODS_GENERIC_WORKFLOW_ERROR',\n `Compatible versions of some pods could not be resolved.\nYou are seeing this error because either:\n - Versions in the Podfile.lock cached by EAS do not match required values in Podspecs of some of the libraries. To fix that ${\n usingDefaultCacheConfig\n ? 'add the \"cache.key\" field (it can be set to any value) in the build profile in eas.json to invalidate the cache.'\n : 'update value of the \"cache.key\" field in the build profile in eas.json to invalidate the cache.'\n }\n - Some of the pods used in your project depend on different versions of the same pod. See logs for more information.\n`\n );\n },\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // example log:\n // [stderr] error https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz: Integrity check failed for \"react-native\" (computed integrity doesn't match our records, got \"sha512-3jHI2YufrJi7eIABRf/DN/I2yOkmIZ0vAyezTz+PAUJiEs4v//5LLojWEU+W53AZsnuaEMcl/4fVy4bd+OuUbA== sha1-o9QuQTXIkc8VozXPaZIullB9a40=\")\n regexp: /Integrity check failed for \"(.*)\" \\(computed integrity doesn't match our records, got/,\n createError: (matchResult: RegExpMatchArray) => {\n if (matchResult.length >= 2) {\n return new UserFacingError(\n 'EAS_BUILD_YARN_LOCK_CHECKSUM_ERROR',\n `Checksum for package \"${matchResult[1]}\" does not match value in registry. To fix that:\n- run \"yarn cache clean\"\n- remove yarn.lock (or only the section for that package)\n- run \"yarn install --force\"`\n );\n }\n return undefined;\n },\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // example log:\n // yarn install v1.22.17\n // [1/4] Resolving packages...\n // [2/4] Fetching packages...\n // [1/4] Resolving packages...\n // [2/4] Fetching packages...\n // [stderr] error https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: \"ENOENT: no such file or directory, chmod '/Users/expo/Library/Caches/Yarn/v6/npm-jest-util-26.6.2-907535dbe4d5a6cb4c47ac9b926f6af29576cbc1-integrity/node_modules/jest-util/build/pluralize.d.ts'\"\n regexp: /\\[1\\/4\\] Resolving packages...\\s*\\[2\\/4\\] Fetching packages...\\s*\\[1\\/4\\] Resolving packages...\\s*\\[2\\/4\\] Fetching packages.../,\n createError: (matchResult: RegExpMatchArray) => {\n if (matchResult) {\n return new UserFacingError(\n 'EAS_BUILD_YARN_MULTIPLE_INSTANCES_ERROR',\n `One of project dependencies is starting new install process while the main one is still in progress, which might result in corrupted packages. Most likely the reason for error is \"prepare\" script in git-referenced dependency of your project. Learn more: https://github.com/yarnpkg/yarn/issues/7212#issuecomment-493720324`\n );\n }\n return undefined;\n },\n },\n {\n platform: Platform.IOS,\n phase: XCODE_BUILD_PHASE,\n // Prepare packages\n // Computing target dependency graph and provisioning inputs\n // Create build description\n // Build description signature: 33a5c28977280822abe5e7bd7fe02529\n // Build description path: /Users/expo/Library/Developer/Xcode/DerivedData/testapp-fazozgerxcvvfifkipojsjftgyih/Build/Intermediates.noindex/ArchiveIntermediates/testapp/IntermediateBuildFilesPath/XCBuildData/33a5c28977280822abe5e7bd7fe02529-desc.xcbuild\n // note: Building targets in dependency order\n // /Users/expo/workingdir/build/managed/ios/Pods/Pods.xcodeproj: error: Signing for \"EXConstants-EXConstants\" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'EXConstants-EXConstants' from project 'Pods')\n // /Users/expo/workingdir/build/managed/ios/Pods/Pods.xcodeproj: error: Signing for \"React-Core-AccessibilityResources\" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'React-Core-AccessibilityResources' from project 'Pods')\n // warning: Run script build phase '[CP-User] Generate app.manifest for expo-updates' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking \"Based on dependency analysis\" in the script phase. (in target 'EXUpdates' from project 'Pods')\n // warning: Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking \"Based on dependency analysis\" in the script phase. (in target 'testapp' from project 'testapp')\n // warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking \"Based on dependency analysis\" in the script phase. (in target 'testapp' from project 'testapp')\n // warning: Run script build phase '[CP-User] Generate app.config for prebuilt Constants.manifest' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking \"Based on dependency analysis\" in the script phase. (in target 'EXConstants' from project 'Pods')\n // /Users/expo/workingdir/build/managed/ios/Pods/Pods.xcodeproj: error: Signing for \"EXUpdates-EXUpdates\" requires a development team. Select a development team in the Signing & Capabilities editor. (in target 'EXUpdates-EXUpdates' from project 'Pods')\n regexp: /error: Signing for \"[a-zA-Z-0-9_]+\" requires a development team/,\n createError: (_, { job }) =>\n job.type === Workflow.MANAGED\n ? new UserFacingError(\n 'XCODE_CODE_SIGNING_ERROR',\n `Starting from Xcode 14, resource bundles are signed by default, which requires setting the development team for each resource bundle target.\nTo resolve this issue, downgrade to an older Xcode version using the \"image\" field in eas.json, or upgrade to SDK 46 or higher.`,\n 'https://docs.expo.dev/build-reference/infrastructure/#ios-build-server-configurations'\n )\n : new UserFacingError(\n 'XCODE_CODE_SIGNING_ERROR',\n `Starting from Xcode 14, resource bundles are signed by default, which requires setting the development team for each resource bundle target.\nTo resolve this issue, downgrade to an older Xcode version using the \"image\" field in eas.json, or turn off signing resource bundles in your Podfile: https://expo.fyi/r/disable-bundle-resource-signing`,\n 'https://docs.expo.dev/build-reference/infrastructure/#ios-build-server-configurations'\n ),\n },\n {\n platform: Platform.ANDROID,\n phase: BuildPhase.RUN_GRADLEW,\n regexp: /.*/,\n createError: () =>\n new UserFacingError(\n errors.ErrorCode.UNKNOWN_GRADLE_ERROR,\n 'Gradle build failed with unknown error. See logs for the \"Run gradlew\" phase for more information.'\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.RUN_FASTLANE,\n regexp: /.*/,\n createError: () =>\n new UserFacingError(\n errors.ErrorCode.UNKNOWN_FASTLANE_ERROR,\n `Fastlane build failed with unknown error. See logs for the \"Run fastlane\" and \"Xcode Logs\" phases for more information.\nFastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.`\n ),\n },\n];\n"]}
package/dist/context.d.ts CHANGED
@@ -78,7 +78,7 @@ export declare class BuildContext<TJob extends Job> {
78
78
  markBuildPhaseSkipped(): void;
79
79
  markBuildPhaseHasWarnings(): void;
80
80
  uploadArtifacts(type: ArtifactType, paths: string[], logger?: bunyan): Promise<void>;
81
- private handleBuildPhaseError;
81
+ private handleBuildPhaseErrorAsync;
82
82
  private setBuildPhase;
83
83
  private endCurrentBuildPhase;
84
84
  private getEnvironmentSecrets;
package/dist/context.js CHANGED
@@ -76,7 +76,7 @@ class BuildContext {
76
76
  return result;
77
77
  }
78
78
  catch (err) {
79
- const resolvedError = this.handleBuildPhaseError(err, buildPhase);
79
+ const resolvedError = await this.handleBuildPhaseErrorAsync(err, buildPhase);
80
80
  this.endCurrentBuildPhase({ result: eas_build_job_1.BuildPhaseResult.FAIL });
81
81
  throw resolvedError;
82
82
  }
@@ -93,12 +93,12 @@ class BuildContext {
93
93
  this.artifacts[type] = url;
94
94
  }
95
95
  }
96
- handleBuildPhaseError(err, buildPhase) {
97
- const buildError = (0, detectError_1.resolveBuildPhaseError)(err, this.logBuffer.getPhaseLogs(buildPhase), {
96
+ async handleBuildPhaseErrorAsync(err, buildPhase) {
97
+ const buildError = await (0, detectError_1.resolveBuildPhaseErrorAsync)(err, this.logBuffer.getPhaseLogs(buildPhase), {
98
98
  job: this.job,
99
99
  phase: buildPhase,
100
100
  env: this.env,
101
- });
101
+ }, this.buildLogsDirectory);
102
102
  if (buildError.errorCode === eas_build_job_1.errors.ErrorCode.UNKNOWN_ERROR) {
103
103
  // leaving message empty, website will display err.stack which already includes err.message
104
104
  this.logger.error({ err }, '');
@@ -137,25 +137,20 @@ class BuildContext {
137
137
  this.buildPhaseHasWarnings = false;
138
138
  }
139
139
  getEnvironmentSecrets(job) {
140
- var _a, _b;
141
- if (Array.isArray((_a = job === null || job === void 0 ? void 0 : job.secrets) === null || _a === void 0 ? void 0 : _a.environmentSecrets)) {
142
- const environmentSecrets = {};
143
- for (const { name, type, value } of job.secrets.environmentSecrets) {
144
- if (type === eas_build_job_1.EnvironmentSecretType.STRING) {
145
- environmentSecrets[name] = value;
146
- }
147
- else {
148
- environmentSecrets[name] = (0, environmentSecrets_1.createTemporaryEnvironmentSecretFile)(this.environmentSecrectsDirectory, value);
149
- }
150
- }
151
- return environmentSecrets;
152
- }
153
- else if ((_b = job === null || job === void 0 ? void 0 : job.secrets) === null || _b === void 0 ? void 0 : _b.environmentSecrets) {
154
- return Object.assign({}, job.secrets.environmentSecrets);
155
- }
156
- else {
140
+ var _a;
141
+ if (!((_a = job === null || job === void 0 ? void 0 : job.secrets) === null || _a === void 0 ? void 0 : _a.environmentSecrets)) {
157
142
  return {};
158
143
  }
144
+ const environmentSecrets = {};
145
+ for (const { name, type, value } of job.secrets.environmentSecrets) {
146
+ if (type === eas_build_job_1.EnvironmentSecretType.STRING) {
147
+ environmentSecrets[name] = value;
148
+ }
149
+ else {
150
+ environmentSecrets[name] = (0, environmentSecrets_1.createTemporaryEnvironmentSecretFile)(this.environmentSecrectsDirectory, value);
151
+ }
152
+ }
153
+ return environmentSecrets;
159
154
  }
160
155
  }
161
156
  exports.BuildContext = BuildContext;
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,uDAS6B;AAK7B,2DAA+E;AAC/E,2DAAmE;AACnE,iDAAkD;AAClD,mEAAkF;AAElF,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,2DAA2C,CAAA;IAC3C,mDAAmC,CAAA;IACnC;;OAEG;IACH,qDAAqC,CAAA;AACvC,CAAC,EAPW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAOvB;AAkCD,MAAa,oBAAqB,SAAQ,KAAK;CAAG;AAAlD,oDAAkD;AAElD,MAAa,YAAY;IAiCvB,YAA4B,GAAS,EAAE,OAA4B;;QAAvC,QAAG,GAAH,GAAG,CAAM;QAb9B,cAAS,GAAc,EAAE,CAAC;QASzB,sBAAiB,GAAG,KAAK,CAAC;QAC1B,0BAAqB,GAAG,KAAK,CAAC;QAIpC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;QACpC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC;QAC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,CAAC,GAAG,IAAA,yDAAoC,EAC7D,IAAI,CAAC,4BAA4B,EACjC,KAAK,CACN,CAAC;iBACH;aACF;YACD,OAAO,kBAAkB,CAAC;SAC3B;aAAM,IAAI,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,0CAAE,kBAAkB,EAAE;YAC3C,yBAAY,GAAG,CAAC,OAAO,CAAC,kBAAkB,EAAG;SAC9C;aAAM;YACL,OAAO,EAAE,CAAC;SACX;IACH,CAAC;CACF;AAnMD,oCAmMC","sourcesContent":["import path from 'path';\n\nimport {\n BuildPhase,\n BuildPhaseResult,\n Job,\n LogMarker,\n Env,\n errors,\n Metadata,\n EnvironmentSecretType,\n} from '@expo/eas-build-job';\nimport { ExpoConfig } from '@expo/config';\nimport { bunyan } from '@expo/logger';\nimport { SpawnPromise, SpawnOptions, SpawnResult } from '@expo/turtle-spawn';\n\nimport { PackageManager, resolvePackageManager } from './utils/packageManager';\nimport { resolveBuildPhaseError } from './buildErrors/detectError';\nimport { readAppConfig } from './utils/appConfig';\nimport { createTemporaryEnvironmentSecretFile } from './utils/environmentSecrets';\n\nexport enum ArtifactType {\n APPLICATION_ARCHIVE = 'APPLICATION_ARCHIVE',\n BUILD_ARTIFACTS = 'BUILD_ARTIFACTS',\n /**\n * @deprecated\n */\n XCODE_BUILD_LOGS = 'XCODE_BUILD_LOGS',\n}\n\nexport type Artifacts = Partial<Record<ArtifactType, string>>;\n\nexport interface CacheManager {\n saveCache(ctx: BuildContext<Job>): Promise<void>;\n restoreCache(ctx: BuildContext<Job>): Promise<void>;\n}\n\nexport interface LogBuffer {\n getLogs(): string[];\n getPhaseLogs(buildPhase: string): string[];\n}\n\nexport interface BuildContextOptions {\n workingdir: string;\n logger: bunyan;\n logBuffer: LogBuffer;\n env: Env;\n cacheManager?: CacheManager;\n /**\n * @deprecated\n */\n runGlobalExpoCliCommand: (args: string, options: SpawnOptions) => SpawnPromise<SpawnResult>;\n uploadArtifacts: (type: ArtifactType, paths: string[], logger?: bunyan) => Promise<string | null>;\n reportError?: (\n msg: string,\n err?: Error,\n options?: { tags?: Record<string, string>; extras?: Record<string, string> }\n ) => void;\n skipNativeBuild?: boolean;\n metadata?: Metadata;\n}\n\nexport class SkipNativeBuildError extends Error {}\n\nexport class BuildContext<TJob extends Job> {\n public readonly workingdir: string;\n public logger: bunyan;\n public readonly logBuffer: LogBuffer;\n public readonly env: Env;\n public readonly cacheManager?: CacheManager;\n /**\n * @deprecated\n */\n public readonly runGlobalExpoCliCommand: (\n args: string,\n options: SpawnOptions\n ) => SpawnPromise<SpawnResult>;\n public readonly reportError?: (\n msg: string,\n err?: Error,\n options?: { tags?: Record<string, string>; extras?: Record<string, string> }\n ) => void;\n public readonly metadata?: Metadata;\n public readonly skipNativeBuild?: boolean;\n public artifacts: Artifacts = {};\n\n private readonly defaultLogger: bunyan;\n private readonly _uploadArtifacts: (\n type: ArtifactType,\n paths: string[],\n logger?: bunyan\n ) => Promise<string | null>;\n private buildPhase?: BuildPhase;\n private buildPhaseSkipped = false;\n private buildPhaseHasWarnings = false;\n private _appConfig?: ExpoConfig;\n\n constructor(public readonly job: TJob, options: BuildContextOptions) {\n this.workingdir = options.workingdir;\n this.defaultLogger = options.logger;\n this.logger = this.defaultLogger;\n this.logBuffer = options.logBuffer;\n this.cacheManager = options.cacheManager;\n this.runGlobalExpoCliCommand = options.runGlobalExpoCliCommand;\n this._uploadArtifacts = options.uploadArtifacts;\n this.reportError = options.reportError;\n this.metadata = options.metadata;\n this.skipNativeBuild = options.skipNativeBuild;\n\n const environmentSecrets = this.getEnvironmentSecrets(job);\n this.env = {\n ...options.env,\n ...job?.builderEnvironment?.env,\n ...environmentSecrets,\n };\n }\n\n public get buildDirectory(): string {\n return path.join(this.workingdir, 'build');\n }\n public get buildLogsDirectory(): string {\n return path.join(this.workingdir, 'logs');\n }\n public get environmentSecrectsDirectory(): string {\n return path.join(this.workingdir, 'environment-secrets');\n }\n public get reactNativeProjectDirectory(): string {\n return path.join(this.buildDirectory, this.job.projectRootDirectory);\n }\n public get packageManager(): PackageManager {\n return resolvePackageManager(this.reactNativeProjectDirectory);\n }\n public get appConfig(): ExpoConfig {\n if (!this._appConfig) {\n this._appConfig = readAppConfig(this.reactNativeProjectDirectory, this.env, this.logger).exp;\n }\n return this._appConfig;\n }\n\n public async runBuildPhase<T>(\n buildPhase: BuildPhase,\n phase: () => Promise<T>,\n {\n doNotMarkStart = false,\n doNotMarkEnd = false,\n }: {\n doNotMarkStart?: boolean;\n doNotMarkEnd?: boolean;\n } = {}\n ): Promise<T> {\n try {\n this.setBuildPhase(buildPhase, { doNotMarkStart });\n const result = await phase();\n const buildPhaseResult: BuildPhaseResult = this.buildPhaseSkipped\n ? BuildPhaseResult.SKIPPED\n : this.buildPhaseHasWarnings\n ? BuildPhaseResult.WARNING\n : BuildPhaseResult.SUCCESS;\n this.endCurrentBuildPhase({ result: buildPhaseResult, doNotMarkEnd });\n return result;\n } catch (err: any) {\n const resolvedError = this.handleBuildPhaseError(err, buildPhase);\n this.endCurrentBuildPhase({ result: BuildPhaseResult.FAIL });\n throw resolvedError;\n }\n }\n\n public markBuildPhaseSkipped(): void {\n this.buildPhaseSkipped = true;\n }\n\n public markBuildPhaseHasWarnings(): void {\n this.buildPhaseHasWarnings = true;\n }\n\n public async uploadArtifacts(\n type: ArtifactType,\n paths: string[],\n logger?: bunyan\n ): Promise<void> {\n const url = await this._uploadArtifacts(type, paths, logger);\n if (url) {\n this.artifacts[type] = url;\n }\n }\n\n private handleBuildPhaseError(err: any, buildPhase: BuildPhase): errors.BuildError {\n const buildError = resolveBuildPhaseError(err, this.logBuffer.getPhaseLogs(buildPhase), {\n job: this.job,\n phase: buildPhase,\n env: this.env,\n });\n if (buildError.errorCode === errors.ErrorCode.UNKNOWN_ERROR) {\n // leaving message empty, website will display err.stack which already includes err.message\n this.logger.error({ err }, '');\n } else {\n this.logger.error(`Error: ${buildError.userFacingMessage}`);\n }\n return buildError;\n }\n\n private setBuildPhase(buildPhase: BuildPhase, { doNotMarkStart = false } = {}): void {\n if (this.buildPhase) {\n if (this.buildPhase === buildPhase) {\n return;\n } else {\n this.logger.info(\n { marker: LogMarker.END_PHASE, result: BuildPhaseResult.UNKNOWN },\n `End phase: ${this.buildPhase}`\n );\n this.logger = this.defaultLogger;\n }\n }\n this.buildPhase = buildPhase;\n this.logger = this.defaultLogger.child({ phase: buildPhase });\n if (!doNotMarkStart) {\n this.logger.info({ marker: LogMarker.START_PHASE }, `Start phase: ${this.buildPhase}`);\n }\n }\n\n private endCurrentBuildPhase({\n result,\n doNotMarkEnd = false,\n }: {\n result: BuildPhaseResult;\n doNotMarkEnd?: boolean;\n }): void {\n if (!this.buildPhase) {\n return;\n }\n if (!doNotMarkEnd) {\n this.logger.info({ marker: LogMarker.END_PHASE, result }, `End phase: ${this.buildPhase}`);\n }\n this.logger = this.defaultLogger;\n this.buildPhase = undefined;\n this.buildPhaseSkipped = false;\n this.buildPhaseHasWarnings = false;\n }\n\n private getEnvironmentSecrets(job: TJob): Record<string, string> {\n if (Array.isArray(job?.secrets?.environmentSecrets)) {\n const environmentSecrets: Record<string, string> = {};\n for (const { name, type, value } of job.secrets.environmentSecrets) {\n if (type === EnvironmentSecretType.STRING) {\n environmentSecrets[name] = value;\n } else {\n environmentSecrets[name] = createTemporaryEnvironmentSecretFile(\n this.environmentSecrectsDirectory,\n value\n );\n }\n }\n return environmentSecrets;\n } else if (job?.secrets?.environmentSecrets) {\n return { ...job.secrets.environmentSecrets };\n } else {\n return {};\n }\n }\n}\n"]}
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,uDAS6B;AAK7B,2DAA+E;AAC/E,2DAAwE;AACxE,iDAAkD;AAClD,mEAAkF;AAElF,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,2DAA2C,CAAA;IAC3C,mDAAmC,CAAA;IACnC;;OAEG;IACH,qDAAqC,CAAA;AACvC,CAAC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AG,KAAK,CAAC;QAC/B,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;IACrC,CAAC;IAEO,qBAAqB,CAAC,GAAS;;QACrC,IAAI,CAAC,CAAA,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,0CAAE,kBAAkB,CAAA,EAAE;YACrC,OAAO,EAAE,CAAC;SACX;QAED,MAAM,kBAAkB,GAA2B,EAAE,CAAC;QACtD,KAAK,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,GAAG,CAAC,OAAO,CAAC,kBAAkB,EAAE;YAClE,IAAI,IAAI,KAAK,qCAAqB,CAAC,MAAM,EAAE;gBACzC,kBAAkB,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;aAClC;iBAAM;gBACL,kBAAkB,CAAC,IAAI,CAAC,GAAG,IAAA,yDAAoC,EAC7D,IAAI,CAAC,4BAA4B,EACjC,KAAK,CACN,CAAC;aACH;SACF;QACD,OAAO,kBAAkB,CAAC;IAC5B,CAAC;CACF;AAzMD,oCAyMC","sourcesContent":["import path from 'path';\n\nimport {\n BuildPhase,\n BuildPhaseResult,\n Job,\n LogMarker,\n Env,\n errors,\n Metadata,\n EnvironmentSecretType,\n} from '@expo/eas-build-job';\nimport { ExpoConfig } from '@expo/config';\nimport { bunyan } from '@expo/logger';\nimport { SpawnPromise, SpawnOptions, SpawnResult } from '@expo/turtle-spawn';\n\nimport { PackageManager, resolvePackageManager } from './utils/packageManager';\nimport { resolveBuildPhaseErrorAsync } from './buildErrors/detectError';\nimport { readAppConfig } from './utils/appConfig';\nimport { createTemporaryEnvironmentSecretFile } from './utils/environmentSecrets';\n\nexport enum ArtifactType {\n APPLICATION_ARCHIVE = 'APPLICATION_ARCHIVE',\n BUILD_ARTIFACTS = 'BUILD_ARTIFACTS',\n /**\n * @deprecated\n */\n XCODE_BUILD_LOGS = 'XCODE_BUILD_LOGS',\n}\n\nexport type Artifacts = Partial<Record<ArtifactType, string>>;\n\nexport interface CacheManager {\n saveCache(ctx: BuildContext<Job>): Promise<void>;\n restoreCache(ctx: BuildContext<Job>): Promise<void>;\n}\n\nexport interface LogBuffer {\n getLogs(): string[];\n getPhaseLogs(buildPhase: string): string[];\n}\n\nexport interface BuildContextOptions {\n workingdir: string;\n logger: bunyan;\n logBuffer: LogBuffer;\n env: Env;\n cacheManager?: CacheManager;\n /**\n * @deprecated\n */\n runGlobalExpoCliCommand: (args: string, options: SpawnOptions) => SpawnPromise<SpawnResult>;\n uploadArtifacts: (type: ArtifactType, paths: string[], logger?: bunyan) => Promise<string | null>;\n reportError?: (\n msg: string,\n err?: Error,\n options?: { tags?: Record<string, string>; extras?: Record<string, string> }\n ) => void;\n skipNativeBuild?: boolean;\n metadata?: Metadata;\n}\n\nexport class SkipNativeBuildError extends Error {}\n\nexport class BuildContext<TJob extends Job> {\n public readonly workingdir: string;\n public logger: bunyan;\n public readonly logBuffer: LogBuffer;\n public readonly env: Env;\n public readonly cacheManager?: CacheManager;\n /**\n * @deprecated\n */\n public readonly runGlobalExpoCliCommand: (\n args: string,\n options: SpawnOptions\n ) => SpawnPromise<SpawnResult>;\n public readonly reportError?: (\n msg: string,\n err?: Error,\n options?: { tags?: Record<string, string>; extras?: Record<string, string> }\n ) => void;\n public readonly metadata?: Metadata;\n public readonly skipNativeBuild?: boolean;\n public artifacts: Artifacts = {};\n\n private readonly defaultLogger: bunyan;\n private readonly _uploadArtifacts: (\n type: ArtifactType,\n paths: string[],\n logger?: bunyan\n ) => Promise<string | null>;\n private buildPhase?: BuildPhase;\n private buildPhaseSkipped = false;\n private buildPhaseHasWarnings = false;\n private _appConfig?: ExpoConfig;\n\n constructor(public readonly job: TJob, options: BuildContextOptions) {\n this.workingdir = options.workingdir;\n this.defaultLogger = options.logger;\n this.logger = this.defaultLogger;\n this.logBuffer = options.logBuffer;\n this.cacheManager = options.cacheManager;\n this.runGlobalExpoCliCommand = options.runGlobalExpoCliCommand;\n this._uploadArtifacts = options.uploadArtifacts;\n this.reportError = options.reportError;\n this.metadata = options.metadata;\n this.skipNativeBuild = options.skipNativeBuild;\n\n const environmentSecrets = this.getEnvironmentSecrets(job);\n this.env = {\n ...options.env,\n ...job?.builderEnvironment?.env,\n ...environmentSecrets,\n };\n }\n\n public get buildDirectory(): string {\n return path.join(this.workingdir, 'build');\n }\n public get buildLogsDirectory(): string {\n return path.join(this.workingdir, 'logs');\n }\n public get environmentSecrectsDirectory(): string {\n return path.join(this.workingdir, 'environment-secrets');\n }\n public get reactNativeProjectDirectory(): string {\n return path.join(this.buildDirectory, this.job.projectRootDirectory);\n }\n public get packageManager(): PackageManager {\n return resolvePackageManager(this.reactNativeProjectDirectory);\n }\n public get appConfig(): ExpoConfig {\n if (!this._appConfig) {\n this._appConfig = readAppConfig(this.reactNativeProjectDirectory, this.env, this.logger).exp;\n }\n return this._appConfig;\n }\n\n public async runBuildPhase<T>(\n buildPhase: BuildPhase,\n phase: () => Promise<T>,\n {\n doNotMarkStart = false,\n doNotMarkEnd = false,\n }: {\n doNotMarkStart?: boolean;\n doNotMarkEnd?: boolean;\n } = {}\n ): Promise<T> {\n try {\n this.setBuildPhase(buildPhase, { doNotMarkStart });\n const result = await phase();\n const buildPhaseResult: BuildPhaseResult = this.buildPhaseSkipped\n ? BuildPhaseResult.SKIPPED\n : this.buildPhaseHasWarnings\n ? BuildPhaseResult.WARNING\n : BuildPhaseResult.SUCCESS;\n this.endCurrentBuildPhase({ result: buildPhaseResult, doNotMarkEnd });\n return result;\n } catch (err: any) {\n const resolvedError = await this.handleBuildPhaseErrorAsync(err, buildPhase);\n this.endCurrentBuildPhase({ result: BuildPhaseResult.FAIL });\n throw resolvedError;\n }\n }\n\n public markBuildPhaseSkipped(): void {\n this.buildPhaseSkipped = true;\n }\n\n public markBuildPhaseHasWarnings(): void {\n this.buildPhaseHasWarnings = true;\n }\n\n public async uploadArtifacts(\n type: ArtifactType,\n paths: string[],\n logger?: bunyan\n ): Promise<void> {\n const url = await this._uploadArtifacts(type, paths, logger);\n if (url) {\n this.artifacts[type] = url;\n }\n }\n\n private async handleBuildPhaseErrorAsync(\n err: any,\n buildPhase: BuildPhase\n ): Promise<errors.BuildError> {\n const buildError = await resolveBuildPhaseErrorAsync(\n err,\n this.logBuffer.getPhaseLogs(buildPhase),\n {\n job: this.job,\n phase: buildPhase,\n env: this.env,\n },\n this.buildLogsDirectory\n );\n if (buildError.errorCode === errors.ErrorCode.UNKNOWN_ERROR) {\n // leaving message empty, website will display err.stack which already includes err.message\n this.logger.error({ err }, '');\n } else {\n this.logger.error(`Error: ${buildError.userFacingMessage}`);\n }\n return buildError;\n }\n\n private setBuildPhase(buildPhase: BuildPhase, { doNotMarkStart = false } = {}): void {\n if (this.buildPhase) {\n if (this.buildPhase === buildPhase) {\n return;\n } else {\n this.logger.info(\n { marker: LogMarker.END_PHASE, result: BuildPhaseResult.UNKNOWN },\n `End phase: ${this.buildPhase}`\n );\n this.logger = this.defaultLogger;\n }\n }\n this.buildPhase = buildPhase;\n this.logger = this.defaultLogger.child({ phase: buildPhase });\n if (!doNotMarkStart) {\n this.logger.info({ marker: LogMarker.START_PHASE }, `Start phase: ${this.buildPhase}`);\n }\n }\n\n private endCurrentBuildPhase({\n result,\n doNotMarkEnd = false,\n }: {\n result: BuildPhaseResult;\n doNotMarkEnd?: boolean;\n }): void {\n if (!this.buildPhase) {\n return;\n }\n if (!doNotMarkEnd) {\n this.logger.info({ marker: LogMarker.END_PHASE, result }, `End phase: ${this.buildPhase}`);\n }\n this.logger = this.defaultLogger;\n this.buildPhase = undefined;\n this.buildPhaseSkipped = false;\n this.buildPhaseHasWarnings = false;\n }\n\n private getEnvironmentSecrets(job: TJob): Record<string, string> {\n if (!job?.secrets?.environmentSecrets) {\n return {};\n }\n\n const environmentSecrets: Record<string, string> = {};\n for (const { name, type, value } of job.secrets.environmentSecrets) {\n if (type === EnvironmentSecretType.STRING) {\n environmentSecrets[name] = value;\n } else {\n environmentSecrets[name] = createTemporaryEnvironmentSecretFile(\n this.environmentSecrectsDirectory,\n value\n );\n }\n }\n return environmentSecrets;\n }\n}\n"]}
@@ -1,3 +1,4 @@
1
1
  import { Ios } from '@expo/eas-build-job';
2
2
  import { BuildContext } from '../context';
3
3
  export declare function findAndUploadXcodeBuildLogsAsync(ctx: BuildContext<Ios.Job>): Promise<void>;
4
+ export declare function findXcodeBuildLogsPathAsync(buildLogsDirectory: string): Promise<string | undefined>;
@@ -3,14 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.findAndUploadXcodeBuildLogsAsync = void 0;
6
+ exports.findXcodeBuildLogsPathAsync = exports.findAndUploadXcodeBuildLogsAsync = void 0;
7
7
  const os_1 = __importDefault(require("os"));
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const fast_glob_1 = __importDefault(require("fast-glob"));
10
10
  const context_1 = require("../context");
11
11
  async function findAndUploadXcodeBuildLogsAsync(ctx) {
12
12
  try {
13
- const xcodeBuildLogsPath = await findXcodeBuildLogsPathAsync(ctx);
13
+ const xcodeBuildLogsPath = await findXcodeBuildLogsPathAsync(ctx.buildLogsDirectory);
14
14
  if (xcodeBuildLogsPath) {
15
15
  await ctx.uploadArtifacts(context_1.ArtifactType.XCODE_BUILD_LOGS, [xcodeBuildLogsPath], ctx.logger);
16
16
  }
@@ -20,13 +20,14 @@ async function findAndUploadXcodeBuildLogsAsync(ctx) {
20
20
  }
21
21
  }
22
22
  exports.findAndUploadXcodeBuildLogsAsync = findAndUploadXcodeBuildLogsAsync;
23
- async function findXcodeBuildLogsPathAsync(ctx) {
23
+ async function findXcodeBuildLogsPathAsync(buildLogsDirectory) {
24
24
  var _a, _b;
25
- const customLogPaths = (await (0, fast_glob_1.default)('*.log', { cwd: ctx.buildLogsDirectory })).map((filename) => path_1.default.join(ctx.buildLogsDirectory, filename));
25
+ const customLogPaths = (await (0, fast_glob_1.default)('*.log', { cwd: buildLogsDirectory })).map((filename) => path_1.default.join(buildLogsDirectory, filename));
26
26
  if (customLogPaths[0]) {
27
27
  return customLogPaths[0];
28
28
  }
29
29
  const fallbackLogPaths = (await (0, fast_glob_1.default)('Library/Logs/gym/*.log', { cwd: os_1.default.homedir() })).map((relativePath) => path_1.default.join(os_1.default.homedir(), relativePath));
30
30
  return (_b = (_a = customLogPaths[0]) !== null && _a !== void 0 ? _a : fallbackLogPaths[0]) !== null && _b !== void 0 ? _b : undefined;
31
31
  }
32
+ exports.findXcodeBuildLogsPathAsync = findXcodeBuildLogsPathAsync;
32
33
  //# sourceMappingURL=xcodeBuildLogs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"xcodeBuildLogs.js","sourceRoot":"","sources":["../../src/ios/xcodeBuildLogs.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAGxB,0DAA2B;AAE3B,wCAAwD;AAEjD,KAAK,UAAU,gCAAgC,CAAC,GAA0B;IAC/E,IAAI;QACF,MAAM,kBAAkB,GAAG,MAAM,2BAA2B,CAAC,GAAG,CAAC,CAAC;QAClE,IAAI,kBAAkB,EAAE;YACtB,MAAM,GAAG,CAAC,eAAe,CAAC,sBAAY,CAAC,gBAAgB,EAAE,CAAC,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;SAC5F;KACF;IAAC,OAAO,GAAQ,EAAE;QACjB,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,mCAAmC,CAAC,CAAC;KAChE;AACH,CAAC;AATD,4EASC;AAED,KAAK,UAAU,2BAA2B,CACxC,GAA0B;;IAE1B,MAAM,cAAc,GAAG,CAAC,MAAM,IAAA,mBAAE,EAAC,OAAO,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAC3F,cAAI,CAAC,IAAI,CAAC,GAAG,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAC5C,CAAC;IACF,IAAI,cAAc,CAAC,CAAC,CAAC,EAAE;QACrB,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC;KAC1B;IACD,MAAM,gBAAgB,GAAG,CACvB,MAAM,IAAA,mBAAE,EAAC,wBAAwB,EAAE,EAAE,GAAG,EAAE,YAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAC1D,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,cAAI,CAAC,IAAI,CAAC,YAAE,CAAC,OAAO,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC;IAE/D,OAAO,MAAA,MAAA,cAAc,CAAC,CAAC,CAAC,mCAAI,gBAAgB,CAAC,CAAC,CAAC,mCAAI,SAAS,CAAC;AAC/D,CAAC","sourcesContent":["import os from 'os';\nimport path from 'path';\n\nimport { Ios } from '@expo/eas-build-job';\nimport fg from 'fast-glob';\n\nimport { ArtifactType, BuildContext } from '../context';\n\nexport async function findAndUploadXcodeBuildLogsAsync(ctx: BuildContext<Ios.Job>): Promise<void> {\n try {\n const xcodeBuildLogsPath = await findXcodeBuildLogsPathAsync(ctx);\n if (xcodeBuildLogsPath) {\n await ctx.uploadArtifacts(ArtifactType.XCODE_BUILD_LOGS, [xcodeBuildLogsPath], ctx.logger);\n }\n } catch (err: any) {\n ctx.logger.debug({ err }, 'Failed to upload Xcode build logs');\n }\n}\n\nasync function findXcodeBuildLogsPathAsync(\n ctx: BuildContext<Ios.Job>\n): Promise<string | undefined> {\n const customLogPaths = (await fg('*.log', { cwd: ctx.buildLogsDirectory })).map((filename) =>\n path.join(ctx.buildLogsDirectory, filename)\n );\n if (customLogPaths[0]) {\n return customLogPaths[0];\n }\n const fallbackLogPaths = (\n await fg('Library/Logs/gym/*.log', { cwd: os.homedir() })\n ).map((relativePath) => path.join(os.homedir(), relativePath));\n\n return customLogPaths[0] ?? fallbackLogPaths[0] ?? undefined;\n}\n"]}
1
+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AC,CAAC,CAAC,mCAAI,gBAAgB,CAAC,CAAC,CAAC,mCAAI,SAAS,CAAC;AAC/D,CAAC;AAdD,kEAcC","sourcesContent":["import os from 'os';\nimport path from 'path';\n\nimport { Ios } from '@expo/eas-build-job';\nimport fg from 'fast-glob';\n\nimport { ArtifactType, BuildContext } from '../context';\n\nexport async function findAndUploadXcodeBuildLogsAsync(ctx: BuildContext<Ios.Job>): Promise<void> {\n try {\n const xcodeBuildLogsPath = await findXcodeBuildLogsPathAsync(ctx.buildLogsDirectory);\n if (xcodeBuildLogsPath) {\n await ctx.uploadArtifacts(ArtifactType.XCODE_BUILD_LOGS, [xcodeBuildLogsPath], ctx.logger);\n }\n } catch (err: any) {\n ctx.logger.debug({ err }, 'Failed to upload Xcode build logs');\n }\n}\n\nexport async function findXcodeBuildLogsPathAsync(\n buildLogsDirectory: string\n): Promise<string | undefined> {\n const customLogPaths = (await fg('*.log', { cwd: buildLogsDirectory })).map((filename) =>\n path.join(buildLogsDirectory, filename)\n );\n if (customLogPaths[0]) {\n return customLogPaths[0];\n }\n const fallbackLogPaths = (\n await fg('Library/Logs/gym/*.log', { cwd: os.homedir() })\n ).map((relativePath) => path.join(os.homedir(), relativePath));\n\n return customLogPaths[0] ?? fallbackLogPaths[0] ?? undefined;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/build-tools",
3
- "version": "0.1.151",
3
+ "version": "0.1.153",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -22,7 +22,7 @@
22
22
  "@expo/config": "7.0.1",
23
23
  "@expo/config-plugins": "5.0.1",
24
24
  "@expo/downloader": "0.0.21",
25
- "@expo/eas-build-job": "0.2.92",
25
+ "@expo/eas-build-job": "0.2.94",
26
26
  "@expo/logger": "0.0.24",
27
27
  "@expo/package-manager": "0.0.54",
28
28
  "@expo/plist": "^0.0.11",