Skip to content

[ios][precompile] fix wrong symbolication mapping#54470

Closed
chrfalch wants to merge 1 commit into
mainfrom
chrfalch/fix-wrong-symbols-mapping-in-precompiled
Closed

[ios][precompile] fix wrong symbolication mapping#54470
chrfalch wants to merge 1 commit into
mainfrom
chrfalch/fix-wrong-symbols-mapping-in-precompiled

Conversation

@chrfalch

@chrfalch chrfalch commented Nov 10, 2025

Copy link
Copy Markdown
Collaborator

Summary:

When RCT_SYMBOLICATE_PREBUILT_FRAMEWORKS is enabled, source file paths in dSYMs were incorrectly resolved with extra path segments:

double node_modules (e.g., /path/node_modules/node_modules/...)

The root cause was using File.expand_path(@@react_native_path) without the correct base directory. The path was first expanded without a base (causing double node_modules), then fixed to use project_pods_root (ios/Pods/), which still resulted in incorrect paths with an extra ios/ folder.

Fixed by expanding the path relative to Pod::Config.instance.installation_root, which correctly points to the ios/ directory, allowing relative paths like ../node_modules/react-native to resolve properly to the project root's node_modules directory.

Changelog:

[IOS] [FIXED] - Fix incorrect source path resolution in dSYM remapping in precompiled framework scripts

Test Plan:

rm -rf ./Pods
pod cache clean --all
RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 RCT_SYMBOLICATE_PREBUILT_FRAMEWORKS=1 bundle exec pod install

✅ Tested with RN-Tester
✅ Tested in 0.83.rc0 project

When RCT_SYMBOLICATE_PREBUILT_FRAMEWORKS is enabled, source file paths in dSYMs were incorrectly resolved with extra path segments:

double node_modules (e.g., /path/node_modules/node_modules/...)

The root cause was using File.expand_path(@@react_native_path) without the correct base directory. The path was first expanded without a base (causing double node_modules), then fixed to use project_pods_root (ios/Pods/), which still resulted in incorrect paths with an extra ios/ folder.

Fixed by expanding the path relative to Pod::Config.instance.installation_root, which correctly points to the ios/ directory, allowing relative paths like
../node_modules/react-native to resolve properly to the project root's
node_modules directory.
@chrfalch chrfalch requested a review from cipolleschi November 10, 2025 13:13
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 10, 2025
@facebook-github-bot facebook-github-bot added p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Nov 10, 2025

@cipolleschi cipolleschi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

@meta-codesync

meta-codesync Bot commented Nov 10, 2025

Copy link
Copy Markdown

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D86667786.

@meta-codesync meta-codesync Bot closed this in f383241 Nov 10, 2025
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Nov 10, 2025
@meta-codesync

meta-codesync Bot commented Nov 10, 2025

Copy link
Copy Markdown

@cipolleschi merged this pull request in f383241.

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @chrfalch in f383241

When will my fix make it into a release? | How to file a pick request?

react-native-bot pushed a commit that referenced this pull request Nov 10, 2025
Summary:
When RCT_SYMBOLICATE_PREBUILT_FRAMEWORKS is enabled, source file paths in dSYMs were incorrectly resolved with extra path segments:

double node_modules (e.g., /path/node_modules/node_modules/...)

The root cause was using File.expand_path(@react_native_path) without the correct base directory. The path was first expanded without a base (causing double node_modules), then fixed to use project_pods_root (ios/Pods/), which still resulted in incorrect paths with an extra ios/ folder.

Fixed by expanding the path relative to Pod::Config.instance.installation_root, which correctly points to the ios/ directory, allowing relative paths like ../node_modules/react-native to resolve properly to the project root's node_modules directory.

## Changelog:

[IOS] [FIXED] - Fix incorrect source path resolution in dSYM remapping in precompiled framework scripts

Pull Request resolved: #54470

Test Plan:
```
rm -rf ./Pods
pod cache clean --all
RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 RCT_SYMBOLICATE_PREBUILT_FRAMEWORKS=1 bundle exec pod install
```

✅ Tested with RN-Tester
✅ Tested in 0.83.rc0 project

Reviewed By: huntie

Differential Revision: D86667786

Pulled By: cipolleschi

fbshipit-source-id: cd6279d02d5ed7188e282e4491c05de35f17a8f1
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @chrfalch in f81fc0a

When will my fix make it into a release? | How to file a pick request?

douglowder pushed a commit to react-native-tvos/react-native-tvos that referenced this pull request Nov 15, 2025
Summary:
When RCT_SYMBOLICATE_PREBUILT_FRAMEWORKS is enabled, source file paths in dSYMs were incorrectly resolved with extra path segments:

double node_modules (e.g., /path/node_modules/node_modules/...)

The root cause was using File.expand_path(@react_native_path) without the correct base directory. The path was first expanded without a base (causing double node_modules), then fixed to use project_pods_root (ios/Pods/), which still resulted in incorrect paths with an extra ios/ folder.

Fixed by expanding the path relative to Pod::Config.instance.installation_root, which correctly points to the ios/ directory, allowing relative paths like ../node_modules/react-native to resolve properly to the project root's node_modules directory.

## Changelog:

[IOS] [FIXED] - Fix incorrect source path resolution in dSYM remapping in precompiled framework scripts

Pull Request resolved: react/react-native#54470

Test Plan:
```
rm -rf ./Pods
pod cache clean --all
RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 RCT_SYMBOLICATE_PREBUILT_FRAMEWORKS=1 bundle exec pod install
```

✅ Tested with RN-Tester
✅ Tested in 0.83.rc0 project

Reviewed By: huntie

Differential Revision: D86667786

Pulled By: cipolleschi

fbshipit-source-id: cd6279d02d5ed7188e282e4491c05de35f17a8f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants