Closed harbolaez closed 9 months ago
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
[!] The plist file at path
/Users/harbolaez/Desktop/code/personal/kepit-apps/kepit/ios/Users/harbolaez/Desktop/code/personal/kepit-apps/kepit/ios/kepit-development-Info.plist
doesn't exist.
The error message is clear, your build is trying to access a file that doens't exist. We can't help without a reproducer (or by looking at your code)
Hi,
I had same problem.
To solve this, I did some changes in one ruby file.
In /plist = Xcodeproj::Plist.read_from_path(fullPlistPath)
with
plist = Xcodeproj::Plist.read_from_path(plistPath.path)
and go to line 566, change the line
Xcodeproj::Plist.write_to_path(plist, fullPlistPath)
with
Xcodeproj::Plist.write_to_path(plist, plistPath.path)
I have the same error on CD, using Firebase.
After the pod install, getting the error :
Setting REACT_NATIVE build settings
[!] An error occurred while processing the post-install hook of the Podfile.
[!] The plist file at path `/Users/runner/work/mobile-news/mobile-news/ios/mobileNews/GoogleService-Info.plist` doesn't exist.
The error is located in the post_install
function of the podfile, when executing the update_ats_in_plist
: it looks for any file terminating by Info.plist
to modify their NSAllowsArbitraryLoads, NSAppTransportSecurity... properly.
But I have 3 customs GoogleService-Info.plist
for my 3 environnements :
The matching is made in the build phase - here an extract of my pbxproj:
93E6EB9EE4D3433C96007083 /* Set environment GoogleService-Info.plist */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Set environment GoogleService-Info.plist";
outputFileListPaths = (
);
outputPaths = (
"$(PROJECT_DIR)/$(PROJECT_NAME)/GoogleService-Info.plist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "cp ${PROJECT_NAME}/GoogleService-Info.${ENV}.plist ${PROJECT_NAME}/GoogleService-Info.plist\n";
};
So in the post_install function, the GoogleService-Info.plist
does not yet exists and the Xcodeproj::Plist.read_from_path(fullPlistPath)
fails.
@harbolaez I guess it's the same for you, as you have a kepit-development-Info.plist
-> a plist for your development env, matched later to its real value.
@jayscottthomas changing for the initial path without the parent does not fix in our case.
Different ideas for the fix:
# node_modules/react-native/scripts/cocoapods/utils.rb:550
def self.update_ats_in_plist(plistPaths, parent)
plistPaths.each do |plistPath|
fullPlistPath = File.join(parent, plistPath.path)
if File.exist?(fullPlistPath) # ✅ Add me here!
plist = Xcodeproj::Plist.read_from_path(fullPlistPath)
ats_configs = {
"NSAllowsArbitraryLoads" => false,
"NSAllowsLocalNetworking" => true,
}
if plist.nil?
plist = {
"NSAppTransportSecurity" => ats_configs
}
else
plist["NSAppTransportSecurity"] ||= {}
plist["NSAppTransportSecurity"] = plist["NSAppTransportSecurity"].merge(ats_configs)
end
Xcodeproj::Plist.write_to_path(plist, fullPlistPath)
else # ℹ️ Also add a log here
Pod::UI.puts "Ignore #{plistPath} in post-install->update_ats_in_plist".red
end
end
end
@philIip as you are the author of the initial PR https://github.com/facebook/react-native/pull/38086, do you have any insight on it?
I don't think not modifying the GoogleService-Info.plist will be a problem on second thoughts ; it's literally what was happening when I deployed locally - post_install modified the gitignored GoogleService-Info.plist copied in a previous build, then on the build phase it was erased and replaced by the unmodified GoogleService-Info.production.plist.
So here's the patch - may open a PR with it: react-native+0.73.2.patch
We are experiencing the same error as OP and @delphinebugner's patch worked flawlessly, thanks!
In my case, and as I see in the OP's post, it's computing the wrong path for one of my target's info plist. As you see in OPs, it's concatenating the ios
folder path twice:
[!] The plist file at path `/Users/harbolaez/Desktop/code/personal/kepit-apps/kepit/ios/Users/harbolaez/Desktop/code/personal/kepit-apps/kepit/ios/kepit-development-Info.plist
Hi, I had same problem. To solve this, I did some changes in one ruby file. In //node_modules/react-native/scripts/cocoapods/utils.rb line 553, change the line
plist = Xcodeproj::Plist.read_from_path(fullPlistPath)
withplist = Xcodeproj::Plist.read_from_path(plistPath.path)
and go to line 566, change the line
Xcodeproj::Plist.write_to_path(plist, fullPlistPath)
withXcodeproj::Plist.write_to_path(plist, plistPath.path)
this solution is working fine. When you create a new scheme and try to make the pod install this issue occurs for me
Note: after bumping to react-native 0.73.6, patch is no longer need 🎉 issue fixed!
Old Version
0.72.4
New Version
0.73.1
Description
I'm trying to upgrade to latest version and getting
I'm not sure why is doing
/Users/harbolaez/Desktop/code/personal/kepit-apps/kepit/ios/Users/harbolaez/Desktop/code/personal/kepit-apps/kepit/ios/kepit-development-Info.plist
Steps to reproduce
I have deleted ndoe_modules, yarn.lock, Podfile.lock. and ran
pod deintegrate; pod update; pod install
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Reproducer
na
Screenshots and Videos
No response