Home:ALL Converter>Error Launching Flutter App on iOS Simulator, App Crashes

Error Launching Flutter App on iOS Simulator, App Crashes

Ask Time:2021-02-18T16:02:08         Author:Yash Randive

Json Formatter

I am experiencing issues when launching a Flutter app on iOS simulator. The issue seems to be relating to localhost connectivity or Firebase, I am not able to tell. Judging by the below error put, but I am unable to find how to fix it.

I am running MacOS BigSur.

The app launches and runs fine on the Android simulator counterpart.

Below is the error output from Android Studio Terminal:

Running pod install...
Running Xcode build...
Xcode build done.                                           716.3s
Configuring the default Firebase app...
Configured the default Firebase app __FIRAPP_DEFAULT.
Connecting to the VM Service is taking longer than expected...
Still attempting to connect to the VM Service...
If you do NOT see the Flutter application running, it might have crashed. The device logs (e.g. from adb or XCode) might have more details.
If you do see the Flutter application running on the device, try re-running with --host-vmservice-port to use a specific port known to be available.
Exception attempting to connect to the VM Service: SocketException: OS Error: Connection refused, errno = 61, address = 127.0.0.1, port = 57172
This was attempt #50. Will retry in 0:00:01.600000.
Exception attempting to connect to the VM Service: SocketException: OS Error: Connection refused, errno = 61, address = 127.0.0.1, port = 57265
This was attempt #100. Will retry in 0:00:01.600000.
Exception attempting to connect to the VM Service: SocketException: OS Error: Connection refused, errno = 61, address = 127.0.0.1, port = 57356
This was attempt #150. Will retry in 0:00:01.600000.
Exception attempting to connect to the VM Service: SocketException: OS Error: Connection refused, errno = 61, address = 127.0.0.1, port = 57454
This was attempt #200. Will retry in 0:00:01.600000.
Exception attempting to connect to the VM Service: SocketException: OS Error: Connection refused, errno = 61, address = 127.0.0.1, port = 57586
This was attempt #250. Will retry in 0:00:01.600000.

I tried to fix this using some solutions online like the one on : Errors Launching Flutter app in iOS Simualtor

But that just removes the error from the Stack Trace(Android Studio Terminal) and the app still crashes.

Can someone please help? Thank you!

Author:Yash Randive,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/66255827/error-launching-flutter-app-on-ios-simulator-app-crashes
yy