Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Upload Symbols Failed on Xcode 16 #46853

Closed
zzz08900 opened this issue Oct 6, 2024 · 39 comments
Closed

[iOS] Upload Symbols Failed on Xcode 16 #46853

zzz08900 opened this issue Oct 6, 2024 · 39 comments
Labels
Newer Patch Available Platform: iOS iOS applications. Resolution: Fixed A PR that fixes this issue has been merged.

Comments

@zzz08900
Copy link

zzz08900 commented Oct 6, 2024

Description

So everything looks to be working fine, but when building .ipa/uploading to AppStore Connect I got this warning:
The archive did not include a dSYM for the hermes.framework with the UUIDs *****

Although everything seems to be in working order (the ipa is successfully uploaded to AppStore Connect), I'm wondering if there's a way to get rid of this warning.

Steps to reproduce

  1. Create react native project with npx @react-native-community/cli@latest init rnTest1 --version 0.74.5
  2. Open project in Xcode 16 and build it, then upload the ipa to AppStore Connect
  3. At the end of uploading process you'll be greeted with the warning.

React Native Version

0.74.5

Affected Platforms

Other (please specify)

Output of npx react-native info

info Fetching system and libraries information...
System:
  OS: macOS 14.6.1
  CPU: (12) x64 Intel(R) Xeon(R) W-2135 CPU @ 3.70GHz
  Memory: 34.94 GB / 64.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.18.0
    path: ~/.nvm/versions/node/v20.18.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v20.18.0/bin/yarn
  npm:
    version: 10.8.2
    path: ~/.nvm/versions/node/v20.18.0/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.15.2
    path: /usr/local/lib/ruby/gems/3.3.0/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.0
      - iOS 18.0
      - macOS 15.0
      - tvOS 18.0
      - visionOS 2.0
      - watchOS 11.0
  Android SDK: Not Found
IDEs:
  Android Studio: Not Found
  Xcode:
    version: 16.0/16A242d
    path: /usr/bin/xcodebuild
Languages:
  Java: Not Found
  Ruby:
    version: 3.3.5
    path: /usr/local/opt/ruby/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

info React Native v0.75.4 is now available (your project is running on v0.74.5).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.75.4
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.74.5
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".

Stacktrace or Logs

null

Reproducer

https://github.com/zzz08900/react-native-hermes-dSYM

Screenshots and Videos

Screenshot 2024-10-07 at 00 38 34
@react-native-bot
Copy link
Collaborator

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - 0.74.6. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot
Copy link
Collaborator

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@cipolleschi
Copy link
Contributor

@zzz08900 Thanks for the issue. we fixed that already with this commit f529fe4, but we forgot to cherry pick it. Let me create pick requests for that.

To unblock yourself, you can

  • open the file <yourApp>/ios/Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework/Info.plist
  • manually remove ALL the instances of the following lines:
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
  • save the file
  • create a new build

@migueldaipre migueldaipre added Resolution: Fixed A PR that fixes this issue has been merged. and removed Needs: Triage 🔍 labels Oct 16, 2024
@migueldaipre
Copy link
Collaborator

Fixed in the release candidate v0.76

@kashmiry
Copy link

@zzz08900 Thanks for the issue. we fixed that already with this commit f529fe4, but we forgot to cherry pick it. Let me create pick requests for that.

To unblock yourself, you can

  • open the file <yourApp>/ios/Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework/Info.plist
  • manually remove ALL the instances of the following lines:
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
  • save the file
  • create a new build

I have tried this on 0.74.6 and previously on 0.73.8. but the warning still does not disappear when i remove the lines.

@matttturnbull
Copy link

Thanks for the fix in 0.76, in the mean time:

Does anyone know how to patch this fix so that it stays in place after a re-install? If I run the following:

  • rm -rf node_modules
  • yarn
  • npx pod-install

Then the fix is reverted and the error persists.

@auhonganh
Copy link

@zzz08900 Thanks for the issue. we fixed that already with this commit f529fe4, but we forgot to cherry pick it. Let me create pick requests for that.

To unblock yourself, you can

  • open the file <yourApp>/ios/Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework/Info.plist
  • manually remove ALL the instances of the following lines:
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
  • save the file
  • create a new build

I have tried this on version 0.74.2, but the warning still appears when validating the archive.

@cipolleschi
Copy link
Contributor

We should backport the fix to previous versions then.

@mohammad-goldast
Copy link

mohammad-goldast commented Dec 2, 2024

Still same warning after uploading to appstoreconnect with "react-native": "0.76.3".
I already searched for the <key>DebugSymbolsPath</key> in the mentioned path but found nothing.

The archive did not include a dSYM for the hermes.framework with the UUIDs [842F8776-9CE7-387F-AFB8-AD89FC4DE398]. Ensure that the archive's dSYM folder includes a DWARF file for hermes.framework with the expected UUIDs.

@cipolleschi
Copy link
Contributor

That's surprising.. If the Info.plist does not have any dSYM entry, it should not look for them.

@matttturnbull
Copy link

Should this be re-opened? As it seems that the issue is still present in 0.76.3

@mohammad-goldast
Copy link

What I did for now to fix the issue on RN 0.76.3.

  1. Downloaded the dSYM files from here.
  2. Created a folder in ./ios called dSYMs and put the hermes.framework.dSYM file for iphones inside.
  3. Added a new Run Script in the Build Phases of my IOS project after Bundle React Native code and images script.

SCR-20241209-ilj

#!/bin/bash

echo "[Custom Script] Copy dSYMs to hermes-engine 1"

# Define source and destination paths
SOURCE_PATH=${PROJECT_DIR}/dSYMs
DEST_PATH=${PROJECT_DIR}/Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64/

echo "[Custom Script] Copy dSYMs to hermes-engine 2 $SOURCE_PATH"
echo "[Custom Script] Copy dSYMs to hermes-engine 2 $DEST_PATH"


# Check if source directory exists
if [ ! -d "$SOURCE_PATH" ]; then
    echo "[Custom Script] Copy dSYMs to hermes-engine 3 $DEST_PATH"
    echo "Error: Source directory $SOURCE_PATH does not exist"
    exit 1
fi



# Copy the directory
cp -R "$SOURCE_PATH" "$DEST_PATH"
echo "[Custom Script] Copy dSYMs to hermes-engine 4 $DEST_PATH"
echo "Successfully copied dSYMs to Hermes destination"
  1. Clean the project and build again.

@joaonew
Copy link

joaonew commented Dec 9, 2024

Having the same issue on react-native 0.76.3

@axuu
Copy link

axuu commented Dec 10, 2024

Having the same issue on react-native 0.76.2

BTW does this error have any bad effect?

@Vishalgihub
Copy link

WhatsApp Image 2024-12-12 at 8 30 04 PM

my react native ios give this error

i am using a xcode version 16 and my react native version is 74

i can try
#46853 (comment)

this but still i get this error i can use this chat all related answer but not working please help

@matan-atiya
Copy link

What I did for now to fix the issue on RN 0.76.3.

  1. Downloaded the dSYM files from here.
  2. Created a folder in ./ios called dSYMs and put the hermes.framework.dSYM file for iphones inside.
  3. Added a new Run Script in the Build Phases of my IOS project after Bundle React Native code and images script.

SCR-20241209-ilj

#!/bin/bash

echo "[Custom Script] Copy dSYMs to hermes-engine 1"

# Define source and destination paths
SOURCE_PATH=${PROJECT_DIR}/dSYMs
DEST_PATH=${PROJECT_DIR}/Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64/

echo "[Custom Script] Copy dSYMs to hermes-engine 2 $SOURCE_PATH"
echo "[Custom Script] Copy dSYMs to hermes-engine 2 $DEST_PATH"


# Check if source directory exists
if [ ! -d "$SOURCE_PATH" ]; then
    echo "[Custom Script] Copy dSYMs to hermes-engine 3 $DEST_PATH"
    echo "Error: Source directory $SOURCE_PATH does not exist"
    exit 1
fi



# Copy the directory
cp -R "$SOURCE_PATH" "$DEST_PATH"
echo "[Custom Script] Copy dSYMs to hermes-engine 4 $DEST_PATH"
echo "Successfully copied dSYMs to Hermes destination"
  1. Clean the project and build again.

I have the same issue, tried this solution but it didn't work for me.

@nes123
Copy link

nes123 commented Dec 19, 2024

The need to download the dSYM files with every package update is overly burdensome.

@mohammad-goldast
Copy link

Strange, my own solution even doesn’t work anymore in RN 76.5.

1 - Copying dSYMs files manually doesn't work.
2 - Couldn't find the plist attributes to ignore checking dSYMs files in debug and release.

Now, the archive had been uploaded to AppStore Connect but it's still showing the error in XCode.

@nes123
Copy link

nes123 commented Dec 21, 2024

I am tempted to turn off hermes which in any case makes start-up very slow in iOS

@cipolleschi
Copy link
Contributor

There are some issues related to Xcode 16 that might make this worse: https://forums.developer.apple.com/forums/thread/763731?page=4

It might not be a React Native problem, as many other libraries are affected

Out of curiosity, is there someone that is encountering this issue and that is developing using Expo and uploading with EAS?

@Hknzbyn
Copy link

Hknzbyn commented Dec 30, 2024

@cipolleschi Hello, in my case, I moved an application that I built with eas and successfully sent to testflight to cli due to sdks that do not support expo.
In summary, eas build / submit processes were smooth

@Harry-Drew-CyanBytes
Copy link

Any updates on this? I still get the error in react native version: 0.76.6

@AmirDiafi
Copy link

AmirDiafi commented Jan 15, 2025

+1

Image

@cipolleschi
Copy link
Contributor

cipolleschi commented Jan 16, 2025

Which version of Xcode are you using? Are you uploading a Debug or a Release App?
I also reached out to Expo to understand if they do something special when uploading to the App Store with EAS.

The error makes no sense to me, because there are no references to the dSYMS in the Hermes.xcframework...

@eedeebee
Copy link

I'm getting the same symptom with RN 0.72 when I upgradef from older XCode to XCode 16 in order to ,make debug builds for an iOS 18 device. I"m trying to upload a release build. Since I was doing this same build pre XCode 16, I'm asssuming this wartning is just letting me know aomehting about my bujilds thay is not new as I didn't otherwize change anything about my RN bujild other than moving to XCode 16....

@hassanharoon321
Copy link

did anyone find the solution I'm still looking for solution nothing works here

@cipolleschi
Copy link
Contributor

@hassanharoon321

  1. move to Xcode 16.2
  2. clean up all the caches for cocoapods:
    i. rm -rf Pods Podfile.lock <YourApp>.xcworkspace
    ii. clean up derived data rm -rf ~/Library/Developer/Xcode/DerivedData/
    iii. rm -rf ~/Library/Caches/CocoaPods/Pods/External/hermes-engine/
  3. clean up node_modules rm -rf node_modules
  4. rerun yarn install && cd ios && bundle install && bundle exec pod install

@suhitaga
Copy link

yeah i just got this too... the app seems to upload to testflight still but it's weird and interesting nonetheless

@fivecar
Copy link
Contributor

fivecar commented Jan 22, 2025

@hassanharoon321

  1. move to Xcode 16.2
  2. clean up all the caches for cocoapods:
    i. rm -rf Pods Podfile.lock <YourApp>.xcworkspace
    ii. clean up derived data rm -rf ~/Library/Developer/Xcode/DerivedData/
    iii. rm -rf ~/Library/Caches/CocoaPods/Pods/External/hermes-engine/
  3. clean up node_modules rm -rf node_modules
  4. rerun yarn install && cd ios && bundle install && bundle exec pod install

@cipolleschi Ran that just now on Xcode 16.2 and RN 0.76.6, and still get the error...

@Noam-shushan
Copy link

@hassanharoon321

  1. move to Xcode 16.2
  2. clean up all the caches for cocoapods:
    i. rm -rf Pods Podfile.lock <YourApp>.xcworkspace
    ii. clean up derived data rm -rf ~/Library/Developer/Xcode/DerivedData/
    iii. rm -rf ~/Library/Caches/CocoaPods/Pods/External/hermes-engine/
  3. clean up node_modules rm -rf node_modules
  4. rerun yarn install && cd ios && bundle install && bundle exec pod install

@cipolleschi Ran that just now on Xcode 16.2 and RN 0.76.6, and still get the error...

As well here:

Image

Image

@anndoman
Copy link

I think i checked all the options in the comments and none of them work, I am still getting error :(
xcode version: 16.2
react native version: 0.76.3 but I also upgraded the version to 0.76.5 and checked it

@vitalybaev
Copy link

Also having the same issue for quite some time. XCode 16.2, react-native 0.76.6

@cipolleschi
Copy link
Contributor

I verified with Expo and they are not doing anything different than uploading the same artifacts we ship as you would do without Expo.

This must be a local configuration otherwise the upload would be broken for everyone or for nobody.

Out of curiosity: are you uploading a Debug build or a Release build?

@importre
Copy link

Same issue with RN 0.77.0 and Xcode 16.2.

Workaround

To resolve this issue, I added the following script to the Pre-actions of the Archive step in Xcode’s scheme settings.

generate-hermes-dsym.sh

if [[ -z "$1" ]]; then
  echo "❌ Usage: $0 <TargetName>"
  exit 1
fi

TARGET_NAME=$1

export ARCHIVE_PATH=$(ls -dt ~/Library/Developer/Xcode/Archives/*/"$TARGET_NAME"*.xcarchive | head -1)
echo "📦 Using Archive Path: $ARCHIVE_PATH"

if [[ ! -d "$ARCHIVE_PATH" ]]; then
  echo "❌ Archive not found for target: $TARGET_NAME! Please archive the project first in Xcode."
  exit 1
fi

echo "🔍 Existing dSYM files:"
find "$ARCHIVE_PATH/dSYMs" -name "*.dSYM"

export HERMES_BINARY=$(find "$ARCHIVE_PATH/Products/Applications" -name "hermes.framework" -type d)
echo "📍 Hermes Binary Path: $HERMES_BINARY"

if [[ ! -d "$HERMES_BINARY" ]]; then
  echo "❌ Hermes framework not found!"
  exit 1
fi

dsymutil "$HERMES_BINARY/hermes" -o "$ARCHIVE_PATH/dSYMs/hermes.framework.dSYM"
echo "✅ Hermes dSYM generated at: $ARCHIVE_PATH/dSYMs/hermes.framework.dSYM"

echo "📂 Final dSYM files:"
find "$ARCHIVE_PATH/dSYMs" -name "*.dSYM"

echo "🎉 Done! Hermes dSYM successfully generated!"

Xcode Pre-actions Setup

In Edit Scheme → Archive → Pre-actions, add the following script

sh generate_hermes_dsym.sh "$TARGET_NAME"

@gkasireddy202
Copy link

Facing the same issue on Xcode 16.2
react-native:0.73.7

@gkasireddy202
Copy link

gkasireddy202 commented Jan 30, 2025

Still getting same issue.

@zzz08900 Thanks for the issue. we fixed that already with this commit f529fe4, but we forgot to cherry pick it. Let me create pick requests for that.

To unblock yourself, you can

  • open the file <yourApp>/ios/Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework/Info.plist
  • manually remove ALL the instances of the following lines:

DebugSymbolsPath
dSYMs

  • save the file
  • create a new build

@cipolleschi - I followed the above steps in my project. My project has react-native:0.73.7.
uncomment the below one.

Image Image

@cipolleschi
Copy link
Contributor

I believe something is wrong with Xcode 16.2. Those steps use to work with previous versions of Xcode when this was happening.

Sadly, there is very little I can do as we don't control Xcode.

For anyone reading: what you are seeing is just a warning. It does not prevent you from upload and submit your app and Apple will not reject your app because of missing debug symbols in the release binary.

@kaushikdas0
Copy link

This issue still exists even today, can we not request to reopen this issue for tracking?

@cipolleschi
Copy link
Contributor

The issue is duplicated by other issues.

I'll lock this and the other two that are closed already, please forward all the comments to the one open: #49059

@facebook facebook locked and limited conversation to collaborators Feb 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Newer Patch Available Platform: iOS iOS applications. Resolution: Fixed A PR that fixes this issue has been merged.
Projects
None yet
Development

No branches or pull requests