Repository: flutter
Issue: WASM + Edge: TypeError: type incompatibility when transforming from/to JS
Labels: platform-windows,platform-web,assigned for triage,browser: edge,e: wasm,team-web

### Steps to reproduce

1. Run the [Superlist app](https://app.superlist.com) with Microsoft Edge version 131 + Windows 10

### Expected results

Flutter app runs for all users

### Actual results

Flutter app does not run for some users and throws an error relating to `boxed_double.dart` & `alignment.dart`. Thus far, we see users with this profile:

```
Browser: microsoft edge
Browser version: 131.0.0.0
Os: Windows 10
```

### Code sample

I do not have a minimal code sample and I cannot reproduce this error myself. 

I have built a special version of our app with WASM that does not strip symbols and disables all optimizations. The logs below contain the error seen by some users. In my view, the relevant parts come from the `boxed_double.dart` through to the `alignment.dart` files.

### Logs

Errors in console below:

```
main.dart.mjs:72 JavaScriptError
main.dart.mjs:72 at module0._invokeCallback (https://deploy-preview-5924--dev-web-superlist.netlify.app/main.dart.wasm:wasm-function[1631]:0x614df5)
at https://deploy-preview-5924--dev-web-superlist.netlify.app/main.dart.mjs:986:49
boxed_double.dart:233 Uncaught Exception {}
$Error._throw @ boxed_double.dart:233
$Error._throwWithCurrentStackTrace @ box.dart:493
$_invokeCallback @ main.dart.wasm:0x614e17
(anonymous) @ main.dart.mjs:986
alignment.dart:106 Uncaught (in promise) TypeError: type incompatibility when transforming from/to JS
at module0._319 (alignment.dart:106:40)
at module0._319 (alignment.dart:523:91)
at Object.initializeEngine (main.dart.mjs:149:80)
at v.onEntrypointLoaded [as _onEntrypointLoaded] ((index):370:55)
at v.didCreateEngineInitializer (flutter.js:1:1679)
at _1516 (main.dart.mjs:463:28)
at module0.FlutterLoaderExtension|didCreateEngineInitializer (main.dart.wasm:0x117d91f)
at module0.bootstrapEngine inner (main.dart.wasm:0x1171317)
at module0.bootstrapEngine (main.dart.wasm:0x11710c8)
at module0.main inner (text_modifier_group.dart:312:64)
$_319 @ alignment.dart:106
$_319 @ alignment.dart:523
(anonymous) @ main.dart.mjs:149
onEntrypointLoaded @ (index):370
didCreateEngineInitializer @ flutter.js:1
_1516 @ main.dart.mjs:463
$FlutterLoaderExtension|didCreateEngineInitializer @ main.dart.wasm:0x117d91f
$bootstrapEngine inner @ main.dart.wasm:0x1171317
$bootstrapEngine @ main.dart.wasm:0x11710c8
$main inner @ text_modifier_group.dart:312
$main @ weak_patch.dart:151
$main tear-off trampoline @ main.dart.wasm:0x666917
$_invokeMain @ super_button_style.dart:265
invokeMain @ main.dart.mjs:1686
_loadWasmEntrypoint @ flutter.js:1
await in _loadWasmEntrypoint
```

### Flutter Doctor output

```
[!] Flutter (Channel master, 3.27.0-1.0.pre.554, on macOS 15.2 24C101 darwin-arm64, locale en-US)
    • Flutter version 3.27.0-1.0.pre.554 on channel master at /Users/brian/superlist/superlist/.flutter
    ! Unknown upstream repository.
      Reinstall Flutter by following instructions at https://flutter.dev/setup.
    • Framework revision 966aeb28ea (4 weeks ago), 2024-11-19 04:17:26 -0500
    • Engine revision b6723e33b8
    • Dart version 3.7.0 (build 3.7.0-160.0.dev)
    • DevTools version 2.41.0-dev.2
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/brian/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • ANDROID_HOME = /Users/brian/Library/Android/sdk
    • Java binary at: /usr/bin/java
    ✗ Could not determine java version

[!] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    ! CocoaPods 1.16.1 out of date (1.16.2 is recommended).
        CocoaPods is a package manager for iOS or macOS platform code.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/to/platform-plugins
      To update CocoaPods, see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/to/macos-android-setup for detailed instructions).

[✓] IntelliJ IDEA Ultimate Edition (version 2024.3.1)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 83.0.4
    • Dart plugin version 243.23177

[✓] VS Code (version 1.95.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.100.0

[✓] Connected device (5 available)
    • Briphone (mobile)               • 00008120-000A20980233401E            • ios            • iOS 18.2 22C152
    • iPhone 16 (mobile)              • 2D28A576-2687-46EE-9F84-CA935E5AAAF0 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-18-0 (simulator)
    • macOS (desktop)                 • macos                                • darwin-arm64   • macOS 15.2 24C101 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 15.2 24C101 darwin-arm64
    • Chrome (web)                    • chrome                               • web-javascript • Google Chrome 131.0.6778.140
    ! Error: Browsing on the local area network for Brian’s iPad. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 4 categories.
```