Flutter-intellij: Hot Reload On Save stops working

Created on 27 Feb 2019  Β·  49Comments  Β·  Source: flutter/flutter-intellij

I really don't know what extra info to provide for this issue, Hot Reload On Save just stops working for me and I need to hit Ctrl+\ to trigger it or restart IntelliJ IDEA

Most helpful comment

I love talking to robots.

All 49 comments

If I go to Languages & Frameworks there's a message on the version:

Waiting for another flutter command to release the startup lock...

Maybe this is related to the issue?

I restarted IntelliJ IDEA and when I saved my code I got this error on the terminal:

>Initializing hot reload...
Syncing files to device Android SDK built for x86 64...
E/flutter (14061): [ERROR:flutter/shell/common/shell.cc(178)] Dart Error: Unhandled exception:
E/flutter (14061): 'dart:isolate/runtime/libtimer_impl.dart': Failed assertion: line 433: '<optimized out>': is not true.
E/flutter (14061): #0      _AssertionError._doThrowNew (dart:core/runtime/liberrors_patch.dart:40:39)
E/flutter (14061): #1      _AssertionError._throwNew (dart:core/runtime/liberrors_patch.dart:36:5)
E/flutter (14061): #2      _Timer._cancelWakeup (dart:isolate/runtime/libtimer_impl.dart:433:12)
E/flutter (14061): #3      _Timer._notifyEventHandler (dart:isolate/runtime/libtimer_impl.dart:299:7)
E/flutter (14061): #4      _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:419:5)
E/flutter (14061): #5      _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

Could you add the output of running flutter doctor -v here (available from the command
line or from Tools > Flutter > Flutter Doctor)? Thanks!

(C:Programacao is a folder I use for programming related stuff like SDKs, tutorials etc)

[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.17763.316], locale pt-BR)
β€’ Flutter version 1.2.1 at C:ProgramacaoFluttersdkflutter
β€’ Framework revision 8661d8aecd (3 weeks ago), 2019-02-14 19:19:53 -0800
β€’ Engine revision 3757390fa4
β€’ Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
β€’ Android SDK at C:ProgramacaoAndroidSdk
β€’ Android NDK location not configured (optional; useful for native profiling support)
β€’ Platform android-28, build-tools 28.0.3
β€’ Java binary at: C:Program FilesAndroidAndroid Studiojrebinjava
β€’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
β€’ All Android licenses accepted.

[√] Android Studio (version 3.3)
β€’ Android Studio at C:Program FilesAndroidAndroid Studio
β€’ Flutter plugin version 33.0.1
β€’ Dart plugin version 182.5215
β€’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[!] IntelliJ IDEA Ultimate Edition (version 2018.2)
β€’ IntelliJ at C:Program FilesJetBrainsIntelliJ IDEA 2018.1.5
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
β€’ For information about installing plugins, see
https://flutter.io/intellij-setup/#installing-the-plugins

[√] IntelliJ IDEA Ultimate Edition (version 2018.3)
β€’ IntelliJ at C:Program FilesJetBrainsIntelliJ IDEA 2018.3
β€’ Flutter plugin version 33.3.2
β€’ Dart plugin version 183.5912.23

[√] VS Code (version 1.30.2)
β€’ VS Code at C:UsersMichel FeinsteinAppDataLocalProgramsMicrosoft VS Code
β€’ Flutter extension version 2.21.1

[√] Connected device (1 available)
β€’ Android SDK built for x86 64 β€’ emulator-5554 β€’ android-x64 β€’ Android 5.0.2 (API 21) (emulator)

! Doctor found issues in 1 category.
Process finished with exit code 0

Thanks for following up @feinstein!

@devoncarew: any thoughts on this one?

One curious thing, I don't have IntelliJ IDEA Ultimate Edition (version 2018.2) in my system anymore, I don't know where the Flutter Tool gets this from.

+1, same issue.

[βœ“] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.3 18D109, locale en-US)
    β€’ Flutter version 1.2.1 at /Users/phillywiggins/lab/flutter
    β€’ Framework revision 8661d8aecd (4 weeks ago), 2019-02-14 19:19:53 -0800
    β€’ Engine revision 3757390fa4
    β€’ Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[βœ“] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    β€’ Android SDK at /Users/phillywiggins/Library/Android/sdk
    β€’ Android NDK location not configured (optional; useful for native profiling support)
    β€’ Platform android-28, build-tools 28.0.3
    β€’ ANDROID_HOME = /Users/phillywiggins/Library/Android/sdk
    β€’ Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    β€’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    β€’ All Android licenses accepted.

[βœ“] iOS toolchain - develop for iOS devices (Xcode 10.1)
    β€’ Xcode at /Applications/Xcode.app/Contents/Developer
    β€’ Xcode 10.1, Build version 10B61
    β€’ ios-deploy 1.9.4
    β€’ CocoaPods version 1.5.3

[βœ“] Android Studio (version 3.3)
    β€’ Android Studio at /Applications/Android Studio.app/Contents
    β€’ Flutter plugin version 32.0.1
    β€’ Dart plugin version 182.5124
    β€’ Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[βœ“] IntelliJ IDEA Ultimate Edition (version 2018.3.5)
    β€’ IntelliJ at /Applications/IntelliJ IDEA.app
    β€’ Flutter plugin version 33.3.2
    β€’ Dart plugin version 183.5912.23

[βœ“] IntelliJ IDEA Community Edition (version 2018.2.2)
    β€’ IntelliJ at /Applications/IntelliJ IDEA CE.app
    β€’ Flutter plugin version 27.1.3
    β€’ Dart plugin version 182.4129.13

[!] VS Code (version 1.31.1)
    β€’ VS Code at /Applications/Visual Studio Code.app/Contents
    βœ— Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[βœ“] Connected device (1 available)
    β€’ Android SDK built for x86 β€’ emulator-5554 β€’ android-x86 β€’ Android P (API 27) (emulator)

! Doctor found issues in 1 category.

One curious thing, I don't have IntelliJ IDEA Ultimate Edition (version 2018.2) in my system anymore, I don't know where the Flutter Tool gets this from.

It appears you updated 2018.1.5 to 2018.2 and it was left in the installation directory for 2018.1.5. (Happens to me, too.) If you launch the product from C:\Program Files\JetBrains\IntelliJ IDEA 2018.1.5 and check the about box I think you'll see it is version 2018.2.

@brianegan Could you summarize your issue?

I think this is the steps I've taken to get this error:

  1. Work on a project
  2. Hot reload my way to success
  3. Cause a Code error (syntax error, etc)
  4. Hit Ctrl+S to hot reload cus I didn't see the error
  5. Hot reload throws some odd exception
  6. Hot reload appears to work one more time
  7. Then stops working
  8. Terminate the process and start over

That said, I was also experiencing this issue on Flutter 1.2.1 and I've just upgraded to master to try the fix. I haven't seen the issue the last day or so: https://github.com/flutter/flutter/issues/29232

I'll keep an eye on it and see if it's working now that some underlying bugs may have been addressed.

Thanks @brianegan ! An issue in flutter_tools could certainly have been the culprit.

I'm having the same issue with hot reloading not working.
I'll add that it usually happens when I play with the 'Inspect Widge' tool from the Flutter Inspector.
As far as I can tell, selecting an element, changing code, hot reloading, possibly twice, will make that issue appear.

I'm on master/1.7.4-pre.80

Same thing happening to me.

MacOS: 10.13.6
Flutter: v1.8.0
Android Studio: v3.4.1

@matanshukry @hekigan Were you using an Android Q (API 29) emulator? We just discovered an issue with that: https://github.com/flutter/flutter-intellij/issues/3652

The app is running on the emulator but is disconnected from the IDE. Hot reload won't work in that circumstance.

@stevemessick but hot reload does work, just not after some steps (which are not constant as far as I can tell). Or am I missing something?

@stevemessick I am using API 28 with AVD.

As @matanshukry wrote, hot reload works in the beginning and after some action, it just stopped.
After a computer reboot, all is ok, but I am still not sure if it's related or not with Flutter inspector.

I have the same issue but only with the feature "On Save" with the hot-reload button it works fine. At least with iOS-Emulator.

Without additional information we're unfortunately not sure how to resolve this issue. We're going to close this bug for now, but please don't hesitate to comment on the bug if you have any more information for us; we're happy to reopen. Thanks for your contribution!

Several people are still reporting this, the no-response bot shouldn't close it.

I love talking to robots.

I am having this issue.

I'm having exactly the same issue; Hot reload works when hitting Ctrl- or the yellow lightning, but isn't triggered when I save.
Android Studio 3.4.2,
Flutter 1.5.4-hotfix.2

IntelliJ Dart Plugin: v183.6270
IntelliJ Flutter Plugin: v37.1.1

It works on Android devices but doesn't work on iOS devices.

Can confirm. Result is that i have to restart IntelliJ like every 30 minutes or so

I've seen a few different possible resolutions; is doing a hot restart sufficient to get reload on save back on track? Is it necessary to stop the app and re-run? Or, is a full restart of IntelliJ necessary?

And for people experiencing issues, are there any suspicious exceptions in the IntelliJ logs (Help > Show logs)?

@devoncarew
A full restart of IntelliJ is the only thing that solves it for me. Not sure what's "hot restart" (isn't that hot reload?), but stopping the app, cleaning, building again - nothing like that works. Only restarting IntelliJ.
Regarding the exceptions, there weren't any suspicious ones.

Same here, only a full restart of IntelliJ.

Next time this happens I will take a look at the logs.

These are my logs right before it happened again this morning. This time hot reload just never stopped running and after a hot restart the hot reload on save wasn't working anymore:

2019-08-06 10:48:24,127 [1118302] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 824 ms
2019-08-06 10:48:48,602 [1142777] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 171 ms
2019-08-06 10:50:09,789 [1223964] INFO - tellij.openapi.util.IconLoader - replace '/nodes/package.svg' with '/icons/nodes/package.svg'
2019-08-06 10:50:10,015 [1224190] INFO - agnostic.FrequentEventDetector - Too many events posted, #1. Event: java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=LaterInvocator.FlushQueue,notifier=null,catchExceptions=false,when=1565081410004] on sun.awt.windows.WToolkit@4697efff
java.lang.Throwable
at com.intellij.openapi.diagnostic.FrequentEventDetector.getMessageOnEvent(FrequentEventDetector.java:75)
at com.intellij.ide.IdeEventQueue.doPostEvent(IdeEventQueue.java:1260)
at com.intellij.ide.IdeEventQueue.postEvent(IdeEventQueue.java:1164)
at java.desktop/java.awt.EventQueue.invokeLater(EventQueue.java:1318)
at java.desktop/javax.swing.SwingUtilities.invokeLater(SwingUtilities.java:1421)
at com.intellij.openapi.application.impl.LaterInvocator.requestFlush(LaterInvocator.java:343)
at com.intellij.openapi.application.impl.LaterInvocator.invokeLaterWithCallback(LaterInvocator.java:139)
at com.intellij.openapi.application.impl.ApplicationImpl.invokeLater(ApplicationImpl.java:371)
at com.intellij.openapi.application.impl.ApplicationImpl.invokeLater(ApplicationImpl.java:366)
at com.intellij.codeInsight.daemon.impl.HighlightingSessionImpl$1.schedule(HighlightingSessionImpl.java:63)
at com.intellij.util.containers.TransferToEDTQueue.scheduleUpdate(TransferToEDTQueue.java:156)
at com.intellij.util.containers.TransferToEDTQueue.offer(TransferToEDTQueue.java:135)
at com.intellij.codeInsight.daemon.impl.HighlightingSessionImpl.applyInEDT(HighlightingSessionImpl.java:71)
at com.intellij.codeInsight.daemon.impl.HighlightingSessionImpl.queueHighlightInfo(HighlightingSessionImpl.java:137)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightInfoProcessor.infoIsAvailable(DefaultHighlightInfoProcessor.java:135)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:390)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$5(GeneralHighlightingPass.java:290)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:311)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:314)
at com.github.izhangzhihao.rainbow.brackets.visitor.RainbowHighlightVisitor.analyze(RainbowHighlightVisitor.kt:32)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:314)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:314)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:70)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:314)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:281)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:225)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:55)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:429)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1106)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:422)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:421)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:397)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:164)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:204)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:395)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:161)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)

