I’m working on a managed expo app and I use eas services. I try to make an internal distribution build, on android it’s ok but on my ios build fail with this error :
Metro encountered an error:
Cannot read property 'transformFile' of undefined
▸ PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/expo/Library/Developer/Xcode/DerivedData/greengot-djveyphpwyosjubjkipdmcftptmp/Build/Intermediates.noindex/ArchiveIntermediates/greengot/IntermediateBuildFilesPath/greengot.build/Debug-iphoneos/greengot.build/Script-00DD1BFF1BD5951E006B06BC.sh
Here is the diff version I’m using:
“expo”: “^41.0.0”
“react”: “^17.0.2”
“react-native”: “https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz”
and here is the fastlane step:
Creating Gymfile
Gymfile created
Successfully loaded '/Users/expo/workingdir/build/ios/Gymfile' 📄
+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| Detected Values from './Gymfile' |
+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| suppress_xcode_output | true |
| clean | false |
| scheme | greengot |
| configuration | Debug |
| export_options | |
| export_xcargs | OTHER_CODE_SIGN_FLAGS="--keychain /var/folders/97/73j93h690g9gdn54bh_zskm40000gn/T/turtle-v2-7e963dc1-4490-447d-a422-5fbf97c2632f.keychain" |
| disable_xcpretty | true |
| buildlog_path | /Users/expo/workingdir/logs |
| output_directory | ./build |
+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
Resolving Swift Package Manager dependencies...
$ xcodebuild -resolvePackageDependencies -workspace ./greengot.xcworkspace -scheme greengot -configuration Debug
▸ Command line invocation:
▸ /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -workspace ./greengot.xcworkspace -scheme greengot -configuration Debug
▸ resolved source packages:
$ xcodebuild -showBuildSettings -workspace ./greengot.xcworkspace -scheme greengot -configuration Debug
Command timed out after 3 seconds on try 1 of 4, trying again with a 6 second timeout...
[stderr] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` attempted to initialize an object with an unknown UUID. `A180AD5A7D66431C803F218B` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.
Detected provisioning profile mapping: {:"com.green-got"=>"296dd604-7da4-4693-8537-ce89ee1ff259"}
[stderr] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` attempted to initialize an object with an unknown UUID. `A180AD5A7D66431C803F218B` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| Summary for gym 2.178.0 |
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| workspace | ./greengot.xcworkspace |
| scheme | greengot |
| clean | false |
| output_directory | ./build |
| output_name | green-got |
| configuration | Debug |
| silent | false |
| skip_package_ipa | false |
| skip_package_pkg | false |
| export_options.method | ad-hoc |
| export_options.provisioningProfiles.com.green-got | 296dd604-7da4-4693-8537-ce89ee1ff259 |
| export_xcargs | OTHER_CODE_SIGN_FLAGS="--keychain /var/folders/97/73j93h690g9gdn54bh_zskm40000gn/T/turtle-v2-7e963dc1-4490-447d-a422-5fbf97c2632f.keychain" |
| build_path | /Users/expo/Library/Developer/Xcode/Archives/2021-08-16 |
| result_bundle | false |
| buildlog_path | /Users/expo/workingdir/logs |
| destination | generic/platform=iOS |
| suppress_xcode_output | true |
| disable_xcpretty | true |
| skip_profile_detection | false |
| skip_package_dependencies_resolution | false |
| disable_package_automatic_updates | false |
| use_system_scm | false |
| xcode_path | /Applications/Xcode.app |
+---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
$ set -o pipefail && xcodebuild -workspace ./greengot.xcworkspace -scheme greengot -configuration Debug -destination 'generic/platform=iOS' -archivePath /Users/expo/Library/Developer/Xcode/Archives/2021-08-16/green-got\ 2021-08-16\ 01.25.16.xcarchive archive | tee /Users/expo/workingdir/logs/green-got-greengot.log > /dev/null
› Executing @unimodules/core Pods/UMCore » [CP] Copy XCFrameworks
› Preparing react-native Pods/React-Core-AccessibilityResources » ResourceBundle-AccessibilityResources-React-Core-Info.plist
...
› Executing lottie-react-native Pods/lottie-react-native » Copy generated compatibility header
› Packaging react-native-reanimated Pods/RNReanimated » libRNReanimated.a
› Compiling Pods/Pods-greengot » Pods-greengot-dummy.m
› Packaging Pods/Pods-greengot » libPods-greengot.a
Provisioning profile "*[expo] com.green-got AdHoc 1629101826578" for "greengot" contains entitlements that aren't in the entitlements file: com.apple.developer.associated-domains.mdm-managed. To use these entitlements, add them to your entitlements file. Otherwise, remove unused entitlements from your provisioning profile. (in target 'greengot' from project 'greengot')
› Executing greengot » [CP] Check Pods Manifest.lock
› Executing greengot » Start Packager
› Compiling greengot » noop-file.swift
› Compiling greengot » green-got_vers.c
› Compiling greengot » main.m
› Compiling greengot » AppDelegate.m
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
› Linking greengot » green-got
› Copying ios/greengot/Supporting/Expo.plist ➜ Expo.plist
› Compiling greengot » SplashScreen.storyboard
› Compiling greengot » LaunchScreen.xib
› Preparing greengot » Info.plist
› Executing greengot » Bundle React Native code and images
the transform cache was reset.
❌ Metro encountered an error:
Cannot read property 'transformFile' of undefined
› Generating debug greengot » green-got.app.dSYM
⚠️ Pods/boost-for-react-native: iOS@8.0 deployment version mismatch, expected >= 9.0 <= 14.4.99
▸ ** ARCHIVE FAILED **
▸ The following build commands failed:
▸ PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/expo/Library/Developer/Xcode/DerivedData/greengot-djveyphpwyosjubjkipdmcftptmp/Build/Intermediates.noindex/ArchiveIntermediates/greengot/IntermediateBuildFilesPath/greengot.build/Debug-iphoneos/greengot.build/Script-00DD1BFF1BD5951E006B06BC.sh
▸ (1 failure)
** ARCHIVE FAILED **
The following build commands failed:
PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/expo/Library/Developer/Xcode/DerivedData/greengot-djveyphpwyosjubjkipdmcftptmp/Build/Intermediates.noindex/ArchiveIntermediates/greengot/IntermediateBuildFilesPath/greengot.build/Debug-iphoneos/greengot.build/Script-00DD1BFF1BD5951E006B06BC.sh
(1 failure)
Exit status: 65
+-------------+-------------------------+
| Build environment |
+-------------+-------------------------+
| xcode_path | /Applications/Xcode.app |
| gym_version | 2.178.0 |
| sdk | iPhoneOS14.4.sdk |
+-------------+-------------------------+
Looks like fastlane ran into a build/archive error with your project
It's hard to tell what's causing the error, so we wrote some guides on how
to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
Before submitting an issue on GitHub, please follow the guide above and make
sure your project is set up correctly.
fastlane uses `xcodebuild` commands to generate your binary, you can see the
the full commands printed out in yellow in the above log.
Make sure to inspect the output above, as usually you'll find more error information there
[stderr] [!] Error building the application - see the log above
Error: Fastlane build failed with unknown error. Please refer to the "Run fastlane" and "Xcode Logs" phases.
Fastlane errors in most cases are not printed at the end of the output, so you may not find any useful information in the last lines of output when looking for an error message.
On in my ios log I have this error:
Welcome to Metro!
Fast - Scalable - Integrated
Failed to construct transformer: TypeError: Transformer is not a constructor
at getTransformCacheKey (/Users/expo/workingdir/build/node_modules/metro/src/DeltaBundler/Transformer/getTransformCacheKey.js:33:31)
at new Transformer (/Users/expo/workingdir/build/node_modules/metro/src/DeltaBundler/Transformer.js:147:28)
at /Users/expo/workingdir/build/node_modules/metro/src/Bundler.js:54:29
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Error: @build-script-error-begin
Error loading assets JSON from Metro. Ensure you've followed all expo-updates installation steps correctly. Cannot read property 'transformFile' of undefined
@build-script-error-end
at /Users/expo/workingdir/build/node_modules/expo-updates/scripts/createManifest.js:39:11
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Command PhaseScriptExecution failed with a nonzero exit code
GenerateDSYMFile /Users/expo/Library/Developer/Xcode/DerivedData/greengot-djveyphpwyosjubjkipdmcftptmp/Build/Intermediates.noindex/ArchiveIntermediates/greengot/BuildProductsPath/Debug-iphoneos/green-got.app.dSYM /Users/expo/Library/Developer/Xcode/DerivedData/greengot-djveyphpwyosjubjkipdmcftptmp/Build/Intermediates.noindex/ArchiveIntermediates/greengot/InstallationBuildProductsLocation/Applications/green-got.app/green-got (in target 'greengot' from project 'greengot')
Ps: I don’t have expo-updates on my dependencies
If it can help … here is my app.json :
{
"expo": {
"name": "green-got",
"slug": "green-got",
"version": "0.0.1",
"privacy": "unlisted",
"orientation": "portrait",
"owner": "greengot",
"sdkVersion": "41.0.0",
"icon": "./assets/images/app-icon.png",
"splash": {
"image": "./assets/images/splash2.png",
"resizeMode": "cover",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": ["assets/**/*"],
"ios": {
"bundleIdentifier": "com.green-got",
"buildNumber": "1.0.0",
"supportsTablet": true,
"infoPlist": {
"NSAppTransportSecurity": {
"NSExceptionDomains": {
"192.168.1.76": {
"NSTemporaryExceptionAllowsInsecureHTTPLoads": true
},
"'https://green-got.com": {
"NSTemporaryExceptionAllowsInsecureHTTPLoads": true
}
}
},
"CFBundleAllowMixedLocalizations": true
},
"backgroundColor": "#FFF"
},
"android": {
"package": "com.green_got.preview",
"versionCode": 1,
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
}
},
"web": {
"favicon": "./assets/images/favicon.png",
"build": {
"babel": {
"include": ["./shared"]
}
}
},
"description": ""
}
}
Ps2 : I’m on a mac M1
Do you understand this error and haw can I fix it?