-
Notifications
You must be signed in to change notification settings - Fork 8
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
[0.75.0-rc.2]: regression on linking iOS dependencies with script phase (e.g. RN Firebase): #341
Comments
might be related to #336 and the fix seems to be waiting for cherry-pick facebook/react-native#45165 thank you! please feel free to close this one once confirmed. |
Thanks for the repro @imWildCat 👍 That's something for @cipolleschi to investigate |
Thanks for the quick reply, @cortinico ! ❤️ |
@imWildCat have you tried applying the fixes suggested by facebook/react-native#45165 in your repro? |
No I haven’t is there any quick way to apply that diff? |
I applied facebook/react-native@d3e0430 locally and it does not work: ![]() it might happen before codegen I believe |
@cipolleschi I checked the git history of the autolinking.rb file but haven't found any bad commit. Created this PR facebook/react-native#45208 There might be better way |
the fix is demonstrated at imWildCat-archived/react-native-075-rc2-regression-ios-linking-script-phase@4715213 |
Summary: Since 0.75-rc.x, I cannot run pod install because of an linking issue of react native firebase. reactwg/react-native-releases#341 (comment) ## Changelog: [IOS][FIXED] Auto linking script of script phase Pull Request resolved: #45208 Test Plan: Full demo of this fix: <https://github.com/imWildCat-archived/react-native-075-rc2-regression-ios-linking-script-phase> Reviewed By: christophpurrer Differential Revision: D59125585 Pulled By: blakef fbshipit-source-id: be96d3b207eff67c5e0d777203e7fc0d10103fc0
closed by facebook/react-native@e320ab4 |
Oh you beat me to it!! Didn't see this, logged #345 |
Pick request for the fix is here (for reference): |
Summary: Since 0.75-rc.x, I cannot run pod install because of an linking issue of react native firebase. reactwg/react-native-releases#341 (comment) ## Changelog: [IOS][FIXED] Auto linking script of script phase Pull Request resolved: #45208 Test Plan: Full demo of this fix: <https://github.com/imWildCat-archived/react-native-075-rc2-regression-ios-linking-script-phase> Reviewed By: christophpurrer Differential Revision: D59125585 Pulled By: blakef fbshipit-source-id: be96d3b207eff67c5e0d777203e7fc0d10103fc0
I guess one of these fixes has caused Output:
Script phase is failing because it's trying to read from the non-existant node_modules folder outside of the monorepo. I am gonna dig into this to see what has caused this issue. |
UPDATE If I run pod commands with My project sturucture:
|
@matinzd I just tried spinning up a new project with 0.75.2 and everything works for me. That's the script I run
If you are in a monorepo, there might be something in your specific monorepo setup. If the problem is:
the problem is in Firebase, that is hardcoding the path to |
But it's weird that this was working before 75. That needs to be fixed but I am wondering if there has been some breaking changes with introducing the path. |
uhm, good point. I think it might related to the changes we made with autolinking, then. @blakef can you chime in here? |
Now that there have been changes in auto linking do you think this can be related as well? |
So this is because before 0.75 we used to use an absolute path instead of a relative path (introduced in #45208). So you get paths looking like this: You can see how that quickly falls apart when using |
I don't think it's related. This path just affects package scripts AFAIK. For what it's work I added |
Summary: A previous attempt at fixing this issue used a relative path (facebook#45208), this doesn't work if the user runs bundle install outside of the ios/ folder, using the --project-directory=ios argument. Changelog: [iOS][Fix] support bundle install from outside the ios folder using --project-directory Test Plan: Ran the command in a project with @react-native-firebase/app using the --project-directory, confirmed that it's fixed when using the absolute path. closes: reactwg/react-native-releases#341
Summary: A previous attempt at fixing this issue used a relative path (#45208), this doesn't work if the user runs bundle install outside of the `ios/` folder, using the `--project-directory=ios` argument. ## Changelog: [iOS][Fixed] support bundle install from outside the ios folder using --project-directory Pull Request resolved: #46186 Test Plan: Ran the command in a project with `react-native-firebase/app` using the `--project-directory`, confirmed that it's fixed when using the absolute path. closes: reactwg/react-native-releases#341 Reviewed By: cipolleschi Differential Revision: D61719821 Pulled By: blakef fbshipit-source-id: d83429dd29c9e8cc066ab9843ad95fdfc0af8dea
Thanks for fixing it the auto-linking issue! 🌸 Have you tried rnscreens with new arch turned on? |
- phase["script"] = File.read(File.expand_path(phase["path"], package[:path]))
+ phase["script"] = File.read(File.expand_path(File.join(package[:path], phase["path"]), ios_project_root)) |
Summary: A previous attempt at fixing this issue used a relative path (#45208), this doesn't work if the user runs bundle install outside of the `ios/` folder, using the `--project-directory=ios` argument. ## Changelog: [iOS][Fixed] support bundle install from outside the ios folder using --project-directory Pull Request resolved: #46186 Test Plan: Ran the command in a project with `react-native-firebase/app` using the `--project-directory`, confirmed that it's fixed when using the absolute path. closes: reactwg/react-native-releases#341 Reviewed By: cipolleschi Differential Revision: D61719821 Pulled By: blakef fbshipit-source-id: d83429dd29c9e8cc066ab9843ad95fdfc0af8dea
Old Version
0.74.x
New Version
0.75.0-rc2
Description
Not sure whether rc1 has this problem as well. I found this problem while upgrading from 0.74.x to 0.75.x
Error:
I thought it was something like pnpm workspace but it is not.
Steps to reproduce
git clone https://github.com/imWildCat-archived/react-native-075-rc2-regression-ios-linking-script-phase
cd react-native-075-rc2-regression-ios-linking-script-phase
yarn install
cd ios
pod install
Affected Platforms
Runtime - iOS, Build - MacOS
Output of
npx react-native info
The text was updated successfully, but these errors were encountered: