@expo/build-tools 0.1.151 → 0.1.152

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"]}
@@ -49,6 +49,15 @@ exports.userErrorHandlers = [
49
49
  regexp: /Cannot copy google-services\.json/,
50
50
  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
51
  },
52
+ {
53
+ platform: eas_build_job_1.Platform.ANDROID,
54
+ phase: eas_build_job_1.BuildPhase.RUN_GRADLEW,
55
+ // Execution failed for task ':app:processReleaseGoogleServices'.
56
+ // > File google-services.json is missing. The Google Services Plugin cannot function without it.
57
+ // Searched Location:
58
+ regexp: /File google-services\.json is missing\. The Google Services Plugin cannot function without it/,
59
+ 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.'),
60
+ },
52
61
  {
53
62
  platform: eas_build_job_1.Platform.IOS,
54
63
  phase: eas_build_job_1.BuildPhase.PREBUILD,
@@ -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,KA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AAE,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 } 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;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,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f,OAAO,IAAI,eAAe,CACxB,yCAAyC,EACzC,kUAAkU,CACnU,CAAC;aACH;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;KACF;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 } 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.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.js CHANGED
@@ -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,GA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ACrC,CAAC;IAEO,qBAAqB,CAAC,GAAS;;QACrC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,0CAAE,kBAAkB,CAAC,EAAE;YACnD,MAAM,kBAAkB,GAA2B,EAAE,CAAC;YACtD,KAAK,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,GAAG,CAAC,OAAO,CAAC,kBAAkB,EAAE;gBAClE,IAAI,IAAI,KAAK,qCAAqB,CAAC,MAAM,EAAE;oBACzC,kBAAkB,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;iBAClC;qBAAM;oBACL,kBAAkB,CAAC,IAAI,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,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;QACjC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACzC,IAAI,CAAC,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,CAAC;QAC/D,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;QAChD,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC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N,YAAY,GAAG,KAAK,GAIrB;QACC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACpB,OAAO;SACR;QACD,IAAI,CAAC,YAAY,EAAE;YACjB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,yBAAS,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,cAAc,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;SAC5F;QACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC;QACjC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,iBAAiB,GAAG,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;AAjMD,oCAiMC","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 (!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"]}
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.152",
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.93",
26
26
  "@expo/logger": "0.0.24",
27
27
  "@expo/package-manager": "0.0.54",
28
28
  "@expo/plist": "^0.0.11",