I have migrated to Flutter 1.22.0 from the older version. When I am trying to run the application in the IOS Simulator, it just opens the app and crashes and says connection lost. However in the Android Studio, it still shows it is running, I mean the Run & Debug button is disabled but the stop button is active.
The flutter run --verbose output is here.
Following logs I am seeing at the end after that nothing happens.
Launching lib/main.dart on iPhone 11 Pro in debug mode...
Running Xcode build...
Xcode build done. 18.4s
Configuring the default Firebase app...
6.26.0 - [Firebase/Core][I-COR000004] App with name __FIRAPP_DEFAULT does not exist.
6.26.0 - [Firebase/Messaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. If you'd prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO. Follow the instructions at:
https://firebase.google.com/docs/cloud-messaging/ios/client#method_swizzling_in_firebase_messaging
to ensure proper integration.
[Firebase/Crashlytics] Version 4.1.1
Configured the default Firebase app __FIRAPP_DEFAULT.
6.26.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60600000 started
6.26.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled
6.26.0 - [Firebase/Analytics][I-ACS031025] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
Waiting for iPhone 11 Pro to report its views...
Debug service listening on ws://127.0.0.1:55184/qe2GMcl6YA3=/ws
Syncing files to device iPhone 11 Pro...
Lost connection to device.
Whenever I start the IOS simulator, it gives me the "Spotlight quit unexpectedly." error. See the below screenshot. Not sure whether it is related to this issue or not...
You are still using an older version of Flutter. v1.22.2 is released this week. Try to upgrade Flutter with flutter upgrade --force.
Related
I have recently developed a Flutter application which works totally fine on all iPhone models and tested on Samsung and different android devices. However it gives either one of the following issue on some phones such as OnePlus, Xiomi Redmi etc.
Application won't install with error message "There was a problem in parsing the package"
If by chance the app gets installed on some Xiomi, OnePlus models, my user session which I have maintained through shared preferences does not persist. User is logged out when the app has been closed.
I am using following packages in my application:
list of packages
This error occurs mostly due to Android 12 and incorrect AndroidManifest.xml configuration if the phone i running SDK 31+ insure your app is configured for Android 12 if not try to set android:exported to any , ,, or components that have s declared in the app’s AndroidManifest.xml
Here is a blog on how to fix it
Trying to build a chat app, which gets FCM messages and shows notifications even when the app is closed.
Clearly, something in my top-level onBackgroundMessage function for FCM is wrong as the notifications are not showing (on a physical device- iOS emulators don't work with FCM).
In Android, I've debugged a similar situation by using adb logcat (and logs/print command).
Obviously, adb isn't available for an iPhone, and I don't know how to see the logs after the app is closed (I've tried to look at the console at Xcode but no Flutter messages are showing).
Because I can't run the app again after it's closed (see https://docs.flutter.dev/development/ios-14 the application can no longer be re-launched by tapping the application’s icon) I'm installing it on my device via "flutter install release".
How do I see the logs after install release, or otherwise how can I debug functionality (at least view flutter's logs and prints) when the app is closed?
Launching lib\main.dart on M2003J15SC in debug mode...
lib\main.dart:1
Plugin project :firebase_core_web not found. Please update settings.gradle.
Invalid depfile: D:\Kampus\Alternative Internship\E-Butler FLutter\history-ebutler-main\.dart_tool\flutter_build\8db1b350320c9cfb508a70518c727e07\kernel_snapshot.d
Parameter format not correct -
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Error waiting for a debug connection: The log reader stopped unexpectedly
Error launching application on M2003J15SC.
Exited (sigterm)
when i press f5 on my vscode the build is success but in my phone only view white screen and then it exited
Just switch off the Turn on MIUI Optimization in your Developer options then run your app.
For some other fixes checkout this.
Your app is installed even if your phone stays on white screen, you can see that it worked by closing and reopening the app from your phone.
This Issue happens on most Xiaomi...Redmi note 10 pro as well this is only when it comes to flutter, if you launch project from root/android it will work fine,
If you use command line flutter run it will also work but you will not get input back from command line after install only difference app is launching
At the moment this is the only worked around
Make sure that your app meets the following requirements:
Targets API level 19 (KitKat) or higher Uses Android 4.4 or higher
https://firebase.google.com/docs/flutter/setup?platform=android
in some android devices not receiving firbase base responce because of its versions and api level
flutter clean, restart your devices, reconnect your devices to your pc and run again, this solution worked for me.
Flutter web version of any app crashes when it's launched on Chrome, even when I launch a new project built from scratch (no modification, when Android Studio finishes building it, I launch it).
I receive this log:
Launching lib/main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...
This app is linked to the debug service: ws://127.0.0.1:52137/Ot39336ZDps=/ws
Debug service listening on ws://127.0.0.1:52137/Ot39336ZDps=/ws
💪 Running with sound null safety 💪
Debug service listening on ws://127.0.0.1:52137/Ot39336ZDps=/ws
Failed to send request: {"jsonrpc":"2.0","id":"27","method":"getMemoryUsage","params":{"isolateId":"1"}}
Application finished.
But it doesn't give me a lot of information about what's going on.
The weird part is that both iOS and Android versions of the app run perfectly.
I'm in the stable channel, using FLutter 2.5.2 and Dart 2.14.3
I am flowing the official tutorial to install flutter and run the default app on my iPhone Device. After I execute the flutter run, the app is installed and launched on my iPhone but the logs show the bellow error. How do I solve it?
Launching lib/main.dart on My iPhone 6 in debug mode...
Automatically signing iOS for device deployment using specified development team
in Xcode project: XXXXXXXXXX
Running Xcode build...
└─Compiling, linking, and signing... 50.2s
Xcode builds done. 90.1s
Installing and launching... 41.1s
Error launching the application on My iPhone 6. <-- Error Here
It happens that there are some process needed to Flutter plugin correctly run on physical devices. I struggled with that and finally found that the processes idevicesyslog and iproxy were being silently blocked by MacOS.
You may have noticed already a message liked this:
or a similar one for idevicesyslog.
Once I went to System Preferences -> Security & Privacy in General tab and allowed this apps, everything works. Note that this screen shows only the last app that you tried to run. So I'd recommend that you run flutter app with preferences opened so you can (hopefully) see the messages appearing and click allow.
MacOS may warn you one more time about the file being downloaded from the internet. Just click open and you're good.
The error do not show again after reboot the iPhone.
Same error -- Running fine through Xcode, when I ran with flutter CLI, the app would open, but the terminal log output would crash with the error as in the post.
I ran flutter update and simultaneously turned iPhone off and back on. After doing that, the below popup appeared (on mac).
I believe after the install finished, I ran the below (which I ran several times before updating flutter and installing the popup):
flutter clean
rm -rf ios/Pods
flutter pub get
cd ios && pod install && cd ..
run the flutter app using flutter run from command line, then the MacBook will ask for permission to open the app and app runs,
(lldb) warning: libobjc.A.dylib is being read from process memory. This indicates that LLDB could not find the on-disk shared cache for this device. This will likely reduce debugging performance.
Error launching application on device-XXXXX.
Building & Replace with a newest version ios-deploy solved problems list aboved. Flutter SDK bundled a pre-built command ios-deploy in __PATH_TO_YOUR_Flutter_SDK_/bin/cache/artifacts/ios-deploy/, just replace it.
Please reference to: Flutter Error launching application on device issue .