question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flutter hot reload not working for 1.6.0-nullsafety.0 (iOS)

See original GitHub issue

1.6.0-nullsafety.0 seems to break hot reload.

Observed this in my project, and then confirmed that it is an issue with a clean project.

Hot reload stops working when initialize is called:

FlutterDownloader.initialize();

To replicate:

  • run any application with flutter downloader configured (null safety enabled with version 1.6.0-nullsafety.0)
  • ensure initialize is called
  • change any field or widget that will cause a visual change on screen (save file)
  • then perform a hot reload.

At which point hot reloading gets stuck, and a force quit is required.

Example CLI output:

[        ] reloaded 1 of 1852 libraries
[  +59 ms] Reassembling application
[+2008 ms] This is taking a long time; will now check for paused isolates.
[  +90 ms] Found 0 newly paused isolate(s).
[+11217 ms] Ignoring terminal input: "q" because we are busy.

This could likely be a environment issue, but I tested different Flutter versions and on a simulator and physical device.

NOTE: Did not test Android.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
rodineijfcommented, May 24, 2021

I’ve experienced the same issue. Removing the FlutterDownloader.initialize() makes the hot reload work again.

1reaction
alhafoudhcommented, May 31, 2021

Same issue in 1.6.0 and 1.6.1 version. Tested on iOS simulator and real device. Android works fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flutter Hot reloading not working in android studio(mac)
Flutter Documentation says "Hot reload loads code changes into the VM and re-builds the widget tree, preserving the app state; ...
Read more >
provider 5.0.0-nullsafety.1 | Flutter Package - Pub.dev
provider 5.0.0-nullsafety.1 icon indicating copy to clipboard operation ... Fixed a bug where hot-reload forced all lazy-loaded providers to be computed.
Read more >
Hot reload - Flutter documentation
Hot reload works by injecting updated source code files into the running Dart Virtual Machine (VM). After the VM updates classes with the...
Read more >
Flutter Hot Reload doesn't re-run code - Medium
As Ian Hickson says, it's because the code in the onPressed: property is not re-run. Even if MyHome widget is rebuilt. Since the...
Read more >
Primer Commit · 4196d234c5 - Gitea: Git with a cup of tea for ...
Flutter needs it to communicate with the running application. 4, 4, to allow setting breakpoints, to provide hot reload, etc. ... + //...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found