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

Cannot install app on iOS Simulator when it's already installed #47135

Closed
knaeckeKami opened this issue Dec 16, 2019 · 13 comments
Closed

Cannot install app on iOS Simulator when it's already installed #47135

knaeckeKami opened this issue Dec 16, 2019 · 13 comments
Labels
c: crash Stack traces logged to the console P2 Important issues not at the top of the work list platform-ios iOS applications specifically t: xcode "xcodebuild" on iOS and general Xcode project management tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@knaeckeKami
Copy link
Contributor

When I want to run my app on an iOS simulator, the install fails with the error message

Finished with error: ProcessException: Process exited abnormally:
An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Could not install at this time.
Could not hardlink copy /Users/<User>/Library/Developer/CoreSimulator/Devices/5C926A45-1233-4219-B851-C62AF5A311FE/data/Containers/Bundle/Application/1D23A686-D128-4105-B418-C685A89E17AD/Runner.app to /Users/<User>/Library/Developer/CoreSimulator/Devices/5C926A45-1233-4219-B851-C62AF5A311FE/data/Library/Caches/com.apple.mobile.installd.staging/temp.YyjGb7/extracted/Payload/Runner.app with manifest /Users/<User>/Library/Developer/CoreSimulator/Devices/5C926A45-1233-4219-B851-C62AF5A311FE/data/Library/Caches/com.apple.mobile.installd.staging/temp.YyjGb7/extracted/com.apple.deltainstallcommands.com.company.appid.dev
Underlying error (domain=MIInstallerErrorDomain, code=8):
	Could not hardlink copy /Users/<User>/Library/Developer/CoreSimulator/Devices/5C926A45-1233-4219-B851-C62AF5A311FE/data/Containers/Bundle/Application/1D23A686-D128-4105-B418-C685A89E17AD/Runner.app to /Users/<User>/Library/Developer/CoreSimulator/Devices/5C926A45-1233-4219-B851-C62AF5A311FE/data/Library/Caches/com.apple.mobile.installd.staging/temp.YyjGb7/extracted/Payload/Runner.app with manifest /Users/<User>/Library/Developer/CoreSimulator/Devices/5C926A45-1233-4219-B851-C62AF5A311FE/data/Library/Caches/com.apple.mobile.installd.staging/temp.YyjGb7/extracted/com.apple.deltainstallcommands.com.company.appid.dev
  Command: /usr/bin/xcrun simctl install 5C926A45-1233-4219-B851-C62AF5A311FE /Users/kami/diagnosia/neocortex-mobile/build/ios/iphonesimulator/Runner.app

, if the app is already installed on the simulator device. If it's not installed, everything works as expected. On Android and real iOS devices, this is also not an issue.

Steps to Reproduce

  1. Install the iOS app on the simulator
  2. Install the iOS app on the simulator again
  3. This error occurs

There are probably more preconditions for this error to occur, but I could not figure out what exactly causes this. I suspect it's related to flutter flavors, which my app uses.

Target Platform: ios
Target OS version/browser: any
Devices: Simulator only

Related

Issue #40129 <- Probably the same issue, got closed for inactivity

Logs

https://gist.github.com/knaeckeKami/97e3775c8579e99a5c3c6f0036d3190b

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.2 19C57, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3)
[✓] Android Studio (version 3.5)
[!] IntelliJ IDEA Ultimate Edition (version 2019.1.2)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.41.0)
[✓] Connected device (1 available)

! Doctor found issues in 1 category.
@iapicca iapicca added c: crash Stack traces logged to the console d: devtools DevTools related - suite of performance and debugging tools t: xcode "xcodebuild" on iOS and general Xcode project management tool Affects the "flutter" command-line tool. See also t: labels. platform-ios iOS applications specifically labels Dec 16, 2019
@yorickreum
Copy link

We encounter the same problem at the moment, at two different MacBooks. Quite confusing.

@yorickreum
Copy link

@knaeckeKami Have you found any solution?

@knaeckeKami
Copy link
Contributor Author

No, not yet.

@knaeckeKami
Copy link
Contributor Author

All I can say, is that all the fixes posted in the related issues (updating xcode, making sure the version strings are set correctly, etc.) are not working for me.

@yorickreum
Copy link

Yes, for us neither, we tried everything...
Do you think it could be a signing problem? We tried automatic signing with Xcode and fastlane match...

@knaeckeKami
Copy link
Contributor Author

knaeckeKami commented Jan 9, 2020

I don't think so, at least not for me. The first install succeeds, if it were a signing problem, the first would fail, too.
Also

 (domain=MIInstallerErrorDomain, code=8):

does not indicate a signing problem.
I know this because I ran into

 (domain=MIInstallerErrorDomain Code=13 "Failed to verify code signature of ..."

In other (non-flutter) projects.

@jmagman jmagman added this to Awaiting triage in Tools - Xcode review Jan 10, 2020
@knaeckeKami
Copy link
Contributor Author

knaeckeKami commented Jan 13, 2020

Additional Info from Xcode:

Domain: MIInstallerErrorDomain
Code: 8
User Info: {
    FunctionName = "-[MIInstallableBundlePatch _applyDeltaPatchWithError:]";
    LegacyErrorString = PackagePatchFailed;
    SourceFileLine = 113;
}

@knaeckeKami
Copy link
Contributor Author

The problem suddenly disappeared, now I can install the app on the simulator without problem. Not sure what changed.

Leaving this open anyway because it seems to affect other users too.

@mploigt
Copy link

mploigt commented Feb 3, 2020

I am running into the same problem all of a sudden:
Finished with error: ProcessException: Process exited abnormally: An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1): This app could not be installed at this time. Could not install at this time. Could not hardlink copy /Users/xxxxxxxxx/Library/Developer/CoreSimulator/Devices/A9AB9380-FB93-4119-8914-F67AB6C97437/data/Containers/Bundle/Application/405039B4-E063-415E-BE8A-56C669BDB867/Runner.app to /Users/xxxxxxxxx/Library/Developer/CoreSimulator/Devices/A9AB9380-FB93-4119-8914-F67AB6C97437/data/Library/Caches/com.apple.mobile.installd.staging/temp.jp33Ip/extracted/Payload/Runner.app with manifest /Users/xxxxxxxxx/Library/Developer/CoreSimulator/Devices/A9AB9380-FB93-4119-8914-F67AB6C97437/data/Library/Caches/com.apple.mobile.installd.staging/temp.jp33Ip/extracted/com.apple.deltainstallcommands.de.chefkoch.cheflist Underlying error (domain=MIInstallerErrorDomain, code=8): Could not hardlink copy /Users/xxxxxxxxx/Library/Developer/CoreSimulator/Devices/A9AB9380-FB93-4119-8914-F67AB6C97437/data/Containers/Bundle/Application/405039B4-E063-415E-BE8A-56C669BDB867/Runner.app to /Users/xxxxxxxxx/Library/Developer/CoreSimulator/Devices/A9AB9380-FB93-4119-8914-F67AB6C97437/data/Library/Caches/com.apple.mobile.installd.staging/temp.jp33Ip/extracted/Payload/Runner.app with manifest /Users/xxxxxxxxx/Library/Developer/CoreSimulator/Devices/A9AB9380-FB93-4119-8914-F67AB6C97437/data/Library/Caches/com.apple.mobile.installd.staging/temp.jp33Ip/extracted/com.apple.deltainstallcommands.de.chefkoch.cheflist Command: /usr/bin/xcrun simctl install A9AB9380-FB93-4119-8914-F67AB6C97437 /Users/xxxxxxxxx/Projects/xxxxxxxxx/build/ios/iphonesimulator/Runner.app

Flutter 1.12.13+hotfix.6
Xcode 11.3.1

@jonahwilliams jonahwilliams removed the d: devtools DevTools related - suite of performance and debugging tools label Feb 6, 2020
@dahyun31x
Copy link

dahyun31x commented Mar 19, 2020

In my case, it was an error because there were different apps left about the same project in the emulator.

I deleted old version app and it works!

@jmagman jmagman moved this from Awaiting triage to Engineer reviewed in Tools - Xcode review Apr 7, 2020
@alexpchin
Copy link

I'm still facing this issue? Really confusing!

@MatBdry
Copy link

MatBdry commented May 22, 2020

Same as @dhdh3311, just because there was an old version of the app (renamed) on the simulator. I juste removed the old version and relaunch and it works.

@jmagman jmagman added the P2 Important issues not at the top of the work list label Aug 18, 2020
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: crash Stack traces logged to the console P2 Important issues not at the top of the work list platform-ios iOS applications specifically t: xcode "xcodebuild" on iOS and general Xcode project management tool Affects the "flutter" command-line tool. See also t: labels.
Projects
Tools - Xcode review
  
Engineer reviewed
Development

No branches or pull requests

9 participants