I'm trying to run tests for my app, i'm able to get to a point where it launches the app in the simulator, but then gives this error and all tests fail:
2014-05-23 12:49:30.276 App[20472:60b] Cannot find executable for CFBundle 0xd04e190 </Users/Kalyan/Library/Developer/Xcode/DerivedData/App-gkggxfqpxbiszkbmoqpwtzlklpem/Build/Products/Debug-iphonesimulator/AppTests.octest> (not loaded)
IDEBundleInjection.c: Error loading bundle '/Users/Kalyan/Library/Developer/Xcode/DerivedData/App-gkggxfqpxbiszkbmoqpwtzlklpem/Build/Products/Debug-iphonesimulator/AppTests.octest'
I'm not sure what the issue is, but I have read many forums on this. Seems like its some sort of configuration issue but i'm not able to put a finger on it.
Some people mentioned in the simulator going to Simulator > Reset Content & Settings, but that didn't help.
I have tried reading the below to no avail:
Cannot find executable for CFBundle CertUIFramework.axbundle
https://github.com/kif-framework/KIF/issues/310
https://groups.google.com/forum/#!msg/rubymotion/_tcikfIkPNo/oIp9oCrZzcwJ
Is there anything else I haven't tried?
This took me forever to figure out, but just in case somebody else is having this issue, goto the project settings, and then click on the Tests project.
Goto Build Settings. Search for Wrapper Extensions under Packaging. Make sure it's the appropriate one. Currently it should be xctest.
Related
I try to develop an UI Unit Test for my Application.
I created a UI Test Target and wanted to launch the example XCTest which is generated with the creation of the Target.
When I try to launch the Test I get the error message:
Could not obtain the Bundle Identifier for
/Path/from/user/toAppRepo/build/Debug-iphonesimulator/My_App.app
I am not sure, why this is happening, as I did not change Andy configuration and several Questions I have seen here do not help with my Problem, e.g. I set the Buildings "Use for command-line builds" option to "Debug" as mentioned in a similar Question. When I set TEST_HOSTit says, that I could not configure a Test with USE_XCTRUNNER and TEST_HOST.
I tried multiple solutions on this now like, cleaning the project adjusting the project file or deleting the app etc., but nothing helped here.
After discussions with my colleague where everything worked very well (same project) I tried to delete my DerivedData of Xcode with following terminal command:
rm -rf ~/Library/Developer/Xcode/DerivedData
After that I tried to launch the test again and everything worked.
Probably there are multiple issues which lead to this error all with a different solution and this was mine. Hope it helps someone which has the same issue.
I encountered a similar problem and the way I fix it is
Delete My_App.app.
Clean project and re-build it.
I just plugged in a new iPhone 6, created a provisioning profile and then I launched the app I'm developing on the device. It compiled fine, but at linking stage it errored out with:
ProcessProductPackaging
...
error: class '(null)' of input object does not respond to either selector writeToFile:options:error: or writeToFile:atomically
I cannot find any information of what that is. I do not get any specific code reference to relate it to. Did anyone experience this?
Personally I was able to solve this issue by rebuilding the project a second time. I think I was only experiencing it after revoking and requesting a certificate.
Odd for it to jump at me and disappear though.
I just restarted Xcode then the error was disappeared
I've tried turning the "Automatically managed signing" off and on again, then the issue disappeared. Note: rebuilding didn't help for me, cleaning either.
I removed an external library and related code I had and it's now working.
I just changed some provisioning setting and then restarted the xcode afterwards the error was disappeared and archived and then uploaded successfully
Rebuilding the project does the job for me. Actually I was making changes in capabilities while Xcode was building that makes build failed.
The error occurred after I made manual changes to the Xcode .entitlements and Info.plist files: I removed some entries. None of the above mentioned solution attempts worked for me. Every try to create an archive failed.
The solution was to go to Xcode's Capabilities section and switched everything on and off again.
I had the same problem specifically on an App Extension we used for Push Notifications, and I was using Automatically manage signing but it seems the App Groups in capabilities were failing, so I just had to make sure the App Groups were retrieved correctly and this fix it.
Also if you have .entitlements files, and you have App Groups there, make sure they are the same you are using in the capabilities configuration.
Restarted XCode and enabled and disabled to Automatically manage signing
I have a new machine that is a clean setup of Ruby, Cucumber, and Calabash-IOS.
When I try to run cucumber from Terminal I get an error popup from instruments that says
"Unable to interpret path (null)" and the simulator never launches
I tried changing the APP_BUNDLE_PATH and I tried commenting out the APP_BUNDLE_PATH, neither worked.
This is a compiled .app file that was built using Xamarin Studio. I am assuming that instruments is having some problem with this .app file for some reason when it is trying to launch it? This same setup works fine on other machines so it must be an environmental
problem.
Is there a way to get a better output log from cucumber or calabash (or instruments) so I can figure what exactly is throwing this error? Or does anyone have any ideas of what I can try to get calabash to launch my .app correctly in the simulator?
For anyone who might stumble over this in the future.
In my case the issue was caused by an invalid .app package. I still don't know what was wrong with the specific package itself but something inside the .app must have been invalid causing the error. I recompiled my application and replaced the .app file that was being loaded but calabash and the problem went away.
a more informative error message would have been nice (something like, corrupt .app package detected) but oh well.
Hope it helps someone else in the future.
So this seems to be quite a common question but all the answers I found were related to getting "xcode cannot run using selected device" when trying to run it on a connected device. My issue is getting this error just trying to run it in the iOS simulator.
Some background is that app was running in simulator fine, and then I changed the Project Name, the Target name and the Scheme name and that is when the problems started to occur.
I tried many of the different solutions in some of the other threads such as: Clean, Delete Derived Data, restart Xcode, restart computer, make sure using Default LLVM, remove Info.plist then re-add it into project again. None of them worked.
I finally discovered the problem and was able to get it working and will post my solution below.
What I discovered to be the problem, was that in the Info.plist file the Executable File (CFBundleExecutable) was hard coded as "MyAppName". When I changed the Project name and Target name and Scheme name, this hardcoded value was not changed, but still had the original app name in it.
So I changed Executable File (CFBundleExecutable) in the Info.plist file to be this constant:
${EXECUTABLE_NAME}
And the problem was solved :)
EDIT:
I had the problem occur again on a different project, however the above was already set to ${EXECUTABLE_NAME}.
So I went searching and found that under Build Settings > Build Options > Compiler for C/C++/Objective-C was set to UNSUPPORTED.
I changed this setting to DEFAULT and the problem was solved :)
EDIT:
I had the problem occur again and the above two things did not fix it.
So I went and made sure that the info.plist was removed (unticked) from any Target Membership, and this solved the problem. It seems that there are multiple things that will cause this issue, so try all the solutions!
I ran into this and had to change the deployment target (iOS version) in the general tab of the project options menu. Apparently xcode had been updated to support iOS 8.2, but my simulator had not, therefore nothing appropriate was showing up in the list of simulator targets. Changing the deployment target to 8.1 fixed the issue. I'm sure that keeping my Mac up to date would also help.
I've been working on a project in Xcode 3.2.5 and today I tried migrating it up to Xcode 4.0. It compiles just fine; I can navigate to and execute the .app without a hitch (as expected). The only thing that is screwy is the fact that Xcode cannot launch the application, and displays the following error when it tries:
"Error starting executable. No executable file specified. Use the "file" or "exec-file" command" (image not available)
I've scoured the Project and Xcode settings and have been googling for half the day, but all I can find are dead ends and people bashing other people about breaking Apple NDA. FYI Xcode 4 has been released, and is no longer under NDA.
Should I just start a new project and copy in my source? Sounds wrong to me, but brute force works when brute force works.
Thanks in advance
At a guess, the schemes it set up for you based on your v3 targets and build settings might not be quite right. From the schemes menu, choose to edit the current scheme, then select the Run action from the list and make sure the appropriate exectuable is selected.
I ran into the same issue this question came up so I spent my time identifying the issue, reproducing the issue, narrowing it down and explaining as best I could how to not make it happen - as well as the general frustration that comes with an issue like this (it hit me on 2 different versions of Xcode in 2 weeks).
If you're going to delete my post then at least take the time to try and answer the question as I had tried to do.
Now, on to the reply that actually tells how this issue may be created and how to avoid that.
I JUST had this happen creating an app for iOS. Why? I renamed my target executable.
Just tested this by checking out a new copy of the source and rebuilding.
The app ran fine on my device.
Went in to Xcode 4.2, renamed the target. Ran the app. "Error starting Executable..."
I changed the filename back. Same error.
Cleaned and ran the app again and it launched.
Renamed the app, cleaned and ran it again. Not so much luck.
Don't rename your app by renaming the target.
This is such a stupid limitation. Apple lets you rename your target app, but by doing so, this prevents your app from launching on the device.
EDIT: I haven't checked in any code, but now I can't check out and build and run any app without this happening. How do you get the device/xCode out of this state once you've gotten it in to it?
Even the app now crashes on launch at int retVal = UIApplicationMain(argc, argv, nil, nil);
This is in Xcode 4.2 on Snow Leopard, but I got into the same state with Xcode 3 on another Machine last week.
Edit 2: Rebooted the device, rebooted my Mac. Built and ran in the simulator first, then on the Gen4 iPod touch. It works.
I had this issue when migrating a project from Xcode 4 to 4.1, and it ended up being due to the Target's "Product Name" being different in the debug and release configurations. A holdover from when I changed the name of the product many versions ago. So check that...
I've downgraded Xcode from 4.2 to 4.1 only to encounter an error at build and run on device: "Error starting executable. Don't know how to run ...". I've cleaned the project (Xcode > Project > Clean) and cleaned the build folder (Xcode > Project > (hold option key) Clean Build Folder). After that I had to build again and it built okay on iPod touch 4g running iOS 5.
Well, it sure sounds like a whole family of bugs behind that error message!
I got the error after loading up an Xcode 3 project under 4.2.x for the first time.
None of the above tips worked for me, however what I eventually did was switching from GDB to LLDB.
That fixed it.
It looked like the new path to the executable wasn't properly recognized by GDB (i.e. once locally at PROJECT/build/Debug/... in Xcode3 but now in the usual temp. folder location with Xcode 4 it was still looking for the executable in the build folder relative to the project sources)
I duplicated the target and rename the copied on to different name, I got this error message. What I did is to clean the project, exit Xcode, restart the Xcode, then it can run on my device.