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.

"The method 'update' was called on null" during hot reload

See original GitHub issue

Whenever I make a change to any flutter projects in VS Code, the hot reload feature will fail returning the message below. It also causes the app to load a white screen on the device whenever I try to start debugging.

NoSuchMethodError: The method 'update' was called on null.
Receiver: null
Tried calling: update(bundle: Instance of '_ManifestAssetBundle', bundleDirty: false, bundleFirstUpload: true, dillOutputPath: null, fileFilter: Instance of '_CompactLinkedHashSet<String>', firstBuildTime: Instance of 'DateTime', fullRestart: false, generator: Instance of 'ResidentCompiler', mainPath: "C:\\Workspace\\flutter_test_app\\lib\\main.dart", pathToReload: "C:\\Workspace\\flutter_test_app\\lib\\main.dart.incremental.dill", projectRootPath: "C:\\Workspace\\flutter_test_app", target: "lib\\main.dart")

Here is a printout of the flutter doctor -v command:

[√] Flutter (Channel beta, v0.9.4, on Microsoft Windows [Version 6.3.9600], locale en-US)
    • Flutter version 0.9.4 at C:\Development\flutter
    • Framework revision f37c235c32 (4 weeks ago), 2018-09-25 17:45:40 -0400
    • Engine revision 74625aed32
    • Dart version 2.1.0-dev.5.0.flutter-a2eb050044

[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at C:\Users\*********\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[√] Android Studio (version 3.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 29.1.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[√] IntelliJ IDEA Ultimate Edition (version 2018.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2018.1.3
    • Flutter plugin version 28.0.2
    • Dart plugin version 181.4892.1

[√] VS Code, 64-bit edition (version 1.28.2)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 2.19.0

[!] Connected devices
    • Device ZY223GWFRR is offline.

! Doctor found issues in 1 category.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (10 by maintainers)

github_iconTop GitHub Comments

6reactions
mrgooniecommented, Mar 11, 2019

Same issue here, Hot Reload doesn’t work on VS Code anymore 😢

3reactions
DanTupcommented, Mar 11, 2019

I’ve changed the title on this issue to avoid confusion. The issue reported here is different to the current issue of Hot Reload not working in VS Code 1.32. That issue is covered here:

https://github.com/Dart-Code/Dart-Code/issues/1518

This was a regression VS Code 1.32 (https://github.com/Microsoft/vscode/issues/69534) which has since been fixed but not released. I’ve verified the fix works building VS Code from source, and it should go into an Insiders build today. It’s tagged as important and for a recovery build so I’m hoping there will be a new VS Code release this week to fix it.

In the meantime, you should downgrade to VS Code 1.31 using the download links at the top of the 1.31 release notes page or wait for today’s Insiders build (due soon?) if you don’t mind using that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flutter - The method '|' was called on null. After hot reload it is ...
Short term solution: make sure there is null check, display indicator while waiting for the data. body: Center( child: (cities == null) ...
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 >
Hot reload?! | Decoding Flutter - YouTube
Learn more about Hot Reload → https://goo.gle/3rVvMiz Leave us suggestions for code to unravel in the comments below!
Read more >
Flutter Provider showing results ONLY after Hot Reload-Flutter
In getProductsByCategory in your ProductsService you are not awaiting getDocuments . So while the documents will get loaded it already calls notifyListeners ...
Read more >
Null Safety Support For Flutter & Dart | by Shaiq khan
Dart serves an extraordinary part in Flutter, fueling developer highlights, for example, hot reload, and empowering multi-stage applications ...
Read more >

github_iconTop Related Medium Post

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