App is giving SIGABRT when running on already running simulator - ios

When I am running the application from XCode through the simulator for the first time its running fine. But when the application is running in the simulator and if I run again from the XCode the app is stuck at splash screen, and the app is giving SIGABRT crash. When I stop the build from XCode the app continues to run from the splash screen. What might be the issue?

If you are running Xcode 4.6.2 on OSX 10.8.4, try upgrading to Xcode 4.6.3 which was just released a few days ago. The 4.6.3 version has fixes for the random crashes and hangs that sometimes happens when debugging on the ios simulator.

This is XCode issue. Sometimes the bootstrap fails to register the application. Usually giving an error on console as
Couldn't register com.compname.yourapp with the bootstrap server. Error: unknown error code. This generally means that another instance of this process was already running or is hung in the debugger.Program received signal: “SIGABRT”.
Solution
If running on device, switch off and restart device.
If running on simulator, restart your Mac.

Related

iOS Observatory not discovered after 30 seconds. Error launching application on iPhone

I'm unable to debug a freshly created app on physical iOS devices when pubspec dependencies reach a certain size, because it causes the "waiting for observatory port" step to timeout after 30 seconds.
Devices tested:
iPhone 12,
iPhone 12 Pro
iOS versions tested:
14.7.1,
14.5
The app runs properly on emulator but not on ios real device.
How do I fix this issue?
This Error message occur when your iPhone is busy processing something. For example as below.
If you run Flutter doctor you will see message as below.
Error: iPhone X is busy: Fetching debug symbols for iPhone X. Xcode will continue when iPhone X is finished. (code -10)
To confirm I opened xCode -> windows -> Devices and Simulator and it was showing the progress. Let the progress complete and then confirm by running Flutter doctor to make sure there is no error message.
Had the same problem after updating Xcode and running for the first time. As mentioned on the this github issue (https://github.com/flutter/flutter/issues/72161#issuecomment-994653225) I simply:
Opened ios/Runner.xcworkspace with the iPhone connected
Waited until "Fetching debug symbols" process finished
Closed Xcode
Run again from IDE and it worked!
I have encountered the same issue and following this process has fixed the problem for me on 14.7.1 and 14.8:
Uninstall the app
Restart the phone
Open the app using Xcode
Run 'flutter clean' for the project
Now it should work if you run it again.
If it still doesn't work you could try increasing the observatory timeout (the default appears to be 30 seconds):
localUri = await observatoryDiscovery.uri.timeout(const Duration(seconds: 30));
I'm not 100% sure why this problem appears inconsistently, but there is a lot of related discussion at the following link:
https://github.com/flutter/flutter/issues/72161
For coders who are as lazy as me, you could take these steps:
Open xcode for the project:
Run the project from xcode:
while(prompt_below_finished == false) wait for some time || make a coffee;
Runs successfully. As for me, next time I ran with android studio , it run smoothly
run your project through Xcode, not from Xcode or Android Studio. it will show different error message.
when I run the Flutter project using Xcode, the error message was
"The sandbox is not in sync with the Podfile.lock..."
to solve this, I run pod install on the ios folder. run these 2 commands below on your terminal
cd ios
pod install
I have tried all the solutions here and for me the simplest works:
move you Android Studio in the trash, download it and reinstall. for me the problem was with Android Studio 2021.1.1 Patch but I got there with several updates. a clean install solved the problem.
In My iPad case, It showed a white screen after compiling in the installing step for 5-10 minutes & it worked at the end without doing anything
Try updating your Xcode and MacOS to the latest versions.

M1 Xcode Launched App is frozen with DebugServer hogging the process

When I compile my app on Xcode and run it on normal Intel MacBook Pro, all good.
However, when run it on M1 MacBook Pro, I got the error on the console
rosetta error: mmap_anonymous_rw_guard_page mprotect failed
And then the App keeps frozen on the Launching Screen in the Simulator.
If I see the Activity Monitor, it has debugserver hogging the machine (as shown in diagram below). I kill it, then the App will die.
But I can relaunch the App from the simulator, and all is good. It's just that I have no way debugging the App on the Simulator. How can I get this issue fixed on M1?

react-native app crashes when distributed

When running the app on a simulator (or on a connected iPhone), I have no trouble running the application.
However when I archive the app in xcode (build succeeds) and distribute it using either HockeyApp or Fabric, the app installs just fine, but upon opening the app, it crashes right after the splash screen.
The log-file that is being generated on the iPhone does not give any useful information
On the Fabric/HockeyApp dashboard no crashes are being registered.
Any advice on how to get a stack trace or other useful crash log?
When running the react-native app using react-native run-ios --configuration Release, I was able to reproduce the error in the simulator and fix the JS error that was somehow not appearing running in debug mode. Logs for the Simulator can be found at
~/Library/Logs/CoreSimulator

Simulator freezes – Xcode 8.3.3

Recently I started to experience problems with iOS Simulator. It's strange but it never happened before.
When I run project it works fine for 10 minutes or so. But then it writes this messages to console:
Exiting because our workspace host has disconnected.
and
XPC connection interrupted
and simulator freezes (doesn't respond to touches).
Restarting of simulator doesn't help, I get alert in Xcode:
Error returned in reply: Connection invalid
Software caused connection abort
If I restart Xcode it works fine again... for next few minutes.
How to fix that?
I fixed this issue. I had Xcode 9 beta installed alongside Xcode 8.3.3 and called xcode-select to switch to Xcode 9. Looks like this was root of an issue.
When I switch back via xcode-select -s <path/to/Xcode.app> this issue disappeared.

App installation failed during run App in xcode 8

I upgrade my xcode after update in xcode_8 I have faced many issues like app not running in simulator as well as some time not run in device .It gives me an error App installation failed.An unknown error has occoured. Out of five three time run on device and 2 time not run and provisioning profile is correct because app run in device.
In simulator it gives an exception of slidemenu franework.
Code totally update with xcode_8 and swift 2.3.
Tried everything, described above, the only thing that fixed this was to restart my Mac, it then started working again.
Clean the derived data, then run again.

Resources