Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

error Failed to launch the app on simulator, An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1): #3197

Closed
lucassouza16 opened this issue Feb 7, 2021 · 15 comments
Labels
bug Something isn't working

Comments

@lucassouza16
Copy link

Summary

Hello, I have a problem when trying to run an expo project (bare), the compilation seems successful, but when it runs it gives this error that appears in the attached log, the simulator opens correctly, and the metro also, App icon appears on the simulator as installed, I tried to run it manually, but it gives a message as if the app had not been completely installed, I already have experience with expo-cli on windows, but it is my first experience when setting up the development on MacOS.

Environment

MacBook-de-Lucas:my-app lucassouza$ expo diagnostics

Expo CLI 4.1.6 environment info:
System:
OS: macOS Mojave 10.14.6
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.15.4 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.10 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /Users/lucassouza/.rvm/rubies/ruby-2.6.5/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
IDEs:
Xcode: 11.3/11C29 - /usr/bin/xcodebuild
npmPackages:
expo: ~40.0.0 => 40.0.1
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: ~0.63.4 => 0.63.4
react-native-web: ~0.13.12 => 0.13.18
npmGlobalPackages:
expo-cli: 4.1.6
Expo Workflow: bare

Please specify your device/emulator/simulator platform, model and version

iPhone 8 - 13.3 - (SimulatorApp-912.5 SimulatorKit-570.3 CoreSimulator-681.17)

Error output

MacBook-de-Lucas:GitHub lucassouza$ cd my-app
MacBook-de-Lucas:my-app lucassouza$ yarn ios
yarn run v1.22.10
$ react-native run-ios
info Found Xcode workspace "myapp.xcworkspace"
info Building (using "xcodebuild -workspace myapp.xcworkspace -configuration Debug -scheme myapp -destination id=C8CDA62D-386D-48D1-8A77-896807032B3D")
success Successfully built the app
info Installing "/Users/lucassouza/Library/Developer/Xcode/DerivedData/myapp-gzfppuclawuzhgcjhcilzumchmhn/Build/Products/Debug-iphonesimulator/myapp.app"
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.
Failed to chmod /Users/lucassouza/Library/Developer/CoreSimulator/Devices/C8CDA62D-386D-48D1-8A77-896807032B3D/data/Bundle/Application/7563536F-92AB-4D6F-9DE2-91B930247D5D/myapp.app/myapp : No such file or directory
Underlying error (domain=MIInstallerErrorDomain, code=4):
Failed to chmod /Users/lucassouza/Library/Developer/CoreSimulator/Devices/C8CDA62D-386D-48D1-8A77-896807032B3D/data/Bundle/Application/7563536F-92AB-4D6F-9DE2-91B930247D5D/myapp.app/myapp : No such file or directory
info Launching "org.name.myapp"
error Failed to launch the app on simulator, An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "org.name.myapp" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: NotFound ("Application "org.name.myapp" is unknown to FrontBoard").
Underlying error (domain=FBSOpenApplicationErrorDomain, code=4):
The operation couldn’t be completed. Application "org.name.myapp" is unknown to FrontBoard.
Application "org.name.myapp" is unknown to FrontBoard.

✨ Done in 774.74s.
MacBook-de-Lucas:my-app lucassouza$

Reproducible demo or steps to reproduce from a blank project

Steps to create project:

-expo init my-app > minimal (bare)

Steps to run project:

-cd my-app
-yarn ios

I've tried to delete the contents and settings of the simulator, and clean the project too, and I also tried to run in XCode, but none of these solutions worked, I also tried to use other simulators but the error is common among all.
Simulator Screen Shot - iPhone 8 - 2021-02-07 at 07 30 45

@lucassouza16 lucassouza16 added the bug Something isn't working label Feb 7, 2021
@lucassouza16 lucassouza16 reopened this Feb 10, 2021
@evenSosaAkido
Copy link

evenSosaAkido commented Feb 16, 2021

@lucassouza16 I have the exact same issue were you able to solve it?

@hsh0917
Copy link

hsh0917 commented Feb 17, 2021

@lucassouza16 I figured out how to fix it. On the Simulator bar at the top, Device -> Erase all content and settings. This will resolve the problem. I hope this helps you out.

@evenSosaAkido
Copy link

@lucassouza16 I figured out how to fix it. On the Simulator bar at the top, Device -> Erase all content and settings. This will resolve the problem. I hope this helps you out.

I've tried that with no success :(

@lucassouza16
Copy link
Author

@ lucassouza16 Descobri como consertar. Na barra do Simulador na parte superior, Dispositivo -> Apagar todo o conteúdo e configurações. Isso resolverá o problema. Espero que isso ajude você.

Eu tentei isso sem sucesso :(

I also tried to clear the simulator data, but without success, what solved for me was to update OS X to Catalina 10.15.7 and later update XCode to version 12

@evenSosaAkido
Copy link

@ lucassouza16 Descobri como consertar. Na barra do Simulador na parte superior, Dispositivo -> Apagar todo o conteúdo e configurações. Isso resolverá o problema. Espero que isso ajude você.

Eu tentei isso sem sucesso :(

I also tried to clear the simulator data, but without success, what solved for me was to update OS X to Catalina 10.15.7 and later update XCode to version 12

Oh wow I hope that's not the only solution

@brentvatne
Copy link
Member

this isn't an issue with expo, this is a problem in your project / xcode.

it's always best to make sure you're using the latest version of xcode, and you often you can solve problems like this by resetting your simulator state and/or cleaning your build ("Produt -> Clean Build Folder" or cmd+shift+k in xcode in your project).

@evenSosaAkido
Copy link

this isn't an issue with expo, this is a problem in your project / xcode.

it's always best to make sure you're using the latest version of xcode, and you often you can solve problems like this by resetting your simulator state and/or cleaning your build ("Produt -> Clean Build Folder" or cmd+shift+k in xcode in your project).

@brentvatne

Already tried that many times and with different computers. So you're saying that bare workflow doesn't work with Xcode <12?

@brentvatne
Copy link
Member

brentvatne commented Feb 25, 2021

@evenSosaAkido - it should work fine, but we don't test against that. the bare workflow is just the react-native default template + expo libraries. you should always try to stay up to date with the latest version of xcode or you might run into problems - for example, you can't submit apps to apple without using roughly the latest version of xcode (unless you use EAS Submit)

edit: try googling "FBSOpenApplicationServiceErrorDomain" and see what other suggestions are available, again this is an xcode issue and totally unrelated to expo except that you use xcode for bare projects

@evenSosaAkido
Copy link

@brentvatne Thanks for your response will update my OS/xCode hopefully that will solve the issue. Thank you!

@lucassouza16
Copy link
Author

isso não é um problema com o expo, é um problema no seu projeto / xcode.

é sempre melhor certificar-se de que está usando a versão mais recente do xcode, e muitas vezes você pode resolver problemas como este redefinindo o estado do simulador e / ou limpando sua compilação ("Produt -> Limpar pasta de compilação" ou cmd + shift + k no xcode em seu projeto).

Yes, the problem was really that, as I mentioned above the project worked when updating XCode 11.5 to 12.

@georrgee
Copy link

@lucassouza16 I figured out how to fix it. On the Simulator bar at the top, Device -> Erase all content and settings. This will resolve the problem. I hope this helps you out.

if anyone is dealing this issue and has xcode 13, erase all content and settings worked for me

@TonchoLozev
Copy link

@lucassouza16 I figured out how to fix it. On the Simulator bar at the top, Device -> Erase all content and settings. This will resolve the problem. I hope this helps you out.

Erasing does the trick!

@jmada
Copy link

jmada commented Jul 20, 2023

@lucassouza16 I figured out how to fix it. On the Simulator bar at the top, Device -> Erase all content and settings. This will resolve the problem. I hope this helps you out.

Thank you so much, it worked!

@arunpkumar92
Copy link

This worked for me

softwareupdate --install-rosetta --agree-to-license
run this command on terminal

@harSofja
Copy link

harSofja commented Jan 9, 2024

the rosetta solution indeed worked for me. Nothing else did. They also mention this in a apple thread but yeah there is no mention of this anywhere. System is supposed to download rosetta on it's own, but this never happened. for those who erase all content does not work this must be it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants