-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
c: crashStack traces logged to the consoleStack traces logged to the consolec: regressionIt was better in the past than it is nowIt was better in the past than it is nowfound in release: 3.36Found to occur in 3.36Found to occur in 3.36has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versiont: hot reloadReloading code during "flutter run"Reloading code during "flutter run"team-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
Command
flutter run -d web-server --web-hostname=0.0.0.0 --web-port=8080or
flutter run -d web-serverSteps to Reproduce
- open the url
- do hot reload
- close the browser
- do hot reload (and you will see the "bad state" issue). Hot reload will crash after a while, and hot restart will instantly crash.
Logs
StateError: Bad state: No element
#0 List.first (dart:core-patch/growable_array.dart:352:5)
#1 ResidentWebRunner.restart (package:flutter_tools/src/isolated/resident_web_runner.dart:512:26)
<asynchronous suspension>
#2 TerminalHandler._commonTerminalInputHandler (package:flutter_tools/src/resident_runner.dart:1752:40)
<asynchronous suspension>
#3 TerminalHandler.processTerminalInput (package:flutter_tools/src/resident_runner.dart:1807:7)
<asynchronous suspension>�[32m[✓]�[39m Flutter (Channel master, 3.36.0-1.0.pre-360, on macOS 15.0 24A335 darwin-arm64, locale en-US) [1,532ms]
�[32m•�[39m Flutter version 3.36.0-1.0.pre-360 on channel master at /Users/robertbrunhage/tools/flutter
�[32m•�[39m Upstream repository [email protected]:flutter/flutter.git
�[32m•�[39m Framework revision 4681df5b6f (2 days ago), 2025-08-30 03:23:28 -0400
�[32m•�[39m Engine revision 4681df5b6f
�[32m•�[39m Dart version 3.10.0 (build 3.10.0-157.0.dev)
�[32m•�[39m DevTools version 2.50.0
�[32m•�[39m Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android,
enable-ios, cli-animations, enable-native-assets, omit-legacy-version-file, enable-lldb-debugging
�[33m[!]�[39m Android toolchain - develop for Android devices (Android SDK version 34.0.0) [1,143ms]
�[32m•�[39m Android SDK at /Users/robertbrunhage/Library/Android/Sdk
�[32m•�[39m Emulator version 32.1.15.0 (build_id 10696886) (CL:N/A)
�[31m✗�[39m Flutter requires Android SDK 36 and the Android BuildTools 28.0.3
To update the Android SDK visit https://flutter.dev/to/macos-android-setup for detailed instructions.
�[33m!�[39m Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
�[32m[✓]�[39m Xcode - develop for iOS and macOS (Xcode 16.0) [757ms]
�[32m•�[39m Xcode at /Applications/Xcode.app/Contents/Developer
�[32m•�[39m Build 16A242d
�[32m•�[39m CocoaPods version 1.16.2
�[32m[✓]�[39m Chrome - develop for the web [3ms]
�[32m•�[39m Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
�[32m[✓]�[39m Connected device (4 available) [6.1s]
�[32m•�[39m Robert’s iPhone (wireless) (mobile) • 00008130-001A0308247A8D3A • ios • iOS 18.6.2 22G100
�[32m•�[39m macOS (desktop) • macos • darwin-arm64 • macOS 15.0 24A335 darwin-arm64
�[32m•�[39m Web Server (web) • web-server • web-javascript • Flutter Tools
�[32m•�[39m Chrome (web) • chrome • web-javascript • Google Chrome 139.0.7258.155
�[33m!�[39m Error: Browsing on the local area network for Robert’s Apple Watch. Ensure the device is unlocked and discoverable via
Bluetooth. (code -27)
�[32m[✓]�[39m Network resources [634ms]
�[32m•�[39m All expected network resources are available.
�[33m!�[39m Doctor found issues in 1 category.
Flutter Application Metadata
Type: app
Version: 1.0.0+1
Material: true
Android X: false
Module: false
Plugin: false
Android package: null
iOS bundle identifier: null
Creation channel: master
Creation framework version: a682cf2
Additional logs
Full console logs of me doing some spamming reload first without the browser opened and then with it opened and then closed.
~/personal/projects/testing_hot_restart flutter run -d web-server --web-hostname=0.0.0.0 --web-port=8080
Launching lib/main.dart on Web Server in debug mode...
Waiting for connection from debug service on Web Server... 8.6s
lib/main.dart is being served at http://0.0.0.0:8080
The web-server device requires the Dart Debug Chrome extension for debugging. Consider using the Chrome or Edge devices for an
improved development workflow.
Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
Performing hot reload... 30ms
Recompile complete. No client connected..
Performing hot reload... 15ms
Recompile complete. No client connected..
Performing hot reload... 21ms
Recompile complete. No client connected..
Performing hot reload... 22ms
Recompile complete. No client connected..
Performing hot reload... 21ms
Recompile complete. No client connected..
Performing hot reload... 22ms
Recompile complete. No client connected..
Performing hot reload... 22ms
Recompile complete. No client connected..
Performing hot reload... 22ms
Recompile complete. No client connected..
Performing hot reload... 22ms
Recompile complete. No client connected..
Performing hot reload... 21ms
Recompile complete. No client connected..
Performing hot reload... 22ms
Recompile complete. No client connected..
Performing hot reload... 21ms
Recompile complete. No client connected..
Performing hot reload... 21ms
Recompile complete. No client connected..
Performing hot reload... 20ms
Recompile complete. No client connected..
Performing hot reload... 10ms
Recompile complete. No client connected..
Performing hot reload... 21ms
Recompile complete. No client connected..
Performing hot reload... 21ms
Recompile complete. No client connected..
Performing hot reload... 21ms
Recompile complete. No client connected..
Performing hot reload... 18ms
Recompile complete. No client connected..
Performing hot reload... 21ms
Recompile complete. No client connected..
Performing hot reload... 21ms
Recompile complete. No client connected..
Performing hot reload... 20ms
Recompile complete. No client connected..
Performing hot reload... 20ms
Recompile complete. No client connected..
Performing hot reload... 13ms
Recompile complete. No client connected..
Performing hot reload... 19ms
Recompile complete. No client connected..
Performing hot reload... 20ms
Recompile complete. No client connected..
Performing hot reload... 18ms
Recompile complete. No client connected..
Performing hot reload... 21ms
Recompile complete. No client connected..
Performing hot reload... 21ms
Recompile complete. No client connected..
Performing hot reload... 20ms
Recompile complete. No client connected..
Performing hot reload... 21ms
Recompile complete. No client connected..
Performing hot reload... 20ms
Recompile complete. No client connected..
Performing hot reload... 19ms
Recompile complete. No client connected..
Performing hot reload... 22ms
Recompile complete. No client connected..
Performing hot reload... 22ms
Recompile complete. No client connected..
Debug service listening on ws://127.0.0.1:44456/VA7TVvzHMO0=
A Dart VM Service on Web Server is available at: http://127.0.0.1:44456/VA7TVvzHMO0=
The Flutter DevTools debugger and profiler on Web Server is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:44456/VA7TVvzHMO0=
Performing hot reload... 152ms
Reloaded application in 152ms.
Performing hot reload... 98ms
Reloaded application in 98ms.
Performing hot reload... 98ms
Reloaded application in 98ms.
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 28ms
Try again after fixing the above error(s).
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 30ms
Try again after fixing the above error(s).
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 33ms
Try again after fixing the above error(s).
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 27ms
Try again after fixing the above error(s).
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 27ms
Try again after fixing the above error(s).
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 25ms
Try again after fixing the above error(s).
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 25ms
Try again after fixing the above error(s).
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 25ms
Try again after fixing the above error(s).
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 26ms
Try again after fixing the above error(s).
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 25ms
Try again after fixing the above error(s).
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 26ms
Try again after fixing the above error(s).
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 24ms
Try again after fixing the above error(s).
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 24ms
Try again after fixing the above error(s).
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 24ms
Try again after fixing the above error(s).
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 24ms
Try again after fixing the above error(s).
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 24ms
Try again after fixing the above error(s).
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 23ms
Try again after fixing the above error(s).
WebSocketProxyService: Hot reload failed: Bad state: No clients available for hot reload
Hot reload failed:
Bad state: No clients available for hot reload.
Try performing a hot restart instead.
Performing hot reload... 24ms
Try again after fixing the above error(s).
Performing hot reload... 22ms
Bad state: No element
#0 List.first (dart:core-patch/growable_array.dart:352:5)
#1 ResidentWebRunner.restart (package:flutter_tools/src/isolated/resident_web_runner.dart:512:26)
<asynchronous suspension>
#2 TerminalHandler._commonTerminalInputHandler (package:flutter_tools/src/resident_runner.dart:1752:40)
<asynchronous suspension>
#3 TerminalHandler.processTerminalInput (package:flutter_tools/src/resident_runner.dart:1807:7)
<asynchronous suspension>
Oops; flutter has exited unexpectedly: "Bad state: No element"RobertBrunhage, tadaspetra, rishad13 and HarithHaroon
Metadata
Metadata
Assignees
Labels
c: crashStack traces logged to the consoleStack traces logged to the consolec: regressionIt was better in the past than it is nowIt was better in the past than it is nowfound in release: 3.36Found to occur in 3.36Found to occur in 3.36has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versiont: hot reloadReloading code during "flutter run"Reloading code during "flutter run"team-webOwned by Web platform teamOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.