@expo/build-tools 1.0.55 → 1.0.57

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.
Files changed (87) hide show
  1. package/LICENSE +1 -1
  2. package/dist/android/credentials.js.map +1 -1
  3. package/dist/android/expoUpdates.js.map +1 -1
  4. package/dist/android/gradle.js.map +1 -1
  5. package/dist/android/gradleConfig.js.map +1 -1
  6. package/dist/buildErrors/buildErrorHandlers.js.map +1 -1
  7. package/dist/buildErrors/detectError.js +3 -2
  8. package/dist/buildErrors/detectError.js.map +1 -1
  9. package/dist/buildErrors/errors.types.d.ts +2 -1
  10. package/dist/buildErrors/errors.types.js.map +1 -1
  11. package/dist/buildErrors/userErrorHandlers.js +14 -0
  12. package/dist/buildErrors/userErrorHandlers.js.map +1 -1
  13. package/dist/builders/android.js.map +1 -1
  14. package/dist/builders/common.js.map +1 -1
  15. package/dist/builders/custom.js.map +1 -1
  16. package/dist/builders/ios.js +5 -2
  17. package/dist/builders/ios.js.map +1 -1
  18. package/dist/common/easBuildInternal.js.map +1 -1
  19. package/dist/common/installDependencies.js.map +1 -1
  20. package/dist/common/prebuild.js.map +1 -1
  21. package/dist/common/projectSources.js +2 -2
  22. package/dist/common/projectSources.js.map +1 -1
  23. package/dist/common/setup.js.map +1 -1
  24. package/dist/context.d.ts +9 -12
  25. package/dist/context.js +5 -14
  26. package/dist/context.js.map +1 -1
  27. package/dist/customBuildContext.d.ts +2 -2
  28. package/dist/customBuildContext.js +1 -1
  29. package/dist/customBuildContext.js.map +1 -1
  30. package/dist/index.d.ts +1 -1
  31. package/dist/index.js +1 -2
  32. package/dist/index.js.map +1 -1
  33. package/dist/ios/configure.js +1 -0
  34. package/dist/ios/configure.js.map +1 -1
  35. package/dist/ios/credentials/distributionCertificate.js.map +1 -1
  36. package/dist/ios/credentials/keychain.js.map +1 -1
  37. package/dist/ios/credentials/manager.js.map +1 -1
  38. package/dist/ios/credentials/provisioningProfile.js.map +1 -1
  39. package/dist/ios/expoUpdates.js.map +1 -1
  40. package/dist/ios/fastfile.js.map +1 -1
  41. package/dist/ios/fastlane.js.map +1 -1
  42. package/dist/ios/gymfile.js.map +1 -1
  43. package/dist/ios/pod.js.map +1 -1
  44. package/dist/ios/resign.js.map +1 -1
  45. package/dist/ios/resolve.js.map +1 -1
  46. package/dist/ios/xcodeBuildLogs.js +6 -2
  47. package/dist/ios/xcodeBuildLogs.js.map +1 -1
  48. package/dist/ios/xcodeEnv.js.map +1 -1
  49. package/dist/ios/xcpretty.js.map +1 -1
  50. package/dist/steps/functions/configureAndroidVersion.js.map +1 -1
  51. package/dist/steps/functions/configureEASUpdateIfInstalled.js.map +1 -1
  52. package/dist/steps/functions/configureIosCredentials.js.map +1 -1
  53. package/dist/steps/functions/configureIosVersion.js.map +1 -1
  54. package/dist/steps/functions/findAndUploadBuildArtifacts.js +15 -4
  55. package/dist/steps/functions/findAndUploadBuildArtifacts.js.map +1 -1
  56. package/dist/steps/functions/generateGymfileFromTemplate.js.map +1 -1
  57. package/dist/steps/functions/injectAndroidCredentials.js.map +1 -1
  58. package/dist/steps/functions/installNodeModules.js.map +1 -1
  59. package/dist/steps/functions/prebuild.js.map +1 -1
  60. package/dist/steps/functions/resolveAppleTeamIdFromCredentials.js.map +1 -1
  61. package/dist/steps/functions/runFastlane.js.map +1 -1
  62. package/dist/steps/functions/uploadArtifact.js +12 -21
  63. package/dist/steps/functions/uploadArtifact.js.map +1 -1
  64. package/dist/steps/functions/useNpmToken.js.map +1 -1
  65. package/dist/steps/utils/android/expoUpdates.js.map +1 -1
  66. package/dist/steps/utils/android/gradle.js.map +1 -1
  67. package/dist/steps/utils/android/gradleConfig.js.map +1 -1
  68. package/dist/steps/utils/expoUpdates.js.map +1 -1
  69. package/dist/steps/utils/ios/configure.js.map +1 -1
  70. package/dist/steps/utils/ios/credentials/distributionCertificate.js.map +1 -1
  71. package/dist/steps/utils/ios/credentials/keychain.js.map +1 -1
  72. package/dist/steps/utils/ios/credentials/manager.js.map +1 -1
  73. package/dist/steps/utils/ios/credentials/provisioningProfile.js.map +1 -1
  74. package/dist/steps/utils/ios/expoUpdates.js.map +1 -1
  75. package/dist/steps/utils/ios/fastlane.js.map +1 -1
  76. package/dist/steps/utils/ios/resolve.js.map +1 -1
  77. package/dist/steps/utils/ios/xcpretty.js.map +1 -1
  78. package/dist/utils/appConfig.js.map +1 -1
  79. package/dist/utils/artifacts.js +11 -3
  80. package/dist/utils/artifacts.js.map +1 -1
  81. package/dist/utils/expoUpdates.js.map +1 -1
  82. package/dist/utils/hooks.js.map +1 -1
  83. package/dist/utils/npmrc.js.map +1 -1
  84. package/dist/utils/packageManager.js.map +1 -1
  85. package/dist/utils/processes.js.map +1 -1
  86. package/dist/utils/project.js.map +1 -1
  87. package/package.json +29 -29
package/LICENSE CHANGED
@@ -12,7 +12,7 @@ Additional Use Grant: You may make use of the Licensed Work, provided that you d
12
12
  to access the functionality of and directly benefit from the
13
13
  functionality of the Licensed Work.
14
14
 
15
- Change Date: 2026-10-01
15
+ Change Date: 2027-01-01
16
16
 
17
17
  Change License: MIT
18
18
 
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../src/android/credentials.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAGxB,wDAA0B;AAC1B,4DAAoC;AACpC,+BAAoC;AAIpC,KAAK,UAAU,kBAAkB,CAAC,GAA8B;IAC9D,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAA,oBAAU,EACrC,GAAG,CAAC,GAAG,CAAC,OAAO,EACf,+CAA+C,CAChD,CAAC;IACF,IAAI,CAAC,gBAAgB,EAAE;QACrB,4CAA4C;QAC5C,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;KAC1D;IACD,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;IAC9D,MAAM,YAAY,GAAG,cAAI,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,YAAY,IAAA,SAAM,GAAE,EAAE,CAAC,CAAC;IAC3E,MAAM,kBAAE,CAAC,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC9F,MAAM,eAAe,GAAG;QACtB,OAAO,EAAE;YACP,QAAQ,EAAE;gBACR,YAAY;gBACZ,gBAAgB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,gBAAgB;gBAC5D,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,CAAC,QAAQ;gBAC5C,WAAW,EAAE,gBAAgB,CAAC,QAAQ,CAAC,WAAW;aACnD;SACF;KACF,CAAC;IACF,MAAM,kBAAE,CAAC,SAAS,CAChB,cAAI,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC,EACjD,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,CAChC,CAAC;AACJ,CAAC;AAEQ,gDAAkB","sourcesContent":["import path from 'path';\n\nimport { Android } from '@expo/eas-build-job';\nimport fs from 'fs-extra';\nimport nullthrows from 'nullthrows';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { BuildContext } from '../context';\n\nasync function restoreCredentials(ctx: BuildContext<Android.Job>): Promise<void> {\n const { buildCredentials } = nullthrows(\n ctx.job.secrets,\n 'Secrets must be defined for non-custom builds'\n );\n if (!buildCredentials) {\n // TODO: sentry (should be detected earlier)\n throw new Error('secrets are missing in the job object');\n }\n ctx.logger.info(\"Writing secrets to the project's directory\");\n const keystorePath = path.join(ctx.buildDirectory, `keystore-${uuidv4()}`);\n await fs.writeFile(keystorePath, Buffer.from(buildCredentials.keystore.dataBase64, 'base64'));\n const credentialsJson = {\n android: {\n keystore: {\n keystorePath,\n keystorePassword: buildCredentials.keystore.keystorePassword,\n keyAlias: buildCredentials.keystore.keyAlias,\n keyPassword: buildCredentials.keystore.keyPassword,\n },\n },\n };\n await fs.writeFile(\n path.join(ctx.buildDirectory, 'credentials.json'),\n JSON.stringify(credentialsJson)\n );\n}\n\nexport { restoreCredentials };\n"]}
1
+ {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../src/android/credentials.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAGxB,wDAA0B;AAC1B,4DAAoC;AACpC,+BAAoC;AAIpC,KAAK,UAAU,kBAAkB,CAAC,GAA8B;IAC9D,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAA,oBAAU,EACrC,GAAG,CAAC,GAAG,CAAC,OAAO,EACf,+CAA+C,CAChD,CAAC;IACF,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,4CAA4C;QAC5C,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC3D,CAAC;IACD,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;IAC9D,MAAM,YAAY,GAAG,cAAI,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,YAAY,IAAA,SAAM,GAAE,EAAE,CAAC,CAAC;IAC3E,MAAM,kBAAE,CAAC,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC9F,MAAM,eAAe,GAAG;QACtB,OAAO,EAAE;YACP,QAAQ,EAAE;gBACR,YAAY;gBACZ,gBAAgB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,gBAAgB;gBAC5D,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,CAAC,QAAQ;gBAC5C,WAAW,EAAE,gBAAgB,CAAC,QAAQ,CAAC,WAAW;aACnD;SACF;KACF,CAAC;IACF,MAAM,kBAAE,CAAC,SAAS,CAChB,cAAI,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,kBAAkB,CAAC,EACjD,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,CAChC,CAAC;AACJ,CAAC;AAEQ,gDAAkB","sourcesContent":["import path from 'path';\n\nimport { Android } from '@expo/eas-build-job';\nimport fs from 'fs-extra';\nimport nullthrows from 'nullthrows';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { BuildContext } from '../context';\n\nasync function restoreCredentials(ctx: BuildContext<Android.Job>): Promise<void> {\n const { buildCredentials } = nullthrows(\n ctx.job.secrets,\n 'Secrets must be defined for non-custom builds'\n );\n if (!buildCredentials) {\n // TODO: sentry (should be detected earlier)\n throw new Error('secrets are missing in the job object');\n }\n ctx.logger.info(\"Writing secrets to the project's directory\");\n const keystorePath = path.join(ctx.buildDirectory, `keystore-${uuidv4()}`);\n await fs.writeFile(keystorePath, Buffer.from(buildCredentials.keystore.dataBase64, 'base64'));\n const credentialsJson = {\n android: {\n keystore: {\n keystorePath,\n keystorePassword: buildCredentials.keystore.keystorePassword,\n keyAlias: buildCredentials.keystore.keyAlias,\n keyPassword: buildCredentials.keystore.keyPassword,\n },\n },\n };\n await fs.writeFile(\n path.join(ctx.buildDirectory, 'credentials.json'),\n JSON.stringify(credentialsJson)\n );\n}\n\nexport { restoreCredentials };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"expoUpdates.js","sourceRoot":"","sources":["../../src/android/expoUpdates.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,wDAA0B;AAC1B,yDAA0D;AAK1D,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,mIAA4G,CAAA;IAC5G,oFAA6D,CAAA;IAC7D,oFAA6D,CAAA;AAC/D,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B;AAEM,KAAK,UAAU,qCAAqC,CACzD,GAAsB,EACtB,cAAsB;IAEtB,MAAM,YAAY,GAAG,MAAM,8BAAa,CAAC,KAAK,CAAC,uBAAuB,CACpE,GAAG,CAAC,8BAA8B,EAAE,CACrC,CAAC;IAEF,IAAI,CAAC,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,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\nimport { Job } from '@expo/eas-build-job';\n\nimport { BuildContext } from '../context';\n\nexport enum AndroidMetadataName {\n UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY = 'expo.modules.updates.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY',\n RELEASE_CHANNEL = 'expo.modules.updates.EXPO_RELEASE_CHANNEL',\n RUNTIME_VERSION = 'expo.modules.updates.EXPO_RUNTIME_VERSION',\n}\n\nexport async function androidSetRuntimeVersionNativelyAsync(\n ctx: BuildContext<Job>,\n runtimeVersion: string\n): Promise<void> {\n const manifestPath = await AndroidConfig.Paths.getAndroidManifestAsync(\n ctx.getReactNativeProjectDirectory()\n );\n\n if (!(await fs.pathExists(manifestPath))) {\n throw new Error(`Couldn't find Android manifest at ${manifestPath}`);\n }\n\n const androidManifest = await AndroidConfig.Manifest.readAndroidManifestAsync(manifestPath);\n const mainApp = AndroidConfig.Manifest.getMainApplicationOrThrow(androidManifest);\n AndroidConfig.Manifest.addMetaDataItemToMainApplication(\n mainApp,\n AndroidMetadataName.RUNTIME_VERSION,\n runtimeVersion,\n 'value'\n );\n await AndroidConfig.Manifest.writeAndroidManifestAsync(manifestPath, androidManifest);\n}\n\nexport async function androidSetChannelNativelyAsync(ctx: BuildContext<Job>): Promise<void> {\n assert(ctx.job.updates?.channel, 'updates.channel must be defined');\n\n const manifestPath = await AndroidConfig.Paths.getAndroidManifestAsync(\n ctx.getReactNativeProjectDirectory()\n );\n\n if (!(await fs.pathExists(manifestPath))) {\n throw new Error(`Couldn't find Android manifest at ${manifestPath}`);\n }\n\n const androidManifest = await AndroidConfig.Manifest.readAndroidManifestAsync(manifestPath);\n const mainApp = AndroidConfig.Manifest.getMainApplicationOrThrow(androidManifest);\n const stringifiedUpdatesRequestHeaders = AndroidConfig.Manifest.getMainApplicationMetaDataValue(\n androidManifest,\n AndroidMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY\n );\n AndroidConfig.Manifest.addMetaDataItemToMainApplication(\n mainApp,\n AndroidMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY,\n JSON.stringify({\n ...JSON.parse(stringifiedUpdatesRequestHeaders ?? '{}'),\n 'expo-channel-name': ctx.job.updates.channel,\n }),\n 'value'\n );\n await AndroidConfig.Manifest.writeAndroidManifestAsync(manifestPath, androidManifest);\n}\n\nexport async function androidGetNativelyDefinedChannelAsync(\n ctx: BuildContext<Job>\n): Promise<string | null> {\n const manifestPath = await AndroidConfig.Paths.getAndroidManifestAsync(\n ctx.getReactNativeProjectDirectory()\n );\n\n if (!(await fs.pathExists(manifestPath))) {\n return null;\n }\n\n const androidManifest = await AndroidConfig.Manifest.readAndroidManifestAsync(manifestPath);\n const stringifiedUpdatesRequestHeaders = AndroidConfig.Manifest.getMainApplicationMetaDataValue(\n androidManifest,\n AndroidMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY\n );\n try {\n const updatesRequestHeaders = JSON.parse(stringifiedUpdatesRequestHeaders ?? '{}');\n return updatesRequestHeaders['expo-channel-name'] ?? null;\n } catch (err: any) {\n throw new Error(\n `Failed to parse ${AndroidMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY} from AndroidManifest.xml: ${err.message}`\n );\n }\n}\n\nexport async function androidSetClassicReleaseChannelNativelyAsync(\n ctx: BuildContext<Job>\n): Promise<void> {\n const { releaseChannel } = ctx.job;\n assert(releaseChannel, 'releaseChannel must be defined');\n const escapedReleaseChannel = XML.escapeAndroidString(releaseChannel);\n\n const manifestPath = await AndroidConfig.Paths.getAndroidManifestAsync(\n ctx.getReactNativeProjectDirectory()\n );\n if (!(await fs.pathExists(manifestPath))) {\n throw new Error(`Couldn't find Android manifest at ${manifestPath}`);\n }\n\n // Store the release channel in a string resource to ensure it is interpreted as a string\n const stringResourcePath = await AndroidConfig.Strings.getProjectStringsXMLPathAsync(\n ctx.getReactNativeProjectDirectory()\n );\n const stringResourceObject = await AndroidConfig.Resources.readResourcesXMLAsync({\n path: stringResourcePath,\n });\n\n const resourceName = 'release_channel';\n const releaseChannelResourceItem = AndroidConfig.Resources.buildResourceItem({\n name: resourceName,\n value: escapedReleaseChannel,\n });\n const newStringResourceObject = AndroidConfig.Strings.setStringItem(\n [releaseChannelResourceItem],\n stringResourceObject\n );\n await XML.writeXMLAsync({ path: stringResourcePath, xml: newStringResourceObject });\n\n const androidManifest = await AndroidConfig.Manifest.readAndroidManifestAsync(manifestPath);\n const mainApp = AndroidConfig.Manifest.getMainApplicationOrThrow(androidManifest);\n AndroidConfig.Manifest.addMetaDataItemToMainApplication(\n mainApp,\n AndroidMetadataName.RELEASE_CHANNEL,\n `@string/${resourceName}`,\n 'value'\n );\n await AndroidConfig.Manifest.writeAndroidManifestAsync(manifestPath, androidManifest);\n}\n\nexport async function androidGetNativelyDefinedClassicReleaseChannelAsync(\n ctx: BuildContext<Job>\n): Promise<string | null> {\n const manifestPath = await AndroidConfig.Paths.getAndroidManifestAsync(\n ctx.getReactNativeProjectDirectory()\n );\n if (!(await fs.pathExists(manifestPath))) {\n return null;\n }\n\n const androidManifest = await AndroidConfig.Manifest.readAndroidManifestAsync(manifestPath);\n return AndroidConfig.Manifest.getMainApplicationMetaDataValue(\n androidManifest,\n AndroidMetadataName.RELEASE_CHANNEL\n );\n}\n\nexport async function androidGetNativelyDefinedRuntimeVersionAsync(\n ctx: BuildContext<Job>\n): Promise<string | null> {\n const manifestPath = await AndroidConfig.Paths.getAndroidManifestAsync(\n ctx.getReactNativeProjectDirectory()\n );\n if (!(await fs.pathExists(manifestPath))) {\n return null;\n }\n\n const androidManifest = await AndroidConfig.Manifest.readAndroidManifestAsync(manifestPath);\n return AndroidConfig.Manifest.getMainApplicationMetaDataValue(\n androidManifest,\n AndroidMetadataName.RUNTIME_VERSION\n );\n}\n"]}
1
+ {"version":3,"file":"expoUpdates.js","sourceRoot":"","sources":["../../src/android/expoUpdates.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAE5B,wDAA0B;AAC1B,yDAA0D;AAK1D,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8BAAa,CAAC,KAAK,CAAC,uBAAuB,CACpE,GAAG,CAAC,8BAA8B,EAAE,CACrC,CAAC;IACF,IAAI,CAAC,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,eAAe,GAAG,MAAM,8BAAa,CAAC,QAAQ,CAAC,wBAAwB,CAAC,YAAY,CAAC,CAAC;IAC5F,OAAO,8BAAa,CAAC,QAAQ,CAAC,+BAA+B,CAC3D,eAAe,EACf,mBAAmB,CAAC,eAAe,CACpC,CAAC;AACJ,CAAC;AAfD,oGAeC","sourcesContent":["import assert from 'assert';\n\nimport fs from 'fs-extra';\nimport { AndroidConfig, XML } from '@expo/config-plugins';\nimport { Job } from '@expo/eas-build-job';\n\nimport { BuildContext } from '../context';\n\nexport enum AndroidMetadataName {\n UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY = 'expo.modules.updates.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY',\n RELEASE_CHANNEL = 'expo.modules.updates.EXPO_RELEASE_CHANNEL',\n RUNTIME_VERSION = 'expo.modules.updates.EXPO_RUNTIME_VERSION',\n}\n\nexport async function androidSetRuntimeVersionNativelyAsync(\n ctx: BuildContext<Job>,\n runtimeVersion: string\n): Promise<void> {\n const manifestPath = await AndroidConfig.Paths.getAndroidManifestAsync(\n ctx.getReactNativeProjectDirectory()\n );\n\n if (!(await fs.pathExists(manifestPath))) {\n throw new Error(`Couldn't find Android manifest at ${manifestPath}`);\n }\n\n const androidManifest = await AndroidConfig.Manifest.readAndroidManifestAsync(manifestPath);\n const mainApp = AndroidConfig.Manifest.getMainApplicationOrThrow(androidManifest);\n AndroidConfig.Manifest.addMetaDataItemToMainApplication(\n mainApp,\n AndroidMetadataName.RUNTIME_VERSION,\n runtimeVersion,\n 'value'\n );\n await AndroidConfig.Manifest.writeAndroidManifestAsync(manifestPath, androidManifest);\n}\n\nexport async function androidSetChannelNativelyAsync(ctx: BuildContext<Job>): Promise<void> {\n assert(ctx.job.updates?.channel, 'updates.channel must be defined');\n\n const manifestPath = await AndroidConfig.Paths.getAndroidManifestAsync(\n ctx.getReactNativeProjectDirectory()\n );\n\n if (!(await fs.pathExists(manifestPath))) {\n throw new Error(`Couldn't find Android manifest at ${manifestPath}`);\n }\n\n const androidManifest = await AndroidConfig.Manifest.readAndroidManifestAsync(manifestPath);\n const mainApp = AndroidConfig.Manifest.getMainApplicationOrThrow(androidManifest);\n const stringifiedUpdatesRequestHeaders = AndroidConfig.Manifest.getMainApplicationMetaDataValue(\n androidManifest,\n AndroidMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY\n );\n AndroidConfig.Manifest.addMetaDataItemToMainApplication(\n mainApp,\n AndroidMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY,\n JSON.stringify({\n ...JSON.parse(stringifiedUpdatesRequestHeaders ?? '{}'),\n 'expo-channel-name': ctx.job.updates.channel,\n }),\n 'value'\n );\n await AndroidConfig.Manifest.writeAndroidManifestAsync(manifestPath, androidManifest);\n}\n\nexport async function androidGetNativelyDefinedChannelAsync(\n ctx: BuildContext<Job>\n): Promise<string | null> {\n const manifestPath = await AndroidConfig.Paths.getAndroidManifestAsync(\n ctx.getReactNativeProjectDirectory()\n );\n\n if (!(await fs.pathExists(manifestPath))) {\n return null;\n }\n\n const androidManifest = await AndroidConfig.Manifest.readAndroidManifestAsync(manifestPath);\n const stringifiedUpdatesRequestHeaders = AndroidConfig.Manifest.getMainApplicationMetaDataValue(\n androidManifest,\n AndroidMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY\n );\n try {\n const updatesRequestHeaders = JSON.parse(stringifiedUpdatesRequestHeaders ?? '{}');\n return updatesRequestHeaders['expo-channel-name'] ?? null;\n } catch (err: any) {\n throw new Error(\n `Failed to parse ${AndroidMetadataName.UPDATES_CONFIGURATION_REQUEST_HEADERS_KEY} from AndroidManifest.xml: ${err.message}`\n );\n }\n}\n\nexport async function androidSetClassicReleaseChannelNativelyAsync(\n ctx: BuildContext<Job>\n): Promise<void> {\n const { releaseChannel } = ctx.job;\n assert(releaseChannel, 'releaseChannel must be defined');\n const escapedReleaseChannel = XML.escapeAndroidString(releaseChannel);\n\n const manifestPath = await AndroidConfig.Paths.getAndroidManifestAsync(\n ctx.getReactNativeProjectDirectory()\n );\n if (!(await fs.pathExists(manifestPath))) {\n throw new Error(`Couldn't find Android manifest at ${manifestPath}`);\n }\n\n // Store the release channel in a string resource to ensure it is interpreted as a string\n const stringResourcePath = await AndroidConfig.Strings.getProjectStringsXMLPathAsync(\n ctx.getReactNativeProjectDirectory()\n );\n const stringResourceObject = await AndroidConfig.Resources.readResourcesXMLAsync({\n path: stringResourcePath,\n });\n\n const resourceName = 'release_channel';\n const releaseChannelResourceItem = AndroidConfig.Resources.buildResourceItem({\n name: resourceName,\n value: escapedReleaseChannel,\n });\n const newStringResourceObject = AndroidConfig.Strings.setStringItem(\n [releaseChannelResourceItem],\n stringResourceObject\n );\n await XML.writeXMLAsync({ path: stringResourcePath, xml: newStringResourceObject });\n\n const androidManifest = await AndroidConfig.Manifest.readAndroidManifestAsync(manifestPath);\n const mainApp = AndroidConfig.Manifest.getMainApplicationOrThrow(androidManifest);\n AndroidConfig.Manifest.addMetaDataItemToMainApplication(\n mainApp,\n AndroidMetadataName.RELEASE_CHANNEL,\n `@string/${resourceName}`,\n 'value'\n );\n await AndroidConfig.Manifest.writeAndroidManifestAsync(manifestPath, androidManifest);\n}\n\nexport async function androidGetNativelyDefinedClassicReleaseChannelAsync(\n ctx: BuildContext<Job>\n): Promise<string | null> {\n const manifestPath = await AndroidConfig.Paths.getAndroidManifestAsync(\n ctx.getReactNativeProjectDirectory()\n );\n if (!(await fs.pathExists(manifestPath))) {\n return null;\n }\n\n const androidManifest = await AndroidConfig.Manifest.readAndroidManifestAsync(manifestPath);\n return AndroidConfig.Manifest.getMainApplicationMetaDataValue(\n androidManifest,\n AndroidMetadataName.RELEASE_CHANNEL\n );\n}\n\nexport async function androidGetNativelyDefinedRuntimeVersionAsync(\n ctx: BuildContext<Job>\n): Promise<string | null> {\n const manifestPath = await AndroidConfig.Paths.getAndroidManifestAsync(\n ctx.getReactNativeProjectDirectory()\n );\n if (!(await fs.pathExists(manifestPath))) {\n return null;\n }\n\n const androidManifest = await AndroidConfig.Manifest.readAndroidManifestAsync(manifestPath);\n return AndroidConfig.Manifest.getMainApplicationMetaDataValue(\n androidManifest,\n AndroidMetadataName.RUNTIME_VERSION\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"gradle.js","sourceRoot":"","sources":["../../src/android/gradle.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,oDAA4B;AAE5B,sEAAsE;AACtE,uDAAkE;AAClE,wDAA0B;AAI1B,kDAA4E;AAErE,KAAK,UAAU,kCAAkC,CACtD,GAAuB;IAEvB,MAAM,WAAW,GAAG,cAAI,CAAC,IAAI,CAAC,GAAG,CAAC,8BAA8B,EAAE,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IAC1F,MAAM,cAAc,GAAG,MAAM,kBAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC9D,IAAI,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QACjC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,uDAAuD,CAAC,CAAC;QACzE,MAAM,kBAAE,CAAC,SAAS,CAAC,WAAW,EAAE,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;KAChF;AACH,CAAC;AATD,gFASC;AAEM,KAAK,UAAU,gBAAgB,CACpC,GAAsB,EACtB,EACE,MAAM,EACN,aAAa,EACb,UAAU,GACoD;IAEhE,MAAM,CAAC,IAAI,CAAC,oBAAoB,aAAa,QAAQ,UAAU,EAAE,CAAC,CAAC;IACnE,MAAM,YAAY,GAAG,IAAA,sBAAK,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,oBAAoB,CAAC;KAC7B;AACH,CAAC;AAZD,oDAYC","sourcesContent":["import path from 'path';\nimport assert from 'assert';\n\nimport spawn, { SpawnPromise, SpawnResult } from '@expo/turtle-spawn';\nimport { Android, Env, Job, Platform } from '@expo/eas-build-job';\nimport fs from 'fs-extra';\nimport { bunyan } from '@expo/logger';\n\nimport { BuildContext } from '../context';\nimport { getParentAndDescendantProcessPidsAsync } from '../utils/processes';\n\nexport async function ensureLFLineEndingsInGradlewScript<TJob extends Job>(\n ctx: BuildContext<TJob>\n): Promise<void> {\n const gradlewPath = path.join(ctx.getReactNativeProjectDirectory(), 'android', 'gradlew');\n const gradlewContent = await fs.readFile(gradlewPath, 'utf8');\n if (gradlewContent.includes('\\r')) {\n ctx.logger.info('Replacing CRLF line endings with LF in gradlew script');\n await fs.writeFile(gradlewPath, gradlewContent.replace(/\\r\\n/g, '\\n'), 'utf8');\n }\n}\n\nexport async function runGradleCommand(\n ctx: BuildContext<Job>,\n {\n logger,\n gradleCommand,\n androidDir,\n }: { logger: bunyan; gradleCommand: string; androidDir: string }\n): Promise<void> {\n logger.info(`Running 'gradlew ${gradleCommand}' in ${androidDir}`);\n const spawnPromise = spawn('bash', ['-c', `sh gradlew ${gradleCommand}`], {\n cwd: androidDir,\n logger,\n lineTransformer: (line?: string) => {\n if (!line || /^\\.+$/.exec(line)) {\n return null;\n } else {\n return line;\n }\n },\n env: { ...ctx.env, ...resolveVersionOverridesEnvs(ctx) },\n });\n if (ctx.env.EAS_BUILD_RUNNER === 'eas-build' && process.platform === 'linux') {\n adjustOOMScore(spawnPromise, logger);\n }\n\n await spawnPromise;\n}\n\n/**\n * OOM Killer sometimes kills worker server while build is exceeding memory limits.\n * `oom_score_adj` is a value between -1000 and 1000 and it defaults to 0.\n * It defines which process is more likely to get killed (higher value more likely).\n *\n * This function sets oom_score_adj for Gradle process and all its child processes.\n */\nfunction adjustOOMScore(spawnPromise: SpawnPromise<SpawnResult>, logger: bunyan): void {\n setTimeout(\n async () => {\n try {\n assert(spawnPromise.child.pid);\n const pids = await getParentAndDescendantProcessPidsAsync(spawnPromise.child.pid);\n await Promise.all(\n pids.map(async (pid: number) => {\n // Value 800 is just a guess here. It's probably higher than most other\n // process. I didn't want to set it any higher, because I'm not sure if OOM Killer\n // can start killing processes when there is still enough memory left.\n const oomScoreOverride = 800;\n await fs.writeFile(`/proc/${pid}/oom_score_adj`, `${oomScoreOverride}\\n`);\n })\n );\n } catch (err: any) {\n logger.debug({ err, stderr: err?.stderr }, 'Failed to override oom_score_adj');\n }\n },\n // Wait 20 seconds to make sure all child processes are started\n 20000\n );\n}\n\n// Version envs should be set at the beginning of the build, but when building\n// from github those values are resolved latter.\nfunction resolveVersionOverridesEnvs(ctx: BuildContext<Job>): Env {\n const extraEnvs: Env = {};\n if (\n ctx.job.platform === Platform.ANDROID &&\n ctx.job.version?.versionCode &&\n !ctx.env.EAS_BUILD_ANDROID_VERSION_CODE\n ) {\n extraEnvs.EAS_BUILD_ANDROID_VERSION_CODE = ctx.job.version.versionCode;\n }\n if (\n ctx.job.platform === Platform.ANDROID &&\n ctx.job.version?.versionName &&\n !ctx.env.EAS_BUILD_ANDROID_VERSION_NAME\n ) {\n extraEnvs.EAS_BUILD_ANDROID_VERSION_NAME = ctx.job.version.versionName;\n }\n return extraEnvs;\n}\n\nexport function resolveGradleCommand(job: Android.Job): string {\n if (job.gradleCommand) {\n return job.gradleCommand;\n } else if (job.developmentClient) {\n return ':app:assembleDebug';\n } else if (!job.buildType) {\n return ':app:bundleRelease';\n } else if (job.buildType === Android.BuildType.APK) {\n return ':app:assembleRelease';\n } else {\n return ':app:bundleRelease';\n }\n}\n"]}
1
+ {"version":3,"file":"gradle.js","sourceRoot":"","sources":["../../src/android/gradle.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,oDAA4B;AAE5B,sEAAsE;AACtE,uDAAkE;AAClE,wDAA0B;AAI1B,kDAA4E;AAErE,KAAK,UAAU,kCAAkC,CACtD,GAAuB;IA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AG,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC;IACzE,CAAC;IACD,IACE,GAAG,CAAC,GAAG,CAAC,QAAQ,KAAK,wBAAQ,CAAC,OAAO;SACrC,MAAA,GAAG,CAAC,GAAG,CAAC,OAAO,0CAAE,WAAW,CAAA;QAC5B,CAAC,GAAG,CAAC,GAAG,CAAC,8BAA8B,EACvC,CAAC;QACD,SAAS,CAAC,8BAA8B,GAAG,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC;IACzE,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAgB,oBAAoB,CAAC,GAAgB;IACnD,IAAI,GAAG,CAAC,aAAa,EAAE,CAAC;QACtB,OAAO,GAAG,CAAC,aAAa,CAAC;IAC3B,CAAC;SAAM,IAAI,GAAG,CAAC,iBAAiB,EAAE,CAAC;QACjC,OAAO,oBAAoB,CAAC;IAC9B,CAAC;SAAM,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;QAC1B,OAAO,oBAAoB,CAAC;IAC9B,CAAC;SAAM,IAAI,GAAG,CAAC,SAAS,KAAK,uBAAO,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC;QACnD,OAAO,sBAAsB,CAAC;IAChC,CAAC;SAAM,CAAC;QACN,OAAO,oBAAoB,CAAC;IAC9B,CAAC;AACH,CAAC;AAZD,oDAYC","sourcesContent":["import path from 'path';\nimport assert from 'assert';\n\nimport spawn, { SpawnPromise, SpawnResult } from '@expo/turtle-spawn';\nimport { Android, Env, Job, Platform } from '@expo/eas-build-job';\nimport fs from 'fs-extra';\nimport { bunyan } from '@expo/logger';\n\nimport { BuildContext } from '../context';\nimport { getParentAndDescendantProcessPidsAsync } from '../utils/processes';\n\nexport async function ensureLFLineEndingsInGradlewScript<TJob extends Job>(\n ctx: BuildContext<TJob>\n): Promise<void> {\n const gradlewPath = path.join(ctx.getReactNativeProjectDirectory(), 'android', 'gradlew');\n const gradlewContent = await fs.readFile(gradlewPath, 'utf8');\n if (gradlewContent.includes('\\r')) {\n ctx.logger.info('Replacing CRLF line endings with LF in gradlew script');\n await fs.writeFile(gradlewPath, gradlewContent.replace(/\\r\\n/g, '\\n'), 'utf8');\n }\n}\n\nexport async function runGradleCommand(\n ctx: BuildContext<Job>,\n {\n logger,\n gradleCommand,\n androidDir,\n }: { logger: bunyan; gradleCommand: string; androidDir: string }\n): Promise<void> {\n logger.info(`Running 'gradlew ${gradleCommand}' in ${androidDir}`);\n const spawnPromise = spawn('bash', ['-c', `sh gradlew ${gradleCommand}`], {\n cwd: androidDir,\n logger,\n lineTransformer: (line?: string) => {\n if (!line || /^\\.+$/.exec(line)) {\n return null;\n } else {\n return line;\n }\n },\n env: { ...ctx.env, ...resolveVersionOverridesEnvs(ctx) },\n });\n if (ctx.env.EAS_BUILD_RUNNER === 'eas-build' && process.platform === 'linux') {\n adjustOOMScore(spawnPromise, logger);\n }\n\n await spawnPromise;\n}\n\n/**\n * OOM Killer sometimes kills worker server while build is exceeding memory limits.\n * `oom_score_adj` is a value between -1000 and 1000 and it defaults to 0.\n * It defines which process is more likely to get killed (higher value more likely).\n *\n * This function sets oom_score_adj for Gradle process and all its child processes.\n */\nfunction adjustOOMScore(spawnPromise: SpawnPromise<SpawnResult>, logger: bunyan): void {\n setTimeout(\n async () => {\n try {\n assert(spawnPromise.child.pid);\n const pids = await getParentAndDescendantProcessPidsAsync(spawnPromise.child.pid);\n await Promise.all(\n pids.map(async (pid: number) => {\n // Value 800 is just a guess here. It's probably higher than most other\n // process. I didn't want to set it any higher, because I'm not sure if OOM Killer\n // can start killing processes when there is still enough memory left.\n const oomScoreOverride = 800;\n await fs.writeFile(`/proc/${pid}/oom_score_adj`, `${oomScoreOverride}\\n`);\n })\n );\n } catch (err: any) {\n logger.debug({ err, stderr: err?.stderr }, 'Failed to override oom_score_adj');\n }\n },\n // Wait 20 seconds to make sure all child processes are started\n 20000\n );\n}\n\n// Version envs should be set at the beginning of the build, but when building\n// from github those values are resolved latter.\nfunction resolveVersionOverridesEnvs(ctx: BuildContext<Job>): Env {\n const extraEnvs: Env = {};\n if (\n ctx.job.platform === Platform.ANDROID &&\n ctx.job.version?.versionCode &&\n !ctx.env.EAS_BUILD_ANDROID_VERSION_CODE\n ) {\n extraEnvs.EAS_BUILD_ANDROID_VERSION_CODE = ctx.job.version.versionCode;\n }\n if (\n ctx.job.platform === Platform.ANDROID &&\n ctx.job.version?.versionName &&\n !ctx.env.EAS_BUILD_ANDROID_VERSION_NAME\n ) {\n extraEnvs.EAS_BUILD_ANDROID_VERSION_NAME = ctx.job.version.versionName;\n }\n return extraEnvs;\n}\n\nexport function resolveGradleCommand(job: Android.Job): string {\n if (job.gradleCommand) {\n return job.gradleCommand;\n } else if (job.developmentClient) {\n return ':app:assembleDebug';\n } else if (!job.buildType) {\n return ':app:bundleRelease';\n } else if (job.buildType === Android.BuildType.APK) {\n return ':app:assembleRelease';\n } else {\n return ':app:bundleRelease';\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"gradleConfig.js","sourceRoot":"","sources":["../../src/android/gradleConfig.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,yDAAqD;AAErD,wDAA0B;AAI1B,MAAM,8BAA8B,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,kCAAkC,CAAC,CAAC;AAChG,MAAM,2BAA2B,GAAG,kCAAkC,CAAC;AAEhE,KAAK,UAAU,oBAAoB,CAAC,GAA8B;IACvE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;IAC9D,IAAI,MAAM,kBAAE,CAAC,UAAU,CAAC,qBAAqB,CAAC,GAAG,CAAC,8BAA8B,EAAE,CAAC,CAAC,EAAE;QACpF,GAAG,CAAC,yBAAyB,EAAE,CAAC;QAChC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,4EAA4E,CAAC,CAAC;KAC/F;IACD,MAAM,oBAAoB,CAAC,GAAG,CAAC,8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0C;SACzC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CACzE,CAAC;AACJ,CAAC","sourcesContent":["import path from 'path';\n\nimport { AndroidConfig } from '@expo/config-plugins';\nimport { Android } from '@expo/eas-build-job';\nimport fs from 'fs-extra';\n\nimport { BuildContext } from '../context';\n\nconst EAS_BUILD_GRADLE_TEMPLATE_PATH = path.join(__dirname, '../../templates/eas-build.gradle');\nconst APPLY_EAS_BUILD_GRADLE_LINE = 'apply from: \"./eas-build.gradle\"';\n\nexport async function configureBuildGradle(ctx: BuildContext<Android.Job>): Promise<void> {\n ctx.logger.info('Injecting signing config into build.gradle');\n if (await fs.pathExists(getEasBuildGradlePath(ctx.getReactNativeProjectDirectory()))) {\n ctx.markBuildPhaseHasWarnings();\n ctx.logger.warn('eas-build.gradle script is deprecated, please remove it from your project.');\n }\n await deleteEasBuildGradle(ctx.getReactNativeProjectDirectory());\n await createEasBuildGradle(ctx.getReactNativeProjectDirectory());\n await addApplyToBuildGradle(ctx.getReactNativeProjectDirectory());\n}\n\nasync function deleteEasBuildGradle(projectRoot: string): Promise<void> {\n const easBuildGradlePath = getEasBuildGradlePath(projectRoot);\n await fs.remove(easBuildGradlePath);\n}\n\nfunction getEasBuildGradlePath(projectRoot: string): string {\n return path.join(projectRoot, 'android/app/eas-build.gradle');\n}\n\nasync function createEasBuildGradle(projectRoot: string): Promise<void> {\n const easBuildGradlePath = getEasBuildGradlePath(projectRoot);\n await fs.copy(EAS_BUILD_GRADLE_TEMPLATE_PATH, easBuildGradlePath);\n}\n\nasync function addApplyToBuildGradle(projectRoot: string): Promise<void> {\n const buildGradlePath = AndroidConfig.Paths.getAppBuildGradleFilePath(projectRoot);\n const buildGradleContents = await fs.readFile(path.join(buildGradlePath), 'utf8');\n\n if (hasLine(buildGradleContents, APPLY_EAS_BUILD_GRADLE_LINE)) {\n return;\n }\n\n await fs.writeFile(\n buildGradlePath,\n `${buildGradleContents.trim()}\\n${APPLY_EAS_BUILD_GRADLE_LINE}\\n`\n );\n}\n\nfunction hasLine(haystack: string, needle: string): boolean {\n return (\n haystack\n .replace(/\\r\\n/g, '\\n')\n .split('\\n')\n // Check for both single and double quotes\n .some((line) => line === needle || line === needle.replace(/\"/g, \"'\"))\n );\n}\n"]}
1
+ {"version":3,"file":"gradleConfig.js","sourceRoot":"","sources":["../../src/android/gradleConfig.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,yDAAqD;AAErD,wDAA0B;AAI1B,MAAM,8BAA8B,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,kCAAkC,CAAC,CAAC;AAChG,MAAM,2BAA2B,GAAG,kCAAkC,CAAC;AAEhE,KAAK,UAAU,oBAAoB,CAAC,GAA8B;IACvE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;IAC9D,IAAI,MAAM,kBAAE,CAAC,UAAU,CAAC,qBAAqB,CAAC,GAAG,CAAC,8BAA8B,EAAE,CAAC,CAAC,EAAE,CAAC;QACrF,GAAG,CAAC,yBAAyB,EAAE,CAAC;QAChC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,4EAA4E,CAAC,CAAC;IAChG,CAAC;IACD,MAAM,oBAAoB,CAAC,GAAG,CAAC,8BAA8B,EAAE,CAAC,CAAC;IACjE,MAAM,oBAAoB,CAAC,GAAG,CAAC,8BAA8B,EAAE,CAAC,CAAC;IACjE,MAAM,qBAAqB,CAAC,GAAG,CAAC,8BAA8B,EAAE,CAAC,CAAC;AACpE,CAAC;AATD,oDASC;AAED,KAAK,UAAU,oBAAoB,CAAC,WAAmB;IACrD,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAC9D,MAAM,kBAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;AACtC,CAAC;AAED,SAAS,qBAAqB,CAAC,WAAmB;IAChD,OAAO,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,8BAA8B,CAAC,CAAC;AAChE,CAAC;AAED,KAAK,UAAU,oBAAoB,CAAC,WAAmB;IACrD,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAC9D,MAAM,kBAAE,CAAC,IAAI,CAAC,8BAA8B,EAAE,kBAAkB,CAAC,CAAC;AACpE,CAAC;AAED,KAAK,UAAU,qBAAqB,CAAC,WAAmB;IACtD,MAAM,eAAe,GAAG,8BAAa,CAAC,KAAK,CAAC,yBAAyB,CAAC,WAAW,CAAC,CAAC;IACnF,MAAM,mBAAmB,GAAG,MAAM,kBAAE,CAAC,QAAQ,CAAC,cAAI,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC,CAAC;IAElF,IAAI,OAAO,CAAC,mBAAmB,EAAE,2BAA2B,CAAC,EAAE,CAAC;QAC9D,OAAO;IACT,CAAC;IAED,MAAM,kBAAE,CAAC,SAAS,CAChB,eAAe,EACf,GAAG,mBAAmB,CAAC,IAAI,EAAE,KAAK,2BAA2B,IAAI,CAClE,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,QAAgB,EAAE,MAAc;IAC/C,OAAO,CACL,QAAQ;SACL,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC;SACtB,KAAK,CAAC,IAAI,CAAC;QACZ,0CAA0C;SACzC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CACzE,CAAC;AACJ,CAAC","sourcesContent":["import path from 'path';\n\nimport { AndroidConfig } from '@expo/config-plugins';\nimport { Android } from '@expo/eas-build-job';\nimport fs from 'fs-extra';\n\nimport { BuildContext } from '../context';\n\nconst EAS_BUILD_GRADLE_TEMPLATE_PATH = path.join(__dirname, '../../templates/eas-build.gradle');\nconst APPLY_EAS_BUILD_GRADLE_LINE = 'apply from: \"./eas-build.gradle\"';\n\nexport async function configureBuildGradle(ctx: BuildContext<Android.Job>): Promise<void> {\n ctx.logger.info('Injecting signing config into build.gradle');\n if (await fs.pathExists(getEasBuildGradlePath(ctx.getReactNativeProjectDirectory()))) {\n ctx.markBuildPhaseHasWarnings();\n ctx.logger.warn('eas-build.gradle script is deprecated, please remove it from your project.');\n }\n await deleteEasBuildGradle(ctx.getReactNativeProjectDirectory());\n await createEasBuildGradle(ctx.getReactNativeProjectDirectory());\n await addApplyToBuildGradle(ctx.getReactNativeProjectDirectory());\n}\n\nasync function deleteEasBuildGradle(projectRoot: string): Promise<void> {\n const easBuildGradlePath = getEasBuildGradlePath(projectRoot);\n await fs.remove(easBuildGradlePath);\n}\n\nfunction getEasBuildGradlePath(projectRoot: string): string {\n return path.join(projectRoot, 'android/app/eas-build.gradle');\n}\n\nasync function createEasBuildGradle(projectRoot: string): Promise<void> {\n const easBuildGradlePath = getEasBuildGradlePath(projectRoot);\n await fs.copy(EAS_BUILD_GRADLE_TEMPLATE_PATH, easBuildGradlePath);\n}\n\nasync function addApplyToBuildGradle(projectRoot: string): Promise<void> {\n const buildGradlePath = AndroidConfig.Paths.getAppBuildGradleFilePath(projectRoot);\n const buildGradleContents = await fs.readFile(path.join(buildGradlePath), 'utf8');\n\n if (hasLine(buildGradleContents, APPLY_EAS_BUILD_GRADLE_LINE)) {\n return;\n }\n\n await fs.writeFile(\n buildGradlePath,\n `${buildGradleContents.trim()}\\n${APPLY_EAS_BUILD_GRADLE_LINE}\\n`\n );\n}\n\nfunction hasLine(haystack: string, needle: string): boolean {\n return (\n haystack\n .replace(/\\r\\n/g, '\\n')\n .split('\\n')\n // Check for both single and double quotes\n .some((line) => line === needle || line === needle.replace(/\"/g, \"'\"))\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"buildErrorHandlers.js","sourceRoot":"","sources":["../../src/buildErrors/buildErrorHandlers.ts"],"names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ACtF,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,EACJ,sGAAsG;QACxG,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,scAAsc;QACtc,MAAM,EAAE,+CAA+C;QACvD,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,iBAAiB,CACnB,6BAA6B,EAC7B,wCAAwC,CACzC;KACJ;IACD;QACE,KAAK,EAAE,0BAAU,CAAC,YAAY;QAC9B,QAAQ,EAAE,wBAAQ,CAAC,GAAG;QACtB,uCAAuC;QACvC,2UAA2U;QAC3U,MAAM,EACJ,2HAA2H;QAC7H,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:\n /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:\n /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:\n /\\[!\\] 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.IOS,\n phase: BuildPhase.INSTALL_PODS,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_COCOAPODS_CACHE_URL ? /Error installing/ : undefined,\n createError: () =>\n new TrackedBuildError(\n 'COCOAPODS_CACHE_INSTALLING_POD_ERROR',\n `cocoapods: error installing a pod using internal cache instance`\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_COCOAPODS_CACHE_URL ? /No podspec exists at path/ : undefined,\n createError: () =>\n new TrackedBuildError(\n 'COCOAPODS_CACHE_NO_PODSPEC_EXISTS_AT_PATH_ERROR',\n `cocoapods: error fetching a podspec through internal cache instance`\n ),\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 // /home/expo/workingdir/build/android/app/src/main/AndroidManifest.xml:27:9-33:20 Error:\n // \tandroid:exported needs to be explicitly specified for element <activity#androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.\n regexp:\n /Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported`/,\n createError: () =>\n new TrackedBuildError(\n 'REQUIRE_EXPLICIT_EXPORTED_ANDROID_12',\n 'Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported`.'\n ),\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:process.*GoogleServices'.*\\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:processDebugGoogleServices'.\n // > Missing project_info object\n regexp:\n /Execution failed for task ':app:process.*GoogleServices'.*\\s.*Missing project_info object/,\n createError: () =>\n new TrackedBuildError(\n 'GRADLE_MALFORMED_GOOGLE_SERVICES_JSON',\n 'gradle: Missing project_info object.'\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:\n /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 platform: Platform.ANDROID,\n phase: BuildPhase.RUN_GRADLEW,\n // > Could not resolve org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.5.10.\n // Required by:\n // project :expo-updates\n // > Could not resolve org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.5.10.\n // > Could not get resource 'https://lsdkfjsdlkjf.com/android/releases/org/jetbrains/kotlin/kotlin-annotation-processing-gradle/1.5.10/kotlin-annotation-processing-gradle-1.5.10.pom'.\n // > Could not HEAD 'https://slkdfjldskjfl.com/android/releases/org/jetbrains/kotlin/kotlin-annotation-processing-gradle/1.5.10/kotlin-annotation-processing-gradle-1.5.10.pom'.\n // > Connect to sdlkfjsdlkf.com:443 [slkdfjdslk.com/38.178.101.5] failed: connect timed out\n regexp: /Could not get resource.*\\n.*Could not HEAD 'https/,\n createError: () =>\n new TrackedBuildError('MAVEN_REGISTRY_CONNECTION_ERROR', `maven: registry connection 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 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:\n /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 // \tCompileC /Users/expo/Library/Developer/Xcode/DerivedData/Docent-amxxhphjfdtkpxecgidgzvwvnvtc/Build/Intermediates.noindex/ArchiveIntermediates/Docent/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/Flipper-Folly.build/Objects-normal/arm64/SSLErrors.o /Users/expo/workingdir/build/ios/Pods/Flipper-Folly/folly/io/async/ssl/SSLErrors.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'Flipper-Folly' from project 'Pods')\n regexp: /in target 'Flipper-Folly' from project 'Pods'/,\n createError: () =>\n new TrackedBuildError(\n 'FLIPPER_FOLLY_COMPILE_ERROR',\n 'fastlane: Flipper-Folly compile error.'\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:\n /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
+ {"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,YACS,SAAiB,EACjB,OAAe;QAEtB,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,cAAS,GAAT,SAAS,CAAQ;QACjB,YAAO,GAAP,OAAO,CAAQ;IAGxB,CAAC;CACF;AAPD,8CAOC;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,gDAAgD;QAChD,MAAM,EAAE,8EAA8E;QACtF,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,iBAAiB,CAAC,gCAAgC,EAAE,kBAAkB,CAAC;KAC/F;IACD;QACE,KAAK,EAAE,0BAAU,CAAC,oBAAoB;QACtC,kHAAkH;QAClH,mCAAmC;QACnC,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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(\n public errorCode: string,\n public message: string\n ) {\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:\n /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:\n /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:\n /\\[!\\] 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.IOS,\n phase: BuildPhase.INSTALL_PODS,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_COCOAPODS_CACHE_URL ? /Error installing/ : undefined,\n createError: () =>\n new TrackedBuildError(\n 'COCOAPODS_CACHE_INSTALLING_POD_ERROR',\n `cocoapods: error installing a pod using internal cache instance`\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n regexp: ({ env }: ErrorContext) =>\n env.EAS_BUILD_COCOAPODS_CACHE_URL ? /No podspec exists at path/ : undefined,\n createError: () =>\n new TrackedBuildError(\n 'COCOAPODS_CACHE_NO_PODSPEC_EXISTS_AT_PATH_ERROR',\n `cocoapods: error fetching a podspec through internal cache instance`\n ),\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 // /home/expo/workingdir/build/android/app/src/main/AndroidManifest.xml:27:9-33:20 Error:\n // \tandroid:exported needs to be explicitly specified for element <activity#androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.\n regexp:\n /Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported`/,\n createError: () =>\n new TrackedBuildError(\n 'REQUIRE_EXPLICIT_EXPORTED_ANDROID_12',\n 'Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported`.'\n ),\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:process.*GoogleServices'.*\\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:processDebugGoogleServices'.\n // > Missing project_info object\n regexp:\n /Execution failed for task ':app:process.*GoogleServices'.*\\s.*Missing project_info object/,\n createError: () =>\n new TrackedBuildError(\n 'GRADLE_MALFORMED_GOOGLE_SERVICES_JSON',\n 'gradle: Missing project_info object.'\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:\n /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 platform: Platform.ANDROID,\n phase: BuildPhase.RUN_GRADLEW,\n // > Could not resolve org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.5.10.\n // Required by:\n // project :expo-updates\n // > Could not resolve org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.5.10.\n // > Could not get resource 'https://lsdkfjsdlkjf.com/android/releases/org/jetbrains/kotlin/kotlin-annotation-processing-gradle/1.5.10/kotlin-annotation-processing-gradle-1.5.10.pom'.\n // > Could not HEAD 'https://slkdfjldskjfl.com/android/releases/org/jetbrains/kotlin/kotlin-annotation-processing-gradle/1.5.10/kotlin-annotation-processing-gradle-1.5.10.pom'.\n // > Connect to sdlkfjsdlkf.com:443 [slkdfjdslk.com/38.178.101.5] failed: connect timed out\n regexp: /Could not get resource.*\\n.*Could not HEAD 'https/,\n createError: () =>\n new TrackedBuildError('MAVEN_REGISTRY_CONNECTION_ERROR', `maven: registry connection 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 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:\n /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 // \tCompileC /Users/expo/Library/Developer/Xcode/DerivedData/Docent-amxxhphjfdtkpxecgidgzvwvnvtc/Build/Intermediates.noindex/ArchiveIntermediates/Docent/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/Flipper-Folly.build/Objects-normal/arm64/SSLErrors.o /Users/expo/workingdir/build/ios/Pods/Flipper-Folly/folly/io/async/ssl/SSLErrors.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'Flipper-Folly' from project 'Pods')\n regexp: /in target 'Flipper-Folly' from project 'Pods'/,\n createError: () =>\n new TrackedBuildError(\n 'FLIPPER_FOLLY_COMPILE_ERROR',\n 'fastlane: Flipper-Folly compile error.'\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:\n /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"]}
@@ -27,13 +27,14 @@ async function maybeReadXcodeBuildLogs(phase, buildLogsDirectory) {
27
27
  }
28
28
  function resolveError(errorHandlers, logLines, errorContext, xcodeBuildLogs) {
29
29
  const { job, phase } = errorContext;
30
- const { platform } = job;
30
+ const { platform, mode } = job;
31
31
  const logs = logLines.join('\n');
32
32
  const handlers = errorHandlers
33
33
  .filter((handler) => handler.platform === platform || !handler.platform)
34
34
  .filter((handler) => (handler.phase === errors_types_1.XCODE_BUILD_PHASE && phase === eas_build_job_1.BuildPhase.RUN_FASTLANE) ||
35
35
  handler.phase === phase ||
36
- !handler.phase);
36
+ !handler.phase)
37
+ .filter((handler) => handler.mode === mode || !handler.mode);
37
38
  for (const handler of handlers) {
38
39
  const regexp = typeof handler.regexp === 'function' ? handler.regexp(errorContext) : handler.regexp;
39
40
  if (!regexp) {
@@ -1 +1 @@
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,EAAC,kBAAkB,CAAC,CAAC;QAEjF,IAAI,CAAC,kBAAkB,EAAE;YACvB,OAAO;SACR;QAED,OAAO,MAAM,kBAAE,CAAC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;KACvD;IAAC,MAAM;QACN,OAAO,SAAS,CAAC;KAClB;AACH,CAAC;AAED,SAAS,YAAY,CACnB,aAAqC,EACrC,QAAkB,EAClB,YAA0B,EAC1B,cAAuB;IAEvB,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,YAAY,CAAC;IACpC,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC;IACzB,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,QAAQ,GAAG,aAAa;SAC3B,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;SACvE,MAAM,CACL,CAAC,OAAO,EAAE,EAAE,CACV,CAAC,OAAO,CAAC,KAAK,KAAK,gCAAiB,IAAI,KAAK,KAAK,0BAAU,CAAC,YA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AAE,QAAQ,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;IAE5F,MAAM,kBAAkB,GACtB,CAAC,eAAe;QAEd;YACE,sBAAM,CAAC,SAAS,CAAC,aAAa;YAC9B,sBAAM,CAAC,SAAS,CAAC,oBAAoB;YACrC,sBAAM,CAAC,SAAS,CAAC,sBAAsB;SAE1C,CAAC,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;IACxC,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;AAzCD,kEAyCC","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 {\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(errorContext.phase);\n const buildError = resolveError(buildErrorHandlers, logLines, errorContext, xcodeBuildLogs);\n\n const isUnknownUserError =\n !userFacingError ||\n (\n [\n errors.ErrorCode.UNKNOWN_ERROR,\n errors.ErrorCode.UNKNOWN_GRADLE_ERROR,\n errors.ErrorCode.UNKNOWN_FASTLANE_ERROR,\n ] as string[]\n ).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,CAAC;QACtC,OAAO;IACT,CAAC;IAED,IAAI,CAAC;QACH,MAAM,kBAAkB,GAAG,MAAM,IAAA,4CAA2B,EAAC,kBAAkB,CAAC,CAAC;QAEjF,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACxB,OAAO;QACT,CAAC;QAED,OAAO,MAAM,kBAAE,CAAC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CACnB,aAAqC,EACrC,QAAkB,EAClB,YAA0B,EAC1B,cAAuB;IAEvB,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,YAAY,CAAC;IACpC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,GAAG,CAAC;IAC/B,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,QAAQ,GAAG,aAAa;SAC3B,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAA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'@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 {\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, mode } = 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 .filter((handler) => handler.mode === mode || !handler.mode);\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(errorContext.phase);\n const buildError = resolveError(buildErrorHandlers, logLines, errorContext, xcodeBuildLogs);\n\n const isUnknownUserError =\n !userFacingError ||\n (\n [\n errors.ErrorCode.UNKNOWN_ERROR,\n errors.ErrorCode.UNKNOWN_GRADLE_ERROR,\n errors.ErrorCode.UNKNOWN_FASTLANE_ERROR,\n ] as string[]\n ).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,4 +1,4 @@
1
- import { BuildPhase, Env, Job, Platform } from '@expo/eas-build-job';
1
+ import { BuildMode, BuildPhase, Env, Job, Platform } from '@expo/eas-build-job';
2
2
  export interface ErrorContext {
3
3
  phase: BuildPhase;
4
4
  job: Job;
@@ -9,5 +9,6 @@ export interface ErrorHandler<T extends Error> {
9
9
  regexp: RegExp | ((ctx: ErrorContext) => RegExp | undefined);
10
10
  platform?: Platform;
11
11
  phase?: BuildPhase | typeof XCODE_BUILD_PHASE;
12
+ mode?: BuildMode;
12
13
  createError: (matchResult: RegExpMatchArray, errCtx: ErrorContext) => T | undefined;
13
14
  }
@@ -1 +1 @@
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"]}
1
+ {"version":3,"file":"errors.types.js","sourceRoot":"","sources":["../../src/buildErrors/errors.types.ts"],"names":[],"mappings":";;;AAQa,QAAA,iBAAiB,GAAG,aAAa,CAAC","sourcesContent":["import { BuildMode, 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 mode?: BuildMode;\n createError: (matchResult: RegExpMatchArray, errCtx: ErrorContext) => T | undefined;\n}\n"]}
@@ -186,6 +186,20 @@ To resolve this issue, downgrade to an older Xcode version using the "image" fie
186
186
  regexp: /.*/,
187
187
  createError: () => new UserFacingError(eas_build_job_1.errors.ErrorCode.UNKNOWN_GRADLE_ERROR, 'Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.'),
188
188
  },
189
+ {
190
+ platform: eas_build_job_1.Platform.IOS,
191
+ phase: eas_build_job_1.BuildPhase.RUN_FASTLANE,
192
+ mode: eas_build_job_1.BuildMode.RESIGN,
193
+ regexp: /No provisioning profile for application: '(.+)' with bundle identifier '(.+)'/,
194
+ createError: () => new UserFacingError('EAS_BUILD_RESIGN_PROVISIONING_PROFILE_MISMATCH_ERROR', `The bundle identifier in provisioning profile used to resign the app does not match the bundle identifier of the app selected to be resigned. See logs above for more information.`),
195
+ },
196
+ {
197
+ platform: eas_build_job_1.Platform.IOS,
198
+ phase: eas_build_job_1.BuildPhase.RUN_FASTLANE,
199
+ mode: eas_build_job_1.BuildMode.RESIGN,
200
+ regexp: /.*/,
201
+ createError: () => new UserFacingError(eas_build_job_1.errors.ErrorCode.UNKNOWN_FASTLANE_RESIGN_ERROR, `The "Run fastlane" step failed with an unknown error.`),
202
+ },
189
203
  {
190
204
  platform: eas_build_job_1.Platform.IOS,
191
205
  phase: eas_build_job_1.BuildPhase.RUN_FASTLANE,
@@ -1 +1 @@
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;QACE,QAAQ,EAAE,wBAAQ,CAAC,OAAO;QAC1B,KAAK,EAAE,0BAAU,CAAC,W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GAAG,EAAE,CAChB,IAAI,eAAe,CACjB,sBAAM,CAAC,SAAS,CAAC,sBAAsB,EACvC,uHAAuH,CACxH;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 the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS secrets to provide EAS Build with the file.',\n 'https://docs.expo.dev/build-reference/variables/#how-to-upload-a-secret-file-and'\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:\n /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 the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS secrets to provide EAS Build with the file.',\n 'https://docs.expo.dev/build-reference/variables/#how-to-upload-a-secret-file-and'\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 the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS secrets to provide EAS Build with the file.',\n 'https://docs.expo.dev/build-reference/variables/#how-to-upload-a-secret-file-and'\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n // example log:\n // [!] CocoaPods could not find compatible versions for pod \"react-native-google-maps\"\n // In Podfile:\n // react-native-google-maps (from `/Users/expo/workingdir/build/node_modules/react-native-maps`)\n // Specs satisfying the `react-native-google-maps (from `/Users/expo/workingdir/build/node_modules/react-native-maps`)` dependency were found, but they required a higher minimum deployment target.\n // Error: Compatible versions of some pods could not be resolved.\n regexp:\n /Specs satisfying the `(.*)` dependency were found, but they required a higher minimum deployment target/,\n createError: (_, { job }) => {\n return new UserFacingError(\n 'EAS_BUILD_HIGHER_MINIMUM_DEPLOYMENT_TARGET_ERROR',\n `Some pods require a higher minimum deployment target.\n${\n job.type === Workflow.MANAGED\n ? 'You can use the expo-build-properties config plugin (https://docs.expo.dev/versions/latest/sdk/build-properties/) to override the default native build properties and set a different minimum deployment target.'\n : 'You need to manually update the minimum deployment target in your project to resolve this issue.'\n}\n`\n );\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: () => {\n return new UserFacingError(\n 'EAS_BUILD_INCOMPATIBLE_PODS_ERROR',\n `Compatible versions of some pods could not be resolved.\nYou are seeing this error because either:\n - Some of the pods used in your project depend on different versions of the same pod. See logs for more information.\n - If you are caching Podfile.lock using \"cache\" field in eas.json, then versions there might not match required values in Podspecs of some installed libraries. To fix this, you can re-run build command with \"--clear-cache\" option, or select \"Clear cache and retry build\" on the build page.\n`\n );\n },\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // example log:\n // [stderr] npm ERR! Fix the upstream dependency conflict, or retry\n // [stderr] npm ERR! this command with --force, or --legacy-peer-deps\n // [stderr] npm ERR! to accept an incorrect (and potentially broken) dependency resolution.\n regexp:\n /Fix the upstream dependency conflict, or retry.*\\s.*this command with --force, or --legacy-peer-deps/,\n createError: (matchResult: RegExpMatchArray) => {\n if (matchResult.length >= 2) {\n return new UserFacingError(\n 'EAS_BUILD_NPM_CONFLICTING_PEER_DEPENDENCIES',\n `Some of your peer dependencies are not compatible. The recommended approach is to fix your dependencies by resolving any conflicts listed by \"npm install\". As a temporary workaround you can:\n- Add \".npmrc\" file with \"legacy-peer-deps=true\" and commit that to your repo.\n- Delete package-lock.json and use yarn instead. It does not enforce peer dependencies.\n- Downgrade to older version of npm on EAS Build, by adding \"npm install -g npm@version\" in \"eas-build-pre-install\" script in package.json.`\n );\n }\n return undefined;\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:\n /\\[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_RESOURCE_BUNDLE_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_RESOURCE_BUNDLE_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 `The \"Run fastlane\" step failed with an unknown error. Refer to \"Xcode Logs\" below for additional, more detailed logs.`\n ),\n },\n];\n"]}
1
+ {"version":3,"file":"userErrorHandlers.js","sourceRoot":"","sources":["../../src/buildErrors/userErrorHandlers.ts"],"names":[],"mappings":";;;AAAA,uDAAwF;AAExF,iDAAiE;AAEjE,IAAO,eAAe,GAAG,sBAAM,CAAC,eAAe,CAAC;AAEnC,QAAA,iBAAiB,GAAoC;IAChE;QACE,QAAQ,EAAE,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BAAU,CAAC,YAAY;QAC9B,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,eAAe,CACjB,sBAAM,CAAC,SAAS,CAAC,sBAAsB,EACvC,uHAAuH,CACxH;KACJ;CACF,CAAC","sourcesContent":["import { BuildMode, 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 the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS secrets to provide EAS Build with the file.',\n 'https://docs.expo.dev/build-reference/variables/#how-to-upload-a-secret-file-and'\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:\n /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 the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS secrets to provide EAS Build with the file.',\n 'https://docs.expo.dev/build-reference/variables/#how-to-upload-a-secret-file-and'\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 the file exists. Remember that EAS Build only uploads the files tracked by git. Use EAS secrets to provide EAS Build with the file.',\n 'https://docs.expo.dev/build-reference/variables/#how-to-upload-a-secret-file-and'\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.INSTALL_PODS,\n // example log:\n // [!] CocoaPods could not find compatible versions for pod \"react-native-google-maps\"\n // In Podfile:\n // react-native-google-maps (from `/Users/expo/workingdir/build/node_modules/react-native-maps`)\n // Specs satisfying the `react-native-google-maps (from `/Users/expo/workingdir/build/node_modules/react-native-maps`)` dependency were found, but they required a higher minimum deployment target.\n // Error: Compatible versions of some pods could not be resolved.\n regexp:\n /Specs satisfying the `(.*)` dependency were found, but they required a higher minimum deployment target/,\n createError: (_, { job }) => {\n return new UserFacingError(\n 'EAS_BUILD_HIGHER_MINIMUM_DEPLOYMENT_TARGET_ERROR',\n `Some pods require a higher minimum deployment target.\n${\n job.type === Workflow.MANAGED\n ? 'You can use the expo-build-properties config plugin (https://docs.expo.dev/versions/latest/sdk/build-properties/) to override the default native build properties and set a different minimum deployment target.'\n : 'You need to manually update the minimum deployment target in your project to resolve this issue.'\n}\n`\n );\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: () => {\n return new UserFacingError(\n 'EAS_BUILD_INCOMPATIBLE_PODS_ERROR',\n `Compatible versions of some pods could not be resolved.\nYou are seeing this error because either:\n - Some of the pods used in your project depend on different versions of the same pod. See logs for more information.\n - If you are caching Podfile.lock using \"cache\" field in eas.json, then versions there might not match required values in Podspecs of some installed libraries. To fix this, you can re-run build command with \"--clear-cache\" option, or select \"Clear cache and retry build\" on the build page.\n`\n );\n },\n },\n {\n phase: BuildPhase.INSTALL_DEPENDENCIES,\n // example log:\n // [stderr] npm ERR! Fix the upstream dependency conflict, or retry\n // [stderr] npm ERR! this command with --force, or --legacy-peer-deps\n // [stderr] npm ERR! to accept an incorrect (and potentially broken) dependency resolution.\n regexp:\n /Fix the upstream dependency conflict, or retry.*\\s.*this command with --force, or --legacy-peer-deps/,\n createError: (matchResult: RegExpMatchArray) => {\n if (matchResult.length >= 2) {\n return new UserFacingError(\n 'EAS_BUILD_NPM_CONFLICTING_PEER_DEPENDENCIES',\n `Some of your peer dependencies are not compatible. The recommended approach is to fix your dependencies by resolving any conflicts listed by \"npm install\". As a temporary workaround you can:\n- Add \".npmrc\" file with \"legacy-peer-deps=true\" and commit that to your repo.\n- Delete package-lock.json and use yarn instead. It does not enforce peer dependencies.\n- Downgrade to older version of npm on EAS Build, by adding \"npm install -g npm@version\" in \"eas-build-pre-install\" script in package.json.`\n );\n }\n return undefined;\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:\n /\\[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_RESOURCE_BUNDLE_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_RESOURCE_BUNDLE_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 mode: BuildMode.RESIGN,\n regexp: /No provisioning profile for application: '(.+)' with bundle identifier '(.+)'/,\n createError: () =>\n new UserFacingError(\n 'EAS_BUILD_RESIGN_PROVISIONING_PROFILE_MISMATCH_ERROR',\n `The bundle identifier in provisioning profile used to resign the app does not match the bundle identifier of the app selected to be resigned. See logs above for more information.`\n ),\n },\n {\n platform: Platform.IOS,\n phase: BuildPhase.RUN_FASTLANE,\n mode: BuildMode.RESIGN,\n regexp: /.*/,\n createError: () =>\n new UserFacingError(\n errors.ErrorCode.UNKNOWN_FASTLANE_RESIGN_ERROR,\n `The \"Run fastlane\" step failed with an unknown error.`\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 `The \"Run fastlane\" step failed with an unknown error. Refer to \"Xcode Logs\" below for additional, more detailed logs.`\n ),\n },\n];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"android.js","sourceRoot":"","sources":["../../src/builders/android.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AAExB,uDAA+E;AAC/E,4DAAoC;AAEpC,wCAA2E;AAC3E,sDAA4E;AAC5E,8CAI2B;AAC3B,kDAA8D;AAC9D,0CAAwD;AACxD,wDAA4D;AAC5D,0DAA+D;AAC/D,2CAA6C;AAC7C,iDAAmD;AACnD,4EAAyE;AAEzE,qCAAoD;AACpD,qCAA+C;AAEhC,KAAK,UAAU,cAAc,CAAC,GAA8B;IACzE,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,KAAK,yBAAS,CAAC,KAAK,EAAE;QACpC,MAAM,IAAA,+CAAsB,EAAC,GAAG,CAAC,CAAC;QAClC,OAAO,MAAM,IAAA,iCAAwB,EAAC,GAAG,EAAE,UAAU,CAAC,CAAC;KACxD;SAAM,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,KAAK,yBAAS,CAAC,MAAM,EAAE;QAC5C,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;KACpC;SAAM,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,KAAK,yBAAS,CAAC,MAAM,EAAE;QAC5C,OAAO,MAAM,IAAA,4BAAmB,EAAC,GAAG,CAAC,CAAC;KACvC;SAAM;QACL,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;KACpC;AACH,CAAC;AAXD,iCAWC;AAED,KAAK,UAAU,UAAU,CAAC,GAA8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AAI,EAAE;;QACxE,MAAM,IAAA,oCAAwB,EAAC,GAAG,EAAE;YAClC,aAAa,EAAE,MAAA,GAAG,CAAC,GAAG,CAAC,sBAAsB,mCAAI,0CAA0C;YAC3F,OAAO,EAAE,GAAG,CAAC,8BAA8B,EAAE;YAC7C,MAAM,EAAE,GAAG,CAAC,MAAM;SACnB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import path from 'path';\n\nimport { Android, BuildMode, BuildPhase, Workflow } from '@expo/eas-build-job';\nimport nullthrows from 'nullthrows';\n\nimport { Artifacts, BuildContext, SkipNativeBuildError } from '../context';\nimport { configureExpoUpdatesIfInstalledAsync } from '../utils/expoUpdates';\nimport {\n runGradleCommand,\n ensureLFLineEndingsInGradlewScript,\n resolveGradleCommand,\n} from '../android/gradle';\nimport { uploadApplicationArchive } from '../utils/artifacts';\nimport { Hook, runHookIfPresent } from '../utils/hooks';\nimport { restoreCredentials } from '../android/credentials';\nimport { configureBuildGradle } from '../android/gradleConfig';\nimport { setupAsync } from '../common/setup';\nimport { prebuildAsync } from '../common/prebuild';\nimport { prepareExecutableAsync } from '../utils/prepareBuildExecutable';\n\nimport { runBuilderWithHooksAsync } from './common';\nimport { runCustomBuildAsync } from './custom';\n\nexport default async function androidBuilder(ctx: BuildContext<Android.Job>): Promise<Artifacts> {\n if (ctx.job.mode === BuildMode.BUILD) {\n await prepareExecutableAsync(ctx);\n return await runBuilderWithHooksAsync(ctx, buildAsync);\n } else if (ctx.job.mode === BuildMode.RESIGN) {\n throw new Error('Not implemented');\n } else if (ctx.job.mode === BuildMode.CUSTOM) {\n return await runCustomBuildAsync(ctx);\n } else {\n throw new Error('Not implemented');\n }\n}\n\nasync function buildAsync(ctx: BuildContext<Android.Job>): Promise<void> {\n await setupAsync(ctx);\n const hasNativeCode = ctx.job.type === Workflow.GENERIC;\n\n if (hasNativeCode) {\n await ctx.runBuildPhase(BuildPhase.FIX_GRADLEW, async () => {\n await ensureLFLineEndingsInGradlewScript(ctx);\n });\n }\n\n await ctx.runBuildPhase(BuildPhase.PREBUILD, async () => {\n if (hasNativeCode) {\n ctx.markBuildPhaseSkipped();\n ctx.logger.info(\n 'Skipped running \"expo prebuild\" because the \"android\" directory already exists. Learn more about the build process: https://docs.expo.dev/build-reference/android-builds/'\n );\n return;\n }\n await prebuildAsync(ctx, {\n logger: ctx.logger,\n workingDir: ctx.getReactNativeProjectDirectory(),\n });\n });\n\n await ctx.runBuildPhase(BuildPhase.RESTORE_CACHE, async () => {\n await ctx.cacheManager?.restoreCache(ctx);\n });\n\n await ctx.runBuildPhase(BuildPhase.POST_INSTALL_HOOK, async () => {\n await runHookIfPresent(ctx, Hook.POST_INSTALL);\n });\n\n if (\n nullthrows(ctx.job.secrets, 'Secrets must be defined for non-custom builds').buildCredentials\n ) {\n await ctx.runBuildPhase(BuildPhase.PREPARE_CREDENTIALS, async () => {\n await restoreCredentials(ctx);\n await configureBuildGradle(ctx);\n });\n }\n await ctx.runBuildPhase(BuildPhase.CONFIGURE_EXPO_UPDATES, async () => {\n await configureExpoUpdatesIfInstalledAsync(ctx);\n });\n\n if (ctx.skipNativeBuild) {\n throw new SkipNativeBuildError('Skipping Gradle build');\n }\n await ctx.runBuildPhase(BuildPhase.RUN_GRADLEW, async () => {\n const gradleCommand = resolveGradleCommand(ctx.job);\n await runGradleCommand(ctx, {\n logger: ctx.logger,\n gradleCommand,\n androidDir: path.join(ctx.getReactNativeProjectDirectory(), 'android'),\n });\n });\n\n await ctx.runBuildPhase(BuildPhase.PRE_UPLOAD_ARTIFACTS_HOOK, async () => {\n await runHookIfPresent(ctx, Hook.PRE_UPLOAD_ARTIFACTS);\n });\n\n await ctx.runBuildPhase(BuildPhase.SAVE_CACHE, async () => {\n await ctx.cacheManager?.saveCache(ctx);\n });\n\n await ctx.runBuildPhase(BuildPhase.UPLOAD_APPLICATION_ARCHIVE, async () => {\n await uploadApplicationArchive(ctx, {\n patternOrPath: ctx.job.applicationArchivePath ?? 'android/app/build/outputs/**/*.{apk,aab}',\n rootDir: ctx.getReactNativeProjectDirectory(),\n logger: ctx.logger,\n });\n });\n}\n"]}
1
+ {"version":3,"file":"android.js","sourceRoot":"","sources":["../../src/builders/android.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AAExB,uDAA+E;AAC/E,4DAAoC;AAEpC,wCAA2E;AAC3E,sDAA4E;AAC5E,8CAI2B;AAC3B,kDAA8D;AAC9D,0CAAwD;AACxD,wDAA4D;AAC5D,0DAA+D;AAC/D,2CAA6C;AAC7C,iDAAmD;AACnD,4EAAyE;AAEzE,qCAAoD;AACpD,qCAA+C;AAEhC,KAAK,UAAU,cAAc,CAAC,GAA8B;IACzE,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,KAAK,yBAAS,CAAC,KAAK,EAAE,CAAC;QACrC,MAAM,IAAA,+CAAsB,EAAC,GAAG,CAAC,CAAC;QAClC,OAAO,MAAM,IAAA,iCAAwB,EAAC,GAAG,EAAE,UAAU,CAAC,CAAC;IACzD,CAAC;SAAM,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,KAAK,yBAAS,CAAC,MAAM,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;SAAM,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,KAAK,yBAAS,CAAC,MAAM,EAAE,CAAC;QAC7C,OAAO,MAAM,IAAA,4BAAmB,EAAC,GAAG,CAAC,CAAC;IACxC,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;AACH,CAAC;AAXD,iCAWC;AAED,KAAK,UAAU,UAAU,CAAC,GAA8B;IACtD,MAAM,IAAA,kBAAU,EAAC,GAAG,CAAC,CAAC;IACtB,MAAM,aAAa,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,KAAK,wBAAQ,CAAC,OAAO,CAAC;IAExD,IAAI,aAAa,EAAE,CAAC;Q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AA0C;YAC3F,OAAO,EAAE,GAAG,CAAC,8BAA8B,EAAE;YAC7C,MAAM,EAAE,GAAG,CAAC,MAAM;SACnB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import path from 'path';\n\nimport { Android, BuildMode, BuildPhase, Workflow } from '@expo/eas-build-job';\nimport nullthrows from 'nullthrows';\n\nimport { Artifacts, BuildContext, SkipNativeBuildError } from '../context';\nimport { configureExpoUpdatesIfInstalledAsync } from '../utils/expoUpdates';\nimport {\n runGradleCommand,\n ensureLFLineEndingsInGradlewScript,\n resolveGradleCommand,\n} from '../android/gradle';\nimport { uploadApplicationArchive } from '../utils/artifacts';\nimport { Hook, runHookIfPresent } from '../utils/hooks';\nimport { restoreCredentials } from '../android/credentials';\nimport { configureBuildGradle } from '../android/gradleConfig';\nimport { setupAsync } from '../common/setup';\nimport { prebuildAsync } from '../common/prebuild';\nimport { prepareExecutableAsync } from '../utils/prepareBuildExecutable';\n\nimport { runBuilderWithHooksAsync } from './common';\nimport { runCustomBuildAsync } from './custom';\n\nexport default async function androidBuilder(ctx: BuildContext<Android.Job>): Promise<Artifacts> {\n if (ctx.job.mode === BuildMode.BUILD) {\n await prepareExecutableAsync(ctx);\n return await runBuilderWithHooksAsync(ctx, buildAsync);\n } else if (ctx.job.mode === BuildMode.RESIGN) {\n throw new Error('Not implemented');\n } else if (ctx.job.mode === BuildMode.CUSTOM) {\n return await runCustomBuildAsync(ctx);\n } else {\n throw new Error('Not implemented');\n }\n}\n\nasync function buildAsync(ctx: BuildContext<Android.Job>): Promise<void> {\n await setupAsync(ctx);\n const hasNativeCode = ctx.job.type === Workflow.GENERIC;\n\n if (hasNativeCode) {\n await ctx.runBuildPhase(BuildPhase.FIX_GRADLEW, async () => {\n await ensureLFLineEndingsInGradlewScript(ctx);\n });\n }\n\n await ctx.runBuildPhase(BuildPhase.PREBUILD, async () => {\n if (hasNativeCode) {\n ctx.markBuildPhaseSkipped();\n ctx.logger.info(\n 'Skipped running \"expo prebuild\" because the \"android\" directory already exists. Learn more about the build process: https://docs.expo.dev/build-reference/android-builds/'\n );\n return;\n }\n await prebuildAsync(ctx, {\n logger: ctx.logger,\n workingDir: ctx.getReactNativeProjectDirectory(),\n });\n });\n\n await ctx.runBuildPhase(BuildPhase.RESTORE_CACHE, async () => {\n await ctx.cacheManager?.restoreCache(ctx);\n });\n\n await ctx.runBuildPhase(BuildPhase.POST_INSTALL_HOOK, async () => {\n await runHookIfPresent(ctx, Hook.POST_INSTALL);\n });\n\n if (\n nullthrows(ctx.job.secrets, 'Secrets must be defined for non-custom builds').buildCredentials\n ) {\n await ctx.runBuildPhase(BuildPhase.PREPARE_CREDENTIALS, async () => {\n await restoreCredentials(ctx);\n await configureBuildGradle(ctx);\n });\n }\n await ctx.runBuildPhase(BuildPhase.CONFIGURE_EXPO_UPDATES, async () => {\n await configureExpoUpdatesIfInstalledAsync(ctx);\n });\n\n if (ctx.skipNativeBuild) {\n throw new SkipNativeBuildError('Skipping Gradle build');\n }\n await ctx.runBuildPhase(BuildPhase.RUN_GRADLEW, async () => {\n const gradleCommand = resolveGradleCommand(ctx.job);\n await runGradleCommand(ctx, {\n logger: ctx.logger,\n gradleCommand,\n androidDir: path.join(ctx.getReactNativeProjectDirectory(), 'android'),\n });\n });\n\n await ctx.runBuildPhase(BuildPhase.PRE_UPLOAD_ARTIFACTS_HOOK, async () => {\n await runHookIfPresent(ctx, Hook.PRE_UPLOAD_ARTIFACTS);\n });\n\n await ctx.runBuildPhase(BuildPhase.SAVE_CACHE, async () => {\n await ctx.cacheManager?.saveCache(ctx);\n });\n\n await ctx.runBuildPhase(BuildPhase.UPLOAD_APPLICATION_ARCHIVE, async () => {\n await uploadApplicationArchive(ctx, {\n patternOrPath: ctx.job.applicationArchivePath ?? 'android/app/build/outputs/**/*.{apk,aab}',\n rootDir: ctx.getReactNativeProjectDirectory(),\n logger: ctx.logger,\n });\n });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"common.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a,CAAC,0BAAU,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;gBACpE,MAAM,IAAA,4CAAgC,EAAC,GAAG,EAAE;oBAC1C,MAAM,EAAE,GAAG,CAAC,MAAM;iBACnB,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;SACJ;KACF;IAAC,OAAO,GAAQ,EAAE;QACjB,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;QAC9B,MAAM,GAAG,CAAC;KACX;IAED,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,mBAAmB,EAAE;QACtC,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;KAC5D;IAED,OAAO,GAAG,CAAC,SAAS,CAAC;AACvB,CAAC;AAhDD,4DAgDC","sourcesContent":["import { BuildPhase, Ios, Job, Platform } from '@expo/eas-build-job';\n\nimport { Artifacts, BuildContext } from '../context';\nimport { findAndUploadXcodeBuildLogsAsync } from '../ios/xcodeBuildLogs';\nimport { maybeFindAndUploadBuildArtifacts } from '../utils/artifacts';\nimport { Hook, runHookIfPresent } from '../utils/hooks';\n\nexport async function runBuilderWithHooksAsync<T extends Job>(\n ctx: BuildContext<T>,\n builderAsync: (ctx: BuildContext<T>) => Promise<void>\n): Promise<Artifacts> {\n try {\n let buildSuccess = true;\n try {\n await builderAsync(ctx);\n await ctx.runBuildPhase(BuildPhase.ON_BUILD_SUCCESS_HOOK, async () => {\n await runHookIfPresent(ctx, Hook.ON_BUILD_SUCCESS);\n });\n } catch (err: any) {\n buildSuccess = false;\n await ctx.runBuildPhase(BuildPhase.ON_BUILD_ERROR_HOOK, async () => {\n await runHookIfPresent(ctx, Hook.ON_BUILD_ERROR);\n });\n throw err;\n } finally {\n await ctx.runBuildPhase(BuildPhase.ON_BUILD_COMPLETE_HOOK, async () => {\n await runHookIfPresent(ctx, Hook.ON_BUILD_COMPLETE, {\n extraEnvs: {\n EAS_BUILD_STATUS: buildSuccess ? 'finished' : 'errored',\n },\n });\n });\n\n if (ctx.job.platform === Platform.IOS) {\n await findAndUploadXcodeBuildLogsAsync(ctx as BuildContext<Ios.Job>, {\n logger: ctx.logger,\n });\n }\n\n await ctx.runBuildPhase(BuildPhase.UPLOAD_BUILD_ARTIFACTS, async () => {\n await maybeFindAndUploadBuildArtifacts(ctx, {\n logger: ctx.logger,\n });\n });\n }\n } catch (err: any) {\n err.artifacts = ctx.artifacts;\n throw err;\n }\n\n if (!ctx.artifacts.APPLICATION_ARCHIVE) {\n throw new Error('Builder must upload application archive');\n }\n\n return ctx.artifacts;\n}\n"]}
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/builders/common.ts"],"names":[],"mappings":";;;AAAA,uDAAqE;AAGrE,0DAAyE;AACzE,kDAAsE;AACtE,0CAAwD;AAEjD,KAAK,UAAU,wBAAwB,CAC5C,GAAoB,EACpB,YAAqD;IAErD,IAAI,CAAC;QACH,IAAI,YAAY,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC;YACH,MAAM,YAAY,CAAC,GAAG,CAAC,CAAC;YACxB,MAAM,GAAG,CAAC,aAAa,CAAC,0BAAU,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;gBACnE,MAAM,IAAA,wBAAgB,EAAC,GAAG,EAAE,YAAI,CAAC,gBAAgB,CAAC,CAAC;YACrD,CAAC,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,YAAY,GAAG,KAAK,CAAC;YACrB,MAAM,GAAG,CAAC,aAAa,CAAC,0BAAU,CAAC,mBAAmB,EAAE,KAAK,IAAI,EAAE;gBACjE,MAAM,IAAA,wBAAgB,EAAC,GAAG,EAAE,YAAI,CAAC,cAAc,CAAC,CAAC;YACnD,CAAC,CAAC,CAAC;YACH,MAAM,GAAG,CAAC;QACZ,CAAC;gBAAS,CAAC;YACT,MAAM,GAAG,CAAC,aAAa,CAAC,0BAAU,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;gBACpE,MAAM,IAAA,wBAAgB,EAAC,GAAG,EAAE,YAAI,CAAC,iBAAiB,EAAE;oBAClD,SAAS,EAAE;wBACT,gBAAgB,EAAE,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;qBACxD;iBACF,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,IAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,KAAK,wBAAQ,CAAC,GAAG,EAAE,CAAC;gBACtC,MAAM,IAAA,iDAAgC,EAAC,GAA4B,EAAE;oBACnE,MAAM,EAAE,GAAG,CAAC,MAAM;iBACnB,CAAC,CAAC;YACL,CAAC;YAED,MAAM,GAAG,CAAC,aAAa,CAAC,0BAAU,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;gBACpE,MAAM,IAAA,4CAAgC,EAAC,GAAG,EAAE;oBAC1C,MAAM,EAAE,GAAG,CAAC,MAAM;iBACnB,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;QAC9B,MAAM,GAAG,CAAC;IACZ,CAAC;IAED,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,mBAAmB,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IAED,OAAO,GAAG,CAAC,SAAS,CAAC;AACvB,CAAC;AAhDD,4DAgDC","sourcesContent":["import { BuildPhase, Ios, Job, Platform } from '@expo/eas-build-job';\n\nimport { Artifacts, BuildContext } from '../context';\nimport { findAndUploadXcodeBuildLogsAsync } from '../ios/xcodeBuildLogs';\nimport { maybeFindAndUploadBuildArtifacts } from '../utils/artifacts';\nimport { Hook, runHookIfPresent } from '../utils/hooks';\n\nexport async function runBuilderWithHooksAsync<T extends Job>(\n ctx: BuildContext<T>,\n builderAsync: (ctx: BuildContext<T>) => Promise<void>\n): Promise<Artifacts> {\n try {\n let buildSuccess = true;\n try {\n await builderAsync(ctx);\n await ctx.runBuildPhase(BuildPhase.ON_BUILD_SUCCESS_HOOK, async () => {\n await runHookIfPresent(ctx, Hook.ON_BUILD_SUCCESS);\n });\n } catch (err: any) {\n buildSuccess = false;\n await ctx.runBuildPhase(BuildPhase.ON_BUILD_ERROR_HOOK, async () => {\n await runHookIfPresent(ctx, Hook.ON_BUILD_ERROR);\n });\n throw err;\n } finally {\n await ctx.runBuildPhase(BuildPhase.ON_BUILD_COMPLETE_HOOK, async () => {\n await runHookIfPresent(ctx, Hook.ON_BUILD_COMPLETE, {\n extraEnvs: {\n EAS_BUILD_STATUS: buildSuccess ? 'finished' : 'errored',\n },\n });\n });\n\n if (ctx.job.platform === Platform.IOS) {\n await findAndUploadXcodeBuildLogsAsync(ctx as BuildContext<Ios.Job>, {\n logger: ctx.logger,\n });\n }\n\n await ctx.runBuildPhase(BuildPhase.UPLOAD_BUILD_ARTIFACTS, async () => {\n await maybeFindAndUploadBuildArtifacts(ctx, {\n logger: ctx.logger,\n });\n });\n }\n } catch (err: any) {\n err.artifacts = ctx.artifacts;\n throw err;\n }\n\n if (!ctx.artifacts.APPLICATION_ARCHIVE) {\n throw new Error('Builder must upload application archive');\n }\n\n return ctx.artifacts;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"custom.js","sourceRoot":"","sources":["../../src/builders/custom.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,uDAAsD;AACtD,uCAAgF;AAChF,4DAAoC;AAGpC,6DAAsE;AACtE,wDAAwD;AACxD,8DAA2D;AAEpD,KAAK,UAAU,mBAAmB,CAAgB,GAAoB;;IAC3E,MAAM,cAAc,GAAG,IAAI,uCAAkB,CAAC,GAAG,CAAC,CAAC;IACnD,MAAM,IAAA,2CAA0B,EAAC,GAAG,EAAE,cAAc,CAAC,sBAAsB,CAAC,CAAC;IAC7E,MAAM,kBAAkB,GAAG,IAAA,oBAAU,EACnC,MAAA,GA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nimport { BuildConfigParser, BuildStepGlobalContext, errors } from '@expo/steps';\nimport nullthrows from 'nullthrows';\n\nimport { Artifacts, BuildContext } from '../context';\nimport { prepareProjectSourcesAsync } from '../common/projectSources';\nimport { getEasFunctions } from '../steps/easFunctions';\nimport { CustomBuildContext } from '../customBuildContext';\n\nexport async function runCustomBuildAsync<T extends Job>(ctx: BuildContext<T>): Promise<Artifacts> {\n const customBuildCtx = new CustomBuildContext(ctx);\n await prepareProjectSourcesAsync(ctx, customBuildCtx.projectSourceDirectory);\n const relativeConfigPath = nullthrows(\n ctx.job.customBuildConfig?.path,\n 'Custom build config must be defined for custom builds'\n );\n const configPath = path.join(\n ctx.getReactNativeProjectDirectory(customBuildCtx.projectSourceDirectory),\n relativeConfigPath\n );\n\n const globalContext = new BuildStepGlobalContext(customBuildCtx, false);\n const easFunctions = getEasFunctions(customBuildCtx);\n const parser = new BuildConfigParser(globalContext, {\n externalFunctions: easFunctions,\n configPath,\n });\n const workflow = await ctx.runBuildPhase(BuildPhase.PARSE_CUSTOM_WORKFLOW_CONFIG, async () => {\n try {\n return await parser.parseAsync();\n } catch (parseError: any) {\n ctx.logger.error('Failed to parse the custom build config file.');\n if (parseError instanceof errors.BuildWorkflowError) {\n for (const err of parseError.errors) {\n ctx.logger.error({ err });\n }\n }\n throw parseError;\n }\n });\n try {\n await workflow.executeAsync();\n } catch (err: any) {\n err.artifacts = ctx.artifacts;\n throw err;\n }\n\n return ctx.artifacts;\n}\n"]}
1
+ {"version":3,"file":"custom.js","sourceRoot":"","sources":["../../src/builders/custom.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,uDAAsD;AACtD,uCAAgF;AAChF,4DAAoC;AAGpC,6DAAsE;AACtE,wDAAwD;AACxD,8DAA2D;AAEpD,KAAK,UAAU,mBAAmB,CAAgB,GAAoB;;IAC3E,MAAM,cAAc,GAAG,IAAI,uCAAkB,CAAC,GAAG,CAAC,CAAC;IACnD,MAAM,IAAA,2CAA0B,EAAC,G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AC,SAAS,CAAC;QAC9B,MAAM,GAAG,CAAC;IACZ,CAAC;IAED,OAAO,GAAG,CAAC,SAAS,CAAC;AACvB,CAAC;AAvCD,kDAuCC","sourcesContent":["import path from 'path';\n\nimport { BuildPhase, Job } from '@expo/eas-build-job';\nimport { BuildConfigParser, BuildStepGlobalContext, errors } from '@expo/steps';\nimport nullthrows from 'nullthrows';\n\nimport { Artifacts, BuildContext } from '../context';\nimport { prepareProjectSourcesAsync } from '../common/projectSources';\nimport { getEasFunctions } from '../steps/easFunctions';\nimport { CustomBuildContext } from '../customBuildContext';\n\nexport async function runCustomBuildAsync<T extends Job>(ctx: BuildContext<T>): Promise<Artifacts> {\n const customBuildCtx = new CustomBuildContext(ctx);\n await prepareProjectSourcesAsync(ctx, customBuildCtx.projectSourceDirectory);\n const relativeConfigPath = nullthrows(\n ctx.job.customBuildConfig?.path,\n 'Custom build config must be defined for custom builds'\n );\n const configPath = path.join(\n ctx.getReactNativeProjectDirectory(customBuildCtx.projectSourceDirectory),\n relativeConfigPath\n );\n\n const globalContext = new BuildStepGlobalContext(customBuildCtx, false);\n const easFunctions = getEasFunctions(customBuildCtx);\n const parser = new BuildConfigParser(globalContext, {\n externalFunctions: easFunctions,\n configPath,\n });\n const workflow = await ctx.runBuildPhase(BuildPhase.PARSE_CUSTOM_WORKFLOW_CONFIG, async () => {\n try {\n return await parser.parseAsync();\n } catch (parseError: any) {\n ctx.logger.error('Failed to parse the custom build config file.');\n if (parseError instanceof errors.BuildWorkflowError) {\n for (const err of parseError.errors) {\n ctx.logger.error({ err });\n }\n }\n throw parseError;\n }\n });\n try {\n await workflow.executeAsync();\n } catch (err: any) {\n err.artifacts = ctx.artifacts;\n throw err;\n }\n\n return ctx.artifacts;\n}\n"]}