Skip to content

Infinite error throw on experimental web hot reload. #169613

Open
@dnzzcn

Description

@dnzzcn

Steps to reproduce

We have been using the experimental hot reload for web ever since it was first released (around 2 months ago?). It has this bug from the very beginning: Starting with the second hot restart (not hot reload), the app prints this error message indefinitely with high frequency:

DartError: TypeError: Instance of 'LegacyJavaScriptObject': type 'LegacyJavaScriptObject' is not a subtype of type 'DiagnosticsNode'
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 274:3       throw_
dart-sdk/lib/_internal/js_shared/lib/rti.dart 1478:3                              _generalAsCheckImplementation
dart-sdk/lib/_internal/js_dev_runtime/private/js_array.dart 92:14                 add]
package:flutter/src/widgets/widget_inspector.dart 4122:15                         debugTransformDebugCreator
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 118:77  tear
package:flutter/src/foundation/assertions.dart 1311:31                            get builder
package:flutter/src/foundation/diagnostics.dart 2940:45                           get emptyBodyDescription
package:flutter/src/foundation/diagnostics.dart 1652:13                           <fn>
package:flutter/src/foundation/diagnostics.dart 1645:33                           <fn>
package:flutter/src/foundation/diagnostics.dart 1669:14                           toJsonMap
package:flutter/src/widgets/widget_inspector.dart 1774:20                         [_nodeToJson]
package:flutter/src/widgets/widget_inspector.dart 1010:9                          [_reportStructuredError]
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 118:77  tear
package:flutter/src/foundation/assertions.dart 1204:14                            reportError
package:flutter/src/scheduler/binding.dart 1440:20                                [_invokeFrameCallback]
package:flutter/src/scheduler/binding.dart 1351:9                                 handleDrawFrame
package:flutter/src/scheduler/binding.dart 1204:5                                 [_handleDrawFrame]
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 118:77  tear
lib/_engine/engine/platform_dispatcher.dart 1312:5                                invoke
lib/_engine/engine/platform_dispatcher.dart 255:5                                 invokeOnDrawFrame
lib/_engine/engine/frame_service.dart 189:32                                      [_renderFrame]
lib/_engine/engine/frame_service.dart 101:9                                       <fn>
dart-sdk/lib/async/zone.dart 1849:54                                              runUnary
dart-sdk/lib/async/zone.dart 1804:26                                              <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/js_allow_interop_patch.dart 224:27    _callDartFunctionFast1

It never stops until the page is refreshed from the browser, or the app is stopped and rerun again.

Expected results

We expect to not have it really, there's not much to tell.

Actual results

Irrespective of the app content, context or state, the error code is printed to the console indefinitely starting with the second hot restart.

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
flutter doctor -v
[✓] Flutter (Channel main, 3.33.0-1.0.pre.246, on macOS 15.3.2 24D81 darwin-arm64, locale en-TR) [3.2s]
    • Flutter version 3.33.0-1.0.pre.246 on channel main at /Users/****/Developer/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision e8366e3334 (4 hours ago), 2025-05-28 23:59:20 +0800
    • Engine revision e8366e3334
    • Dart version 3.9.0 (build 3.9.0-172.0.dev)
    • DevTools version 2.46.0

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [2.2s]
    • Android SDK at /Users/****/Library/Android/sdk
    • Emulator version 32.1.14.0 (build_id 10330179) (CL:N/A)
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.6+-13368085-b895.109)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.3) [1,617ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16E140
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [12ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.3) [11ms]
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.6+-13368085-b895.109)

[✓] VS Code (version 1.100.2) [10ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.110.0

[✓] Connected device (2 available) [6.6s]
    • macOS (desktop) • macos  • darwin-arm64   • macOS 15.3.2 24D81 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 136.0.7103.114

[✓] Network resources [919ms]
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    in triagePresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions