-
Notifications
You must be signed in to change notification settings - Fork 28.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Lost connection to device" randomly when not doing anything in particular #9707
Comments
I'm also wondering what I get a
|
i happen to experience this, i suspect its with memory things. My app has 2 tab, 1 is to load text infinitely and its ok, another tab is to load a list of image from network and its also infinite. when i test on second tab, the image is loading fine and when i place it without doing anything the app will crash and it happens both in emulator and real phone, but it took longer for emulator to crash since the pc spec is good while the phone crash much faster. There is no log, no nothing, the app just crash like that. Hope flutter can fix it |
This is happening even on the Get Started Demo when hot-reloading on a Samsung SM G900A device running Android 26 and there is no log, no notification, the app just snaps. Thanks for your help..Go Flutter! |
This comment was marked as duplicate.
This comment was marked as duplicate.
I am facing the same issue. For me it happens on a page with a Stopwatch running while loading an animated GIF. Flutter crashes with similar log, on both simulator, and actual Android and iPhone devices. Is there some clue from the line
|
This comment was marked as duplicate.
This comment was marked as duplicate.
I am also receiving the same issue randomly. Im assuming it's a memory issue some how, my app in the Observatory says that I am using 445mb of memory which is INSANE. The only thing I am loading is a user's profile picture from Firebase Storage and I am using the Google Maps API to do nearby place searches. |
This problem is driving me crazy, as the app grows it becomes more and more impossible to debug, I have to try to run the app 5 times or more because it closes constantly, it has been like that since I started using flutter in February of this year and there are no signs that they know what causes it. Definitely must be related to the amount of memory used, it happens more often when I'm using more applications in windows. |
This comment was marked as duplicate.
This comment was marked as duplicate.
It seems more related to Android version, when I use a phone with Android 8.x the problem is really painful, but when I use an Android 6.x or 5.1 phone the problem disappears. |
This comment was marked as duplicate.
This comment was marked as duplicate.
This problem is ruining development experience for me. I will not consider flutter for another project until this one gets solved, even thought I totally love the framework. |
My app is crashing very often.... |
This comment was marked as duplicate.
This comment was marked as duplicate.
Same problem. Trying to use lib Failed to send request: {"jsonrpc":"2.0","id":"1397","method":"resume","params":{"isolateId":"isolates/4275718744151023"}} and [+10514 ms] Service protocol connection closed.
[ +1 ms] Lost connection to device.
[ +2 ms] DevFS: Deleting filesystem on the device (file:///data/user/0/br.com.<my_company_name>.<secret_project_name>/code_cache/<secret_project_name>YGPRCR/<secret_project_name>/)
[ ] Sending to VM service: _deleteDevFS({fsName: <secret_project_name>})
[{"id":28,"result":true}] |
This comment was marked as duplicate.
This comment was marked as duplicate.
Same issue also after starting to use an image related library (gif_ani) so it's probably not specific to a library in particular. |
I solved the issue for It's still pretty weird that leaving a listener on it would end up crashing the application. At least it might be a lead. |
The same problem, I have a GridView to load multiple images. When I load many images on the list, the Flutter application is closed without throw any exception. Has Someone fixed it? Additional information:
|
Switch to "File Transfer" from "No data transfer" solves the problem I was having here |
@GustavoNeri02 there are multiple causes for this error. One possible cause is the File Transfer that has not been enabled, and that indeed does need to be enabled for debug sessions to run smoothly. You're right. But there seems to be other causes as well, and situations that are considerably more tricky to investigate. In my case, a heap overflow somewhere in a background isolate could explain the behavior. I'm not even sure if "Break on: Uncaught exceptions" would help here. I believe the Flutter team should be a little bit cautious about this, as there are a number of very annoying, recurrent (I mean very recurrent) issues when it comes to debug Flutter applications that could be addressed somehow. Considered the excellent work being done generally speaking so far, the spirit here is would be to provide the developer the maximum amount of assistance. Anyway, just my $0.02. |
I have been building in debug and it was working well until I released windows the app and run the app on another machine and the app suddenly stopped and closed without sending any stack trace. |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
Same issue when i try to use firebase on windows 10, but working on windows 11 |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as duplicate.
This comment was marked as duplicate.
Although not very straightforward, the problem disappeared on my side.
onPressed: executeFunction() Which seems to compile without any problem except it should actually be: onPressed: executeFunction And once I did that, the problem stopped happening. Hope this helps. |
This is happening to me with a fresh untouched |
Happenning to me with a connected iPhone 12 Pro device. All the time! ie randomly gives up the connection after a few minutes. |
Here is my
|
I am facing this issue on windows platform, so both and target platform is windows. |
This comment was marked as spam.
This comment was marked as spam.
Daily annoyance right now ... hope we find a stable way to manage the connection |
I remember seeing somewhere in the 3.24.x release notes that the 'Lost connection to device' message had been improved, in that it would provide an explanation as to why it occurred. |
I searched for it in https://docs.flutter.dev/release/release-notes/release-notes-3.24.0. It's in the changelog instead: https://github.com/flutter/flutter/blob/master/CHANGELOG.md. Although from my daily experience I don't see any particular reason being printed on console. |
@pavanpodila that's right, it is here, too, in the 3.24.2 release changelog: https://github.com/flutter/flutter/blob/main/CHANGELOG.md#3242 states "When running a Flutter app, display a concise error message when connection to the device is lost" (#153769). I expected this enhancement would help us diagnose 'Lost connection to device' issues, but I too do not see any information when that happens. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as duplicate.
This comment was marked as duplicate.
I'm working on a project with v3.24.3 using camera and Google MLKit text recognition on Android, with a real android phone connected. Loses connection without any specific errors after ~5 minutes. It's too hard to work on the project anymore. |
I am still having issues too, rarely though. To be on the safe side, I usually set up wireless debugging for my phone using adb. This way, I make sure the problem does not come from my USB cable. I would suggest anybody subscribed to this thread to use wireless debugging. |
Closing Android Studio worked for me |
We should keep closer track of what adb is doing. Is it dying on us? The logs don't say.
The text was updated successfully, but these errors were encountered: