You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TimeoutException with hot reload. Hot restart works fine #17005
@aam@rmacnak-google@a-siva - can we think about any sort of logging we could add to diagnose this problem? I think in the original comment @zoechi was pasting logs which indicated that _listViews is timing out.
There is known issue where hot-reload hangs if the Flutter code is sitting on the breakpoint.
We had flutter-team-archive/engine#4939 to fix that, but landing of it had to wait to unblock engine refactor land.
Still experiencing this problem on latest master 0.4.5-pre.6
Last time I clearly didn't experience this was on beta pointing to v 0.2.8. I can still roll back to that version and everything goes smooth.
I tried different versions of Android Studio, also latest Intellij, forcing eiter dart 1 or 2, in different projects and flutter versions. Nothing makes it better, usually the first 1 or 2 hot reloads work normally but after about a minute all attempts to hot reload from IDE never finishes. Attempts to hot reload from command line seem to "finish" but no side effects are shown on emulator.
I avoid breakpoints as much as I can in general, until hot reload is 100% back.
Ran from command line with --verbose. Hot reload works as expected.
flutter clean. Ran from command line without --verbose. Hot reload works as expected.
flutter clean. Ran debug from AS 3.1.1 with shortcut assigned to hot reload, no verbose logging. Hot reload stuck, console window shows "Performing hot reload..." and never goes past it.
The test was the following:
Have new Text('abc');
Add one more letter to that string, in a way that across all tests that string is still unique. Hot reload.
Repeat step above 5 times.
Delete last letter. Hot reload.
Repeat step above 5 times.
My experience varies, but usually when Android Studio I can add about 2 or 3 characters.
In this test the command line showed to be reliable, but in a typical use I also have problems with it.
I noticed from the gist that the emulator says its memory is full, so I reran it after deleting a couple of apps.
The emulator is not responsive: app bar, TextField, button don't show any signs that I'm interacting with them
SW back button (emulator) gives me visual feedback but nothing in app shows it received that command
qemu is typically 7% when idle either on home or with flutter app opened, but raises to 29-30% when hot reload is stuck.
If I take too long to type / hot reload I can have fewer successfull cycles (as in, less characters show). But if I do it too fast it also makes more problems.
I can still press home button, then recent button and swipe the app to kill it, when AS buttons go back to normal (stop button grays out, debut and run buttons get enabled again).
It seems it depends on what part of the UI is shown.
I started working on a simpler page and here hot-reload is working fine, but on a more complex page it still "_listViews is timing out."
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
mraleph commentedon Apr 26, 2018
@aam @rmacnak-google @a-siva - can we think about any sort of logging we could add to diagnose this problem? I think in the original comment @zoechi was pasting logs which indicated that
_listViewsis timing out.aam commentedon Apr 26, 2018
There is known issue where hot-reload hangs if the Flutter code is sitting on the breakpoint.
We had flutter-team-archive/engine#4939 to fix that, but landing of it had to wait to unblock engine refactor land.
mraleph commentedon Apr 26, 2018
@zoechi could you check if you are on the breakpoint when reload times out?
zoechi commentedon Apr 27, 2018
This also happens when no breakpoint is set.
zoechi commentedon May 8, 2018
There are also #7310 and #17372 which seem related but they do look like being caused by breakpoints.
fmatosqg commentedon May 15, 2018
Still experiencing this problem on latest master
0.4.5-pre.6Last time I clearly didn't experience this was on beta pointing to v 0.2.8. I can still roll back to that version and everything goes smooth.
I tried different versions of Android Studio, also latest Intellij, forcing eiter dart 1 or 2, in different projects and flutter versions. Nothing makes it better, usually the first 1 or 2 hot reloads work normally but after about a minute all attempts to hot reload from IDE never finishes. Attempts to hot reload from command line seem to "finish" but no side effects are shown on emulator.
I avoid breakpoints as much as I can in general, until hot reload is 100% back.
Is there any way to mitigate it?
a-siva commentedon May 15, 2018
can you add the '--verbose' option to the 'flutter run' command and post the output here.
fmatosqg commentedon May 15, 2018
Android Studio
3.1.1• Flutter pluginio.flutter 24.0.1• Dart plugin173.4700Things I tried on flutter beta 0.3.2 today:
flutter clean. Ran from command line without --verbose. Hot reload works as expected.flutter clean. Ran debug from AS 3.1.1 with shortcut assigned to hot reload, no verbose logging. Hot reload stuck, console window shows "Performing hot reload..." and never goes past it.The test was the following:
new Text('abc');My experience varies, but usually when Android Studio I can add about 2 or 3 characters.
In this test the command line showed to be reliable, but in a typical use I also have problems with it.
https://gist.github.com/fmatosqg/7a643451d39a760464b8b64ea9019ca8
These are the lines immediately before the timeout manifests itself:
After that I hit stop, that is clearly indicated in the gist.
fmatosqg commentedon May 15, 2018
A few more details:
103-starter_and_102-complete) even aftergit clean -xffdfmatosqg commentedon May 15, 2018
A few more details that seem to make a difference but I still can't be sure:
Having a small
Scaffoldwith a single element and triggering hot reload withcmd+s(save file) seems to work better thana relatively big tree, using the shortcut for hot reload and changing content in a nested text like so:
aam commentedon May 15, 2018
Perhaps we can consolidate this into #17434 where folks are reporting similar problem with hot reload in VSCode.
fmatosqg commentedon May 15, 2018
Moving my discoveries over that thread (#17434 )
zoechi commentedon May 18, 2018
It seems it depends on what part of the UI is shown.
I started working on a simpler page and here hot-reload is working fine, but on a more complex page it still "_listViews is timing out."
mraleph commentedon May 18, 2018
As far as I see @aam is working on fixing #17434 which looks similar.
Alex, is this the same issue or are they different issues? Should these two bugs be merged?
aam commentedon May 18, 2018
Merging with #17434
flutter-team-archive/engine@2d42c74...d7ad50c
flutter-team-archive/engine@2d42c74...d7ad50c
github-actions commentedon Sep 3, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.