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

cordova creating hundreds of Xcode 14 "stale files outside root paths" warnings #1372

Open
rolinger opened this issue Sep 20, 2023 · 4 comments

Comments

@rolinger
Copy link

Every build from CLI: cordova build ios or ionic cordova build ios - is taking almost 6 minutes to complete the build. After the build, then from Xcode 14 to deploy the app to a device takes another 3 minutes.

In Xcode, during the deploy to device, the issue navigator is tracking nearly 2500 stale files outside of allowed root path warnings. If I clean and run the project <CMD> + SHIFT + K & <CMD> + SHIFT + R - which takes a few minutes to complete, then all those stale files are removed and the deploy then takes like 15 seconds.

But the next time I do a cordova build ios all those stale files return. I believe the 6 minute build time is because cordova is creating those 2500 stale files...and Xcode is trying to process/analyze them during the deploy causing 3+ more minutes of delay.

What is causing these stale files to be created...and what can I do to fix it?

My Mac environment:

Cordova 11.1.0
Cordova-ios: 6.0.2
Ionic CLI: 6.20.8
Ionic toolkit: 3.2.15
native-run: 1.7.1

Example Warnings:

Stale file '/Users/rpo/dev/myApp/platforms/ios/build/emulator/nanopb.framework' is located outside of the allowed root paths.
Stale file '/Users/rpo/dev/myApp/platforms/ios/build/emulator/nanopb.framework.dSYM/Contents/Resources/DWARF/nanopb' is located outside of the allowed root paths.
Stale file '/Users/rpo/dev/myApp/platforms/ios/build/emulator/nanopb.framework/Headers' is located outside of the allowed root paths.
Stale file '/Users/rpo/dev/myApp/platforms/ios/build/emulator/nanopb.framework/Headers/nanopb-umbrella.h' is located outside of the allowed root paths.
Stale file '/Users/rpo/dev/myApp/platforms/ios/build/emulator/nanopb.framework/Headers/pb.h' is located outside of the allowed root paths.
@dpogue
Copy link
Member

dpogue commented Sep 20, 2023

Can you try the latest cordova-ios 7.0.1 and see if you're still getting these warnings? There were some changes to Xcode derived data paths in the 7.x release that will hopefully resolve these sorts of issues

@rolinger
Copy link
Author

oy...thanks for the response @dpogue. Unfortunately, at the moment, I can't upgrade yet. To do so I must also upgrade to Cordova 12 and I am not quite ready to go through all the pain yet.

Is there nothing else I can do with my current install to eliminate all these stale files from being created on every build?

@breautek

This comment was marked as off-topic.

@dpogue
Copy link
Member

dpogue commented Sep 21, 2023

Is there nothing else I can do with my current install to eliminate all these stale files from being created on every build?

Probably not, because they are the intermediate build output files that get compiled into the application bundle.

I hope that the fixes in #1310 will resolve this sort of problem, but I don't know for sure. Nobody seems to know exactly what conditions cause this Xcode warning, so nobody is sure how exactly to fix it 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants