Hi
In my React Native app, when attempting to create an iOS archive, I encounter a build failed error. Xcode indicates that this is due to a failed script named "Bundle React Native code and images," and I receive the following error message:
[[ ! -f /Users/fali3/Library/Developer/Xcode/DerivedData/MyOSN-bwnqxgeohhfshgebpsvxaphgfpuq/Build/Intermediates.noindex/ArchiveIntermediates/MyOSN/BuildProductsPath/Release-iphoneos/MyOSN.app/main.jsbundle ]]
Starting upload.
Upload of /Users/fali3/Library/Developer/Xcode/DerivedData/MyOSN-bwnqxgeohhfshgebpsvxaphgfpuq/Build/Intermediates.noindex/ArchiveIntermediates/MyOSN/IntermediateBuildFilesPath/MyOSN.build/Release-iphoneos/MyOSN.build/DerivedSources/main.jsbundle.map for bundle main.jsbundle on platform ios with project path /Users/fali3/Documents/MYOSN/ios
version: 1.6.4 build: 42 service: com.osn.myosn-testing
Please ensure you use the same values during SDK initialization to guarantee the success of the unminify process.
After upload is successful sourcemap files will be processed and ready to use within the next 5 minutes.
Uploading sourcemap /Users/fali3/Library/Developer/Xcode/DerivedData/MyOSN-bwnqxgeohhfshgebpsvxaphgfpuq/Build/Intermediates.noindex/ArchiveIntermediates/MyOSN/IntermediateBuildFilesPath/MyOSN.build/Release-iphoneos/MyOSN.build/DerivedSources/main.jsbundle.map for JS file main.jsbundle
[attempt 1] Retrying sourcemap upload [/Users/fali3/Library/Developer/Xcode/DerivedData/MyOSN-bwnqxgeohhfshgebpsvxaphgfpuq/Build/Intermediates.noindex/ArchiveIntermediates/MyOSN/IntermediateBuildFilesPath/MyOSN.build/Release-iphoneos/MyOSN.build/DerivedSources/main.jsbundle.map]: getaddrinfo ENOTFOUND sourcemap-intake.us5
[attempt 2] Retrying sourcemap upload [/Users/fali3/Library/Developer/Xcode/DerivedData/MyOSN-bwnqxgeohhfshgebpsvxaphgfpuq/Build/Intermediates.noindex/ArchiveIntermediates/MyOSN/IntermediateBuildFilesPath/MyOSN.build/Release-iphoneos/MyOSN.build/DerivedSources/main.jsbundle.map]: getaddrinfo ENOTFOUND sourcemap-intake.us5
[attempt 3] Retrying sourcemap upload [/Users/fali3/Library/Developer/Xcode/DerivedData/MyOSN-bwnqxgeohhfshgebpsvxaphgfpuq/Build/Intermediates.noindex/ArchiveIntermediates/MyOSN/IntermediateBuildFilesPath/MyOSN.build/Release-iphoneos/MyOSN.build/DerivedSources/main.jsbundle.map]: getaddrinfo ENOTFOUND sourcemap-intake.us5
[attempt 4] Retrying sourcemap upload [/Users/fali3/Library/Developer/Xcode/DerivedData/MyOSN-bwnqxgeohhfshgebpsvxaphgfpuq/Build/Intermediates.noindex/ArchiveIntermediates/MyOSN/IntermediateBuildFilesPath/MyOSN.build/Release-iphoneos/MyOSN.build/DerivedSources/main.jsbundle.map]: getaddrinfo ENOTFOUND sourcemap-intake.us5
[attempt 5] Retrying sourcemap upload [/Users/fali3/Library/Developer/Xcode/DerivedData/MyOSN-bwnqxgeohhfshgebpsvxaphgfpuq/Build/Intermediates.noindex/ArchiveIntermediates/MyOSN/IntermediateBuildFilesPath/MyOSN.build/Release-iphoneos/MyOSN.build/DerivedSources/main.jsbundle.map]: getaddrinfo ENOTFOUND sourcemap-intake.us5
❌ Failed upload sourcemap for [/Users/fali3/Library/Developer/Xcode/DerivedData/MyOSN-bwnqxgeohhfshgebpsvxaphgfpuq/Build/Intermediates.noindex/ArchiveIntermediates/MyOSN/IntermediateBuildFilesPath/MyOSN.build/Release-iphoneos/MyOSN.build/DerivedSources/main.jsbundle.map]: getaddrinfo ENOTFOUND sourcemap-intake.us5
Command summary:
❌ Some sourcemaps have not been uploaded correctly.
Details about the 1 found sourcemap:
1 sourcemap failed to upload
WARN: Error: Could not flush metrics to api.US5: Error: getaddrinfo ENOTFOUND api.US5
Command PhaseScriptExecution failed with a nonzero exit code
Node version- 20.11.1
react-native version - 0.73.6
@datadog/mobile-react-native version - 2.2.0
@datadog/datadog-ci - 2.32.1
It appears that the uploading of the source map file is failing, causing the issue.
Hi In my React Native app, when attempting to create an iOS archive, I encounter a build failed error. Xcode indicates that this is due to a failed script named "Bundle React Native code and images," and I receive the following error message:
PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/fali3/Library/Developer/Xcode/DerivedData/MyOSN-bwnqxgeohhfshgebpsvxaphgfpuq/Build/Intermediates.noindex/ArchiveIntermediates/MyOSN/IntermediateBuildFilesPath/MyOSN.build/Release-iphoneos/MyOSN.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'MyOSN' from project 'MyOSN') cd /Users/fali3/Documents/MYOSN/ios export ACTION\=install export AD_HOC_CODE_SIGNING_ALLOWED\=NO export AGGREGATE_TRACKED_DOMAINS\=YES export ALLOW_TARGET_PLATFORM_SPECIALIZATION\=NO export ALTERNATE_GROUP\=864684000 export ALTERNATE_MODE\=u+w,go-w,a+rX export ALTERNATE_OWNER\=fali3 export ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES\=YES export ALWAYS_SEARCH_USER_PATHS\=NO export ALWAYS_USE_SEPARATE_HEADERMAPS\=NO export APPLE_INTERNAL_DEVELOPER_DIR\=/AppleInternal/Developer export APPLE_INTERNAL_DIR\=/AppleInternal export APPLE_INTERNAL_DOCUMENTATION_DIR\=/AppleInternal/Documentation export APPLE_INTERNAL_LIBRARY_DIR\=/AppleInternal/Library export APPLE_INTERNAL_TOOLS\=/AppleInternal/Developer/Tools export APPLICATION_EXTENSION_API_ONLY\=NO export APPLY_RULES_IN_COPY_FILES\=NO export APPLY_RULES_IN_COPY_HEADERS\=NO export APP_SHORTCUTS_ENABLE_FLEXIBLE_MATCHING\=YES export ARCHS\=arm64 export ARCHS_STANDARD\=arm64 export ARCHS_STANDARD_32_64_BIT\=armv7\ arm64 export ARCHS_STANDARD_32_BIT\=armv7 export ARCHS_STANDARD_64_BIT\=arm64 export ARCHS_STANDARD_INCLUDING_64_BIT\=arm64 export ARCHS_UNIVERSAL_IPHONE_OS\=armv7\ arm64 export ASSETCATALOG_COMPILER_APPICON_NAME\=AppIcon export ASSETCATALOG_COMPILER_FLATTENED_APP_ICON_PATH\=/Users/fali3/Library/Developer/Xcode/DerivedData/MyOSN-bwnqxgeohhfshgebpsvxaphgfpuq/Build/Intermediates.noindex/ArchiveIntermediates/MyOSN/BuildProductsPath/ProductIcon.png export ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOLS\=YES export ASSET_PACK_FOLDER_PATH\=/Users/fali3/Library/Developer/Xcode/DerivedData/MyOSN-bwnqxgeohhfshgebpsvxaphgfpuq/Build/Intermediates.noindex/ArchiveIntermediates/MyOSN/InstallationBuildProductsLocation/OnDemandResources export AUTOMATICALLY_MERGE_DEPENDENCIES\=NO export AVAILABLE_PLATFORMS\=appletvos\ appletvsimulator\ driverkit\ iphoneos\ iphonesimulator\ macosx\ watchos\ watchsimulator\ xros\ xrsimulator export AppIdentifierPrefix\=657M39SMQ6. export BASE_URL\=http://172.10.0.40:8080/ export BITCODE_GENERATION_MODE\=bitcode export BUILD_ACTIVE_RESOURCES_ONLY\=NO export BUILD_COMPONENTS\=headers\ build ......
[bundle script]: + rm /Users/fali3/Library/Developer/Xcode/DerivedData/MyOSN-bwnqxgeohhfshgebpsvxaphgfpuq/Build/Intermediates.noindex/ArchiveIntermediates/MyOSN/BuildProductsPath/Release-iphoneos/MyOSN.app/main.jsbundle.map [bundle script]: + rm /Users/fali3/Library/Developer/Xcode/DerivedData/MyOSN-bwnqxgeohhfshgebpsvxaphgfpuq/Build/Intermediates.noindex/ArchiveIntermediates/MyOSN/BuildProductsPath/Release-iphoneos/main.jsbundle.map [bundle script]: + BUNDLE_FILE=/Users/fali3/Library/Developer/Xcode/DerivedData/MyOSN-bwnqxgeohhfshgebpsvxaphgfpuq/Build/Intermediates.noindex/ArchiveIntermediates/MyOSN/BuildProductsPath/Release-iphoneos/MyOSN.app/main.jsbundle [bundle script]: + [[ false != true ]]
Command summary: ❌ Some sourcemaps have not been uploaded correctly. Details about the 1 found sourcemap:
It appears that the uploading of the source map file is failing, causing the issue.