FBSOpenApplicationErrorDomain error 1
Solution 1
I had the same error after updating Xcode to v7.0. After few hours struggling, I found that there was some empty environment variable setup to be passed for Run action in my active scheme (have no idea why it was there). Removing this empty environment variable resolved the issue immediately.
Solution 2
This error happens when a previous run of the app is still alive in the background, even if you clicked "Stop" in Xcode. Try manually killing the app in simulator itself: cmd+shift+H twice to open up running apps, drag up your app to kill it. Note cmd+shift+H is the shortcut to go to homescreen. Then start the new run and it should work fine :)
Solution 3
- Simulator->Reset Content and Settings
- Quit Simulator
- Run the test cases again
Solution 4
In a tvOS app, you can go to simulator and delete the app in there and then re-run the program.
Solution 5
If the other fixes don't work
Went through these attempts:
- Force quit the app in simulator
- reset simulator
- removed app from simulator
- Disabled App Transport Security globally (not recommended)
- Turned off all background modes issue always returned preventing debug sessions
This was my fix
Seems like the schemes manager enables a field with no arguments that caused my issue.
Product menu > Scheme > Edit Scheme > Run > Arguments > Environment Variables
If there is a checkmark there with an empty field next to it, then uncheck it.
I was getting the "1" error code. I hope this works for you too.
Douglas Ferreira
Lead iOS Developer @iFood and CocoaHeads Campinas Chapter-Leader
Updated on July 09, 2022Comments
-
Douglas Ferreira almost 2 years
I'm trying to run my iOS app that was migrated from
Swift 1.2
toSwift 2.0
in Xcode 7 using iPhone Simulator (any), I'm getting the following error:The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 1.)
I already tried to reset simulator settings and content, quit Xcode, clean project, etc.
-
Ian Warburton over 8 yearsYes, the fixed it! I had a check box checked under Environment Variables but no names or values. How did you find that?
-
Denis over 8 yearsas I said, few hours of struggling makes you looking in impossible places
-
bistekka over 8 yearsWhat makes you think this has anything to do with ATS or Facebook?
-
likid1412 over 8 yearsIf "dismiss" means "shift + command + H" to let app into background, it solves my problem.
-
William Entriken about 8 yearsI CREATED and then removed an environmental variable. It fixed it.
-
Scott almost 7 yearsSame here. If you are using cordova you can set it with the cli by running
cordova emulate ios --target="iPhone-6"
-
Dhaval H. Nena almost 6 yearsGENIUS !! This kind of issues are hard to find if you were in middle of adding some environment variables and you didn't add it, after hours you try to find such issue is terrible. Happened to me. Thanks for the answer :)
-
Alexander Vasenin almost 6 yearsThat lead me to
Program specified by service does not contain any valid architectures for this system
-
Rachit Rawat over 5 yearscan you send me a screenshot of the same.
-
M. Leonhard over 4 yearsWould you please tell us which environment variable was the problem?
-
Cuneyt about 4 yearsThank you! I tried every other way and this was the fix for me, how easy! Shame on Apple for such poor error messages.