Skip to content

fix: unable to install application every other time with Xcode 10 #3964

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

Merged
merged 1 commit into from
Oct 2, 2018

Conversation

rosen-vladimirov
Copy link
Contributor

When using Xcode 10, the xcrun simctl install ... command fails every other time with error:

Error: Command xcrun with arguments simctl install 5516E083-C749-47A7-A6FC-2EE2E414D025 /Users/vladimirov/Work/nativescript-cli/scratch/app1/platforms/ios/build/emulator/app1.app failed with exit code 1. Error output:
 An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Failed to load Info.plist from bundle at path /Users/vladimirov/Library/Developer/CoreSimulator/Devices/5516E083-C749-47A7-A6FC-2EE2E414D025/data/Library/Caches/com.apple.mobile.installd.staging/temp.ZdmYQa/extracted/Payload/app1.app
Failed to load Info.plist from bundle at path /Users/vladimirov/Library/Developer/CoreSimulator/Devices/5516E083-C749-47A7-A6FC-2EE2E414D025/data/Library/Caches/com.apple.mobile.installd.staging/temp.ZdmYQa/extracted/Payload/app1.app
Underlying error (domain=MIInstallerErrorDomain, code=35):
	Failed to load Info.plist from bundle at path /Users/vladimirov/Library/Developer/CoreSimulator/Devices/5516E083-C749-47A7-A6FC-2EE2E414D025/data/Library/Caches/com.apple.mobile.installd.staging/temp.ZdmYQa/extracted/Payload/app1.app

It looks like during install of the application, the content of the built .app is extracted to a temp folder in some cases. While the installation is in progress, Xcode decides it is done and deletes the temp dir. However, the package is installed on device, but it is still loading some data from the package that is installed (the temp dir). It fails, as it searches for Info.plist file in the package we've installed, but it is not there. So the installation process fails and app remains on device with inconsitent state.
Retrying the operation fixes the behavior.

PR Checklist

What is the current behavior?

tns run ios command often fails when installing the application on simulator.

What is the new behavior?

tns run ios succeeds installing the application on iOS Simulator.

Fixes issues: #3957
#3920

When using Xcode 10, the `xcrun simctl install ...` command fails every other time with error:
```
Error: Command xcrun with arguments simctl install 5516E083-C749-47A7-A6FC-2EE2E414D025 /Users/vladimirov/Work/nativescript-cli/scratch/app1/platforms/ios/build/emulator/app1.app failed with exit code 1. Error output:
 An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Failed to load Info.plist from bundle at path /Users/vladimirov/Library/Developer/CoreSimulator/Devices/5516E083-C749-47A7-A6FC-2EE2E414D025/data/Library/Caches/com.apple.mobile.installd.staging/temp.ZdmYQa/extracted/Payload/app1.app
Failed to load Info.plist from bundle at path /Users/vladimirov/Library/Developer/CoreSimulator/Devices/5516E083-C749-47A7-A6FC-2EE2E414D025/data/Library/Caches/com.apple.mobile.installd.staging/temp.ZdmYQa/extracted/Payload/app1.app
Underlying error (domain=MIInstallerErrorDomain, code=35):
	Failed to load Info.plist from bundle at path /Users/vladimirov/Library/Developer/CoreSimulator/Devices/5516E083-C749-47A7-A6FC-2EE2E414D025/data/Library/Caches/com.apple.mobile.installd.staging/temp.ZdmYQa/extracted/Payload/app1.app
```

It looks like during install of the application, the content of the built `.app` is extracted to a temp folder in some cases. While the installation is in progress, Xcode decides it is done and deletes the temp dir. However, the package is installed on device, but it is still loading some data from the package that is installed (the temp dir). It fails, as it searches for Info.plist file in the package we've installed, but it is not there. So the installation process fails and app remains on device with inconsitent state.
Retrying the operation fixes the behavior.
@rosen-vladimirov rosen-vladimirov added this to the 5.0.0 milestone Oct 2, 2018
@rosen-vladimirov rosen-vladimirov self-assigned this Oct 2, 2018
@rosen-vladimirov rosen-vladimirov requested a review from Fatme October 2, 2018 09:43
@rosen-vladimirov rosen-vladimirov merged commit 017c415 into master Oct 2, 2018
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-xcode10-install-app branch October 2, 2018 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants