Repository navigation
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: widget previewsIssues related to the Widget Previewer toolingIssues related to the Widget Previewer toolingteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Description
Steps to reproduce
- Given a project that has a widget preview function defined
flutter widget-preview startin the terminal- Wait for the browser to open the preview.
- At some point after a few hot reloads, hot reload seems to get stuck? (it does not complete after a few seconds, which it did in earlier reloads)
- Terminate the batch job in the terminal
flutter widget-preview startin the terminal- "Null check operator used on a null value" appears
- A bit later, the process prints a stack trace like below
Expected results
The widget preview hot reloads properly, or at least does not crash after terminating and restarting the process a second time.
Actual results
The preview process eventually crashes with
Unhandled exception:
Null check operator used on a null value
#0 FrontendCompiler.compileExpressionToJs (package:frontend_server/frontend_server.dart:1423)
#1 processJsonInput (package:frontend_server/frontend_server.dart:2092)
#2 listenAndCompile.<anonymous closure> (package:frontend_server/frontend_server.dart:1975)
#3 _RootZone.runUnaryGuarded (dart:async/zone.dart:963)
#4 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381)
#5 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:312)
#6 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:67)
#7 _EventSinkWrapper.add (dart:async/stream_transformers.dart:13)
#8 _StringAdapterSink.add (dart:convert/string_conversion.dart:231)
#9 _LineSplitterSink._addLines (dart:convert/line_splitter.dart:164)
#10 _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:131)
#11 StringConversionSink.add (dart:convert/string_conversion.dart:40)
#12 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:115)
#13 _RootZone.runUnaryGuarded (dart:async/zone.dart:963)
#14 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381)
#15 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:312)
#16 _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:67)
#17 _EventSinkWrapper.add (dart:async/stream_transformers.dart:13)
#18 _StringAdapterSink.add (dart:convert/string_conversion.dart:231)
#19 _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:236)
#20 _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:316)
#21 _Utf8ConversionSink.add (dart:convert/string_conversion.dart:309)
#22 _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:70)
#23 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:115)
#24 _RootZone.runUnaryGuarded (dart:async/zone.dart:963)
#25 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381)
#26 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:312)
#27 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:798)
#28 _StreamController._add (dart:async/stream_controller.dart:663)
#29 _StreamController.add (dart:async/stream_controller.dart:618)
#30 _Socket._onData (dart:io-patch/socket_patch.dart:2906)
#31 _RootZone.runUnaryGuarded (dart:async/zone.dart:963)
#32 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381)
#33 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:312)
#34 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:798)
#35 _StreamController._add (dart:async/stream_controller.dart:663)
#36 _StreamController.add (dart:async/stream_controller.dart:618)
#37 new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:2344)
#38 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1679)
#39 _microtaskLoop (dart:async/schedule_microtask.dart:40)
#40 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)
#41 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:127)
#42 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:193)
The Dart compiler exited unexpectedly.
ChromeProxyService: Failed to evaluate expression 'true': InternalError: frontend server failed to compile '() { return true; }'.
Failed to evaluate expression 'true': InternalError: frontend server failed to compile '() { return true; }'.
Code sample
Code sample
[Paste your code here]Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Flutter Doctor output
Doctor output
[√] Flutter (Channel stable, 3.47.2, on Microsoft Windows [Version 10.0.26200.9168], locale nl-BE) [247ms]
• Flutter version 3.47.2 on channel stable at C:\Users\brack\Documents\flutter
• Upstream repository [email protected]:navaronbracke/flutter.git
• FLUTTER_GIT_URL = [email protected]:navaronbracke/flutter.git
• Framework revision d3b14c8769 (6 days ago), 2026-08-26 16:07:51 -0700
• Engine revision a804b26164
• Dart version 3.13.2
• DevTools version 2.60.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-record-use, enable-swift-package-manager,
omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration
[√] Windows Version (11 Home 64-bit, 25H2, 2009) [729ms]
[X] Android toolchain - develop for Android devices [107ms]
X Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/to/windows-android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe) [96ms]
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[√] Visual Studio - develop Windows apps (Visual Studio Community 2026 18.5.0) [95ms]
• Visual Studio at C:\Program Files\Microsoft Visual Studio\18\Community
• Visual Studio Community 2026 version 18.5.11709.299
• Windows 10 SDK version 10.0.26100.0
[√] Connected device (2 available) [49ms]
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.26200.9168]
• Edge (web) • edge • web-javascript • Microsoft Edge 152.0.4191.53
[√] Network resources [504ms]
• All expected network resources are available.
! Doctor found issues in 2 categories.Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: widget previewsIssues related to the Widget Previewer toolingIssues related to the Widget Previewer toolingteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Activity
puneetkukreja98 commentedon Sep 2, 2026
@navaronbracke Thanks for reporting this, routing this to team-tool for further investigation.
[flutter_tools] serialize and gate widget preview hot reloads (flutte…
github-actions commentedon Oct 17, 2026
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.[flutter_tools] serialize and gate widget preview hot reloads (flutte…