2019-08-06 10:50:10,773 [1224948] INFO - tellij.openapi.util.IconLoader - replace '/gutter/overridenMethod.svg' with '/icons/gutter/glyphs/overridenMethod.svg'
2019-08-06 10:50:10,979 [1225154] INFO - agnostic.FrequentEventDetector - Too many events posted, #1. Event: java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=LaterInvocator.FlushQueue,notifier=null,catchExceptions=false,when=1565081410978] on sun.awt.windows.WToolkit@4697efff
2019-08-06 10:50:11,032 [1225207] INFO - agnostic.FrequentEventDetector - Too many events posted, #1. Event: java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=LaterInvocator.FlushQueue,notifier=null,catchExceptions=false,when=1565081411031] on sun.awt.windows.WToolkit@4697efff
2019-08-06 10:50:11,258 [1225433] INFO - tellij.openapi.util.IconLoader - replace '/gutter/implementingMethod.svg' with '/icons/gutter/glyphs/implementingMethod.svg'
2019-08-06 10:50:35,135 [1249310] INFO - g.FileBasedIndexProjectHandler - Reindexing refreshed files: 4 to update, calculated in 6ms
2019-08-06 10:50:35,155 [1249330] INFO - .diagnostic.PerformanceWatcher - Reindexing refreshed files took 19ms; general responsiveness: ok; EDT responsiveness: ok
2019-08-06 10:51:47,660 [1321835] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 117 ms
2019-08-06 10:51:56,234 [1330409] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 122 ms
2019-08-06 10:52:03,417 [1337592] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 118 ms
2019-08-06 10:52:13,004 [1347179] INFO - tellij.openapi.util.IconLoader - replace '/images/changePermissions.svg' with '/icons/webDeployment/changePermissions.svg'
2019-08-06 10:52:13,006 [1347181] INFO - tellij.openapi.util.IconLoader - replace '/images/fileTransfer.svg' with '/icons/webDeployment/fileTransfer.svg'
2019-08-06 10:52:13,008 [1347183] INFO - tellij.openapi.util.IconLoader - replace '/images/ftp.svg' with '/icons/webDeployment/ftp.svg'
2019-08-06 10:52:13,009 [1347184] INFO - tellij.openapi.util.IconLoader - replace '/images/ftps.svg' with '/icons/webDeployment/ftps.svg'
2019-08-06 10:52:13,011 [1347186] INFO - tellij.openapi.util.IconLoader - replace '/images/local.svg' with '/icons/webDeployment/local.svg'
2019-08-06 10:52:13,012 [1347187] INFO - tellij.openapi.util.IconLoader - replace '/images/mounted.svg' with '/icons/webDeployment/mounted.svg'
2019-08-06 10:52:13,013 [1347188] INFO - tellij.openapi.util.IconLoader - replace '/images/sftp.svg' with '/icons/webDeployment/sftp.svg'
2019-08-06 10:52:13,015 [1347190] INFO - tellij.openapi.util.IconLoader - replace '/images/transferToolWindow.svg' with '/icons/webDeployment/transferToolWindow.svg'
2019-08-06 10:52:13,017 [1347192] INFO - tellij.openapi.util.IconLoader - replace '/images/webServerToolWindow.svg' with '/icons/webDeployment/webServerToolWindow.svg'
2019-08-06 10:52:13,018 [1347193] INFO - tellij.openapi.util.IconLoader - replace '/images/createWebProject.png' with '/icons/webDeployment/createWebProject.png'
2019-08-06 10:52:13,021 [1347196] INFO - tellij.openapi.util.IconLoader - replace '/actions/setDefault.svg' with '/icons/actions/setDefault.svg'
2019-08-06 10:52:13,024 [1347199] INFO - tellij.openapi.util.IconLoader - replace '/actions/download.svg' with '/icons/actions/download.svg'
2019-08-06 10:52:13,025 [1347200] INFO - tellij.openapi.util.IconLoader - replace '/images/downloadFrom.png' with '/icons/webDeployment/downloadFrom.png'
2019-08-06 10:52:13,028 [1347203] INFO - tellij.openapi.util.IconLoader - replace '/actions/cancel.svg' with '/icons/actions/cancel.svg'
2019-08-06 10:52:13,028 [1347203] INFO - tellij.openapi.util.IconLoader - replace '/actions/refresh.svg' with '/icons/actions/refresh.svg'
2019-08-06 10:52:13,029 [1347204] INFO - tellij.openapi.util.IconLoader - replace '/images/remoteSyncWith.png' with '/icons/webDeployment/remoteSyncWith.png'
2019-08-06 10:52:13,032 [1347207] INFO - tellij.openapi.util.IconLoader - replace '/webreferences/server.svg' with '/icons/webreferences/server.svg'
2019-08-06 10:52:13,035 [1347210] INFO - tellij.openapi.util.IconLoader - replace '/actions/upload.svg' with '/icons/actions/upload.svg'
2019-08-06 10:52:13,040 [1347215] INFO - tellij.openapi.util.IconLoader - replace '/images/uploadTo.png' with '/icons/webDeployment/uploadTo.png'
2019-08-06 10:52:13,042 [1347217] INFO - tellij.openapi.util.IconLoader - replace '/general/warningDecorator.svg' with '/icons/general/warningDecorator.svg'
2019-08-06 10:52:13,042 [1347217] INFO - tellij.openapi.util.IconLoader - replace '/images/fileTransfer.svg' with '/icons/webDeployment/fileTransfer.svg'
2019-08-06 10:52:13,048 [1347223] INFO - tellij.openapi.util.IconLoader - replace '/org/jetbrains/kotlin/idea/icons/kotlin13.png' with '/icons/plugins/kotlin/kotlin13.png'
2019-08-06 10:52:13,067 [1347242] INFO - tellij.openapi.util.IconLoader - replace '/org/jetbrains/kotlin/idea/icons/kotlin13.png' with '/icons/plugins/kotlin/kotlin13.png'
2019-08-06 10:52:14,181 [1348356] INFO - .script.IdeScriptEngineManager - javax.script.ScriptEngineManager initialized in 1216 ms
2019-08-06 10:52:33,228 [1367403] INFO - tellij.openapi.util.IconLoader - replace '/actions/help.svg' with '/icons/actions/help.svg'
2019-08-06 10:52:39,791 [1373966] INFO - tellij.openapi.util.IconLoader - replace '/actions/profileMemory.svg' with '/icons/actions/profileMemory.svg'
2019-08-06 10:52:55,721 [1389896] INFO - ide.actions.ShowFilePathAction -
Exit code 1
2019-08-06 10:54:06,572 [1460747] INFO - .FlutterAppDaemonEventListener - app shutdown took longer than 100ms
2019-08-06 10:54:06,606 [1460781] INFO - .flutter.run.daemon.FlutterApp - StopApp tremaze (Debug)
2019-08-06 10:54:08,788 [1462963] INFO - .flutter.run.daemon.FlutterApp - DebugApp tremaze (Debug)
2019-08-06 10:54:08,788 [1462963] INFO - .flutter.run.daemon.FlutterApp - C:srcflutterbinflutter.bat [--no-color, run, --machine, --track-widget-creation, --device-id=192.168.2.103:5555, --start-paused, libmain.dart]
2019-08-06 10:54:15,592 [1469767] INFO - g.FileBasedIndexProjectHandler - Reindexing refreshed files: 4 to update, calculated in 5ms
2019-08-06 10:54:15,607 [1469782] INFO - .diagnostic.PerformanceWatcher - Reindexing refreshed files took 15ms; general responsiveness: ok; EDT responsiveness: ok
2019-08-06 10:54:17,944 [1472119] INFO - ide.actions.ShowFilePathAction -
Exit code 1

I attached the end of my logfile in case you need a cleaner read.

ideaa.log

Also having this issue - it only started happening after upgrading from 1.5.x flutter to 1.7.8+hotfix.4 flutter.

  • Works from the command line every time
  • Fails consistently from IntelliJ

@ltoenjes, thanks for the log! I only see one suspicious event in there - FrequentEventDetector - Too many events posted. There's a method from a 3rd party plugin on the stack trace: com.github.izhangzhihao.rainbow.brackets.visitor.RainbowHighlightVisitor.

Do many people seeing this issue have the Rainbow Brackets plugin installed in IntelliJ? If so, does disabling or removing it address the issue?

@devoncarew I don't have the Rainbow Brackets plugin installed.

I have no Rainbow Brackets.
I'm on Linux, Android, IntelliJ 2019.2.

Created a project from console, then installed all the plugins and opened that project.
No reload on save, even after restart of IJ. Works fine in VSCode.
Ctrl + \ works fine, but after getting used to automatic reload this feels suboptimal (how easily we are spoiled by the good stuff).

I'm using right now Intelij Community version, and the hot reload seems to trigger to me just when hitting Save All, and not when a single file is saved automatically. The shortcut Ctrl + \ works fine.

This behavior is exactly the same when using Android Studio. Automatically Hot reloads just get triggered when hitting Save All or using shortcuts or the hot reload's icon.

The only editor that works fine with auto hot reload is the VS Code.

Same here. After playing around and copy–pasting different examples from official flutter docs – hot reload stops working.

MacOS (iPhone 11 Pro Max - 13.2.2)

Same experience

Android Studio 3.5.1
Build #AI-191.8026.42.35.5900203, built on September 26, 2019
JRE: 1.8.0_202-release-1483-b49-5587405 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.1

Same problem here:
ide: intelliJ 2019.3 community edition
os: mac os 10.14.6

CMD + S shortcut does not trigger hot reload
CMD + shortcut triggers hot reload

Hot reload trough UI (eg: thunder icon) works

There may be a few separate issues reported here. One may just be hot reload on save failures.

Another is that the IntelliJ version of hot reload only triggers on a manual save, not an automatically saved file.

I'm using right now Intelij Community version, and the hot reload seems to trigger to me just when hitting Save All, and not when a single file is saved automatically. The shortcut Ctrl + works fine.

This is by design, after testing a version with our research team that did reload automatically on every file change; we not just trigger on an explicit user action.

CMD + S shortcut does not trigger hot reload
CMD + shortcut triggers hot reload

That seems like an issue. Do you have anything else bound to cmd-s? I'd look in Preferences > Keymap, and verify that the 'save all' action is still bound to cmd-s.

That seems like an issue. Do you have anything else bound to cmd-s? I'd look in Preferences > Keymap, and verify that the 'save all' action is still bound to cmd-s.

After verification it is still bound to cmd-s, however, to clarify, as others here have mentioned, after closing and reopening intelliJ, I don't have any issue with cmd-s and hot reload for quite some time (still cannot figure what triggers the bug). I checked the save all binding while hot reload on save all was working, gona check when it is not working as soon as it happen.

I have this issue and it happens EVERY TIME I have to stop the app by clicking the red STOP button on the top of the Intellij screen.

I am on Windows 10 with 2019.3 Intellij (but it also happened on older versions).
Only a full restart is enough to make it work back.

My version is 1.12.13+hotfix.5 on stable channel

This issue seems to be fixed with flutter upgrade
My current version is 1.12.13+hotfix.5 on stable channel

Thanks for all the reports. I have since experienced this once myself as well, but was unable to diagnose the cause. We'll keep this issue open until we have some resolution.

My hot reload randomly stopped working. I have to run the app every time to fix this. What I tried doing is cleaning the flutter project, rebuilding, invalidating and cleaning cache in the intellij etc. This sometimes (rarely) worked but it stopped working shortly after again...

Same issue, it's been happening since my very first contact with Flutter (1.5 year ago).

29 Dec 2019
Almost Jan 1, 2020

Issue / Sequence of steps:

When there was a code error (no return from build function), Ctrl+S save option failed to render/build function - Red output on screen.
Good code reloaded.
Bad code exited the app. Just commented title for AppBar.
Run opened the app again back.
Then Ctrl+S hot reload is not working.

Resolution:

Restarting Android Studio fixed the issue.
Code fix and Run toolbar button did not fix the issue.

More info

Copy from Help > About:

Android Studio 3.5.3
Build #AI-191.8026.42.35.6010548, built on November 15, 2019
JRE: 1.8.0_202-release-1483-b03 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Side comments

Flutter + Android Studio + Code documentation is beautiful combination.
Code documentation = https://flutter.dev/docs/get-started/codelab

I also have this issue on VS Code.

Basically the Hot reload is working but it just won't automatically applied when I save the particular file like what it usually did. I really do not know what is happening here.

But one thing, every time I run my project (by pressing F5) and it launched to my Home Screen, VS Code always give me a notification about the Dart Analyzer is stopped working or something. So I just click the Restart button given.

My Flutter Doctor:

[√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.18362.10024],
    locale en-ID)
    β€’ Flutter version 1.12.13+hotfix.5 at C:\flutter
    β€’ Framework revision 27321ebbad (3 weeks ago), 2019-12-10 18:15:01 -0800
    β€’ Engine revision 2994f7e1e6
    β€’ Dart version 2.7.0


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    β€’ Android SDK at C:\Users\Richie\AppData\Local\Android\sdk
    β€’ Android NDK location not configured (optional; useful for native profiling support)
    β€’ Platform android-29, build-tools 29.0.2
    β€’ Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    β€’ Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    β€’ All Android licenses accepted.

[√] Android Studio (version 3.5)
    β€’ Android Studio at C:\Program Files\Android\Android Studio
    β€’ Flutter plugin version 42.1.1
    β€’ Dart plugin version 191.8593
    β€’ Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[!] IntelliJ IDEA Ultimate Edition (version 2019.3)
    β€’ IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.1
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    β€’ For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[√] VS Code, 64-bit edition (version 1.41.1)
    β€’ VS Code at C:\Program Files\Microsoft VS Code
    β€’ Flutter extension version 3.7.1

[√] Connected device (1 available)
    β€’ Android SDK built for x86 β€’ emulator-5554 β€’ android-x86 β€’ Android 10 (API 29) (emulator)

! Doctor found issues in 1 category.

Note: I don't usually use IntelliJ because my main Editor is VS Code and Android Studio (sometime). I use IntelliJ for Java related things.

We may have a solution for the IntelliJ issue. The VS Code one is separate, and is better tracked at https://github.com/flutter/flutter/issues/46616.

AMAZING! When we putting our hands on this fix?

This will go out with the next milestone release, at the end of the month (you can check our milestones in github).

It's a speculative fix, since I was only able to get the issue to repro once, but I have high hopes for the fix.

Try to delete your ~/.gradle folder
It's probably too big

Then first start will be very long, but after, all will be quicker and personnally I retrieved my "hot reload" button

Was this page helpful?
0 / 5 - 0 ratings