I've updated quite a few NPM packages in my React Native app and now even though it seems to build fine, it starts and immediately crashes on the iOS simulator. The error that it throws is:
Failed to launch the app on simulator, An error was encountered
processing the command (domain=FBSOpenApplicationServiceErrorDomain,
code=3) The request to open "org.reactjs.native.example.myappname"
failed. THe process did launch, but has since exited or crashed.
Prior to these npm package updates, the app was running fine. I found a few suggestions such as running rm -rf ios/build, cleaning the project, etc. I tried all these but still getting the same error.
Any suggestions on how to fix this issue?
BTW, this is a react-native: "^0.65.1" app and the Xcode version is 12.4.
If there is no recent change in the iOS project files then try:
Reset Content and Settings of the simulator:
If reseting the simulator content and settings doesn't work, update Xcode to its latest version.
I encountered this while upgrading a React Native application and found the actual error a few lines above:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22): Failed to install the requested application The application's Info.plist does not contain a valid CFBundleShortVersionString. Ensure your bundle contains a valid CFBundleShortVersionString.
Then a few lines later error Failed to launch the app on simulator, An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=4):
Fixing the above error by setting the version correctly in xcode fixed the error for me.
The error was thrown in my case because of the bundle id was copy pasted to xCode and it had space around:
" com.your.app "
instead of
"com.your.app"
In my case the problem was for xml formatter and when I formatted the file it was added " " before package name.
check the source after formatting the file.
Related
I am unable to preview my app in canvas.
Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"
NSLocalizedFailureReason=An application bundle was not found at the provided path., NSLocalizedRecoverySuggestion=Provide a valid path to the desired application bundle., NSLocalizedDescription=Failed to install the requested application}
This was the run diagnostics. Any solution? I am able still able to use the iOS simulator. Thanks
For some reason, Xcode 11 couldn't detect a substantial change in the code for me. All I had to do was clear the build - Product | Clear Build Folder and then click on the try again.
Unfortunately, I've deleted my react native project with Xcode may it be the .xcworkspace file or .xcodeproj. file
So in order to get my project back with .xcodeproj, I had to rename my project eject and update react native. Having said that I am able to load the emulator but the project is still not present in the emulator. How do I reintegrate it back?
Here is the error that is seen on terminal:
error Failed to build iOS project.
We ran "xcodebuild" command but it exited with error code 65.
To debug build logs further, consider building your app with Xcode.app,
by opening Project.xcodeproj
I have deleted my project on Xcode may it be .xcworkspace or .xcodeproj.
Because of that, I had to delete IOS and android folders while downgrading, updating and re-upgrading my react version to re-install IOS and android folders.
Thanks to that the emulator is working but unfortunately the project isn't present in the emulator and is still absent with Xcode. One thing to point out is that the simulator only appears when ran in the integrated terminal and nor in general terminal after cd-ing in the project folder.
Can anyone please help re-integrating the project in the emulator and on Xcode, please.
Here is the error when the emulator is running in a general terminal:
Here is the error when the emulator is running in a general terminal:
error Command failed: xcrun instruments -s
xcrun: error: Failed to determine realpath of '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk' (errno=No such file or directory)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH
Here is the error for building the project within emulator when ran from VS code integrated terminal:
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening project.xcodeproj
The process you need to follow is so similar to renaming a react native app. Basically you just need to run react-native upgrade in your root project directory. For further info you can check another question here. The instructions below explains how to create another react native project based on a copied one with a new name.
First copy the directory which your to-be-name-changed application exists. And go to your newly cloned directory.
Change the name at index.ios/android.js file which is given as a parameter to AppRegistry.
Change the name and version accordingly on package.json
Delete /ios and /android folders which are remaining from your older app.
Run $react-native upgrade to generate /ios and /android folders again.
Run $react-native link for any native dependency.
Finally run $react-native run-ios or anything you want.
Courtesy of
https://stackoverflow.com/questions/42506068/how-can-i-regenerate-ios-folder-in-react-native-project
When I try to run the project in simulator, I get the error:
Failed to create plugin placeholder for
/Users/zc/Library/Developer/Xcode/DerivedData/iPhoneHandheldACT-cwlfykavlwlqwlhbecjubziblyzi/Build/Products/Debug-iphonesimulator/iPhoneHandheldACT.app/PlugIns/CallerID.appex
The build is successful, but run gives me the error.
This happened after I started re-organising the files in my project.
I tried deleting the derived data, clean and restarting the Xcode but it didn't help.
Removing the CallerID.apex from the embed framework section in Build Settings fixed this error.
For me the issue was that the version and bundle version of my widget configuration intent target didn't match the versions of the widget and the app.
I am trying to run meteor app on MAC without success with following error. Surprisingly other project is running properly in MAC and very this project runs properly on Windows. But in MAC I can't figure out what's wrong.
/Users/user1/.meteor/packages/meteor-tool/.1.1.4.xh5uo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:245
throw(ex);
^
Error: Must throw non-empty error
at Object.Future.throw (/Users/user1/.meteor/packages/meteor-tool/.1.1.4.xh5uo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:259:10)
at /Users/user1/.meteor/packages/meteor-tool/.1.1.4.xh5uo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/buildmessage.js:541:23
at runWithEnvironment (/Users/user1/.meteor/packages/meteor-tool/.1.1.4.xh5uo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/fiber-helpers.js:139:21)
at /Users/user1/.meteor/packages/meteor-tool/.1.1.4.xh5uo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/fiber-helpers.js:146:14
at /Users/user1/.meteor/packages/meteor-tool/.1.1.4.xh5uo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/buildmessage.js:549:11
The issue is probably related problems fetching the packages, see https://github.com/meteor/meteor/issues/4921