Skip to content

Error: "Expected a wrapped Dart object, but got a JS object or a wrapped Dart object from a separate runtime instead" during Flutter web hot reload. #54925

Open
@pedromassango

Description

@pedromassango

Getting a bunch of the lines bellow on Flutter web during Hot reload:

6586/dart-sdk/lib/_internal/js_shared/lib/js_interop_patch.dart 89:7                   JSBoxedDartObjectToObject.get$35toDart
http://localhost:56586/lib/_engine/engine/canvaskit/native_memory.dart 24:46                             <fn>
http://localhost:56586/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 574:37  _checkAndCall
http://localhost:56586/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 579:39  dcall
Error: Expected a wrapped Dart object, but got a JS object or a wrapped Dart object from a separate runtime instead.
http://localhost:56586/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 294:3       throw_
http://localhost:56586/dart-sdk/lib/_internal/js_shared/lib/js_interop_patch.dart 89:7                   JSBoxedDartObjectToObject.get$35toDart
http://localhost:56586/lib/_engine/engine/canvaskit/native_memory.dart 24:46                             <fn>
http://localhost:56586/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 574:37  _checkAndCall
http://localhost:56586/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 579:39  dcall
Error: Expected a wrapped Dart object, but got a JS object or a wrapped Dart object from a separate runtime instead.
http://localhost:56586/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 294:3       throw_
http://localhost:56586/dart-sdk/lib/_internal/js_shared/lib/js_interop_patch.dart 89:7                   JSBoxedDartObjectToObject.get$35toDart
http://localhost:56586/lib/_engine/engine/canvaskit/native_memory.dart 24:46                             <fn>
http://localhost:56586/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 574:37  _checkAndCall
http://localhost:56586/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 579:39  dcall
Error: Expected a wrapped Dart object, but got a JS object or a wrapped Dart object from a separate runtime instead.
http://localhost:56586/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 294:3       throw_
http://localhost:56586/dart-sdk/lib/_internal/js_shared/lib/js_interop_patch.dart 89:7                   JSBoxedDartObjectToObject.get$35toDart
http://localhost:56586/lib/_engine/engine/canvaskit/native_memory.dart 24:46                             <fn>
http://localhost:56586/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 574:37  _checkAndCall
http://localhost:56586/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 579:39  dcall

  • Dart version and tooling diagnostic info (dart info)

    • Dart SDK version: 3.2.4 (stable) (Thu Dec 21 19:13:53 2023 +0000) on "macos_arm64"
  • Whether you are using Windows, macOS, or Linux (if applicable)

    • Mac
  • Whether you are using Chrome, Safari, Firefox, Edge (if applicable)

    • Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dev-compiler

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions