-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work liste: wasmIssues related to the wasm build of Flutter Web.Issues related to the wasm build of Flutter Web.engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.has 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 specificallyteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team
Description
Steps to reproduce
- create project with code sample below and add
webto pubspec:web: ^1.1.1 - run with
flutter run -d chrome --wasm
Expected results
Decode with and without ownership transfer
Actual results
error: Bad state: DataCloneError: Failed to execute 'postMessage' on 'Worker': Value at index 0 does not have a transferable type.Had to switch to master to get details, stable just showed JavaScriptError
Code sample
Code sample
import 'dart:js_interop';
import 'dart:ui_web';
import 'package:flutter/widgets.dart';
import 'package:web/web.dart';
Future<void> main() async {
runApp(const SizedBox.expand());
final element = HTMLImageElement()
..crossOrigin = 'anonymous'
..src = 'https://picsum.photos/200/300';
await element.decode().toDart;
final image = await createImageFromTextureSource(
element,
height: element.height,
transferOwnership: true, // TODO throws on wasm
width: element.width,
);
print('${image.width}x${image.height}');
}Screenshots or Video
Logs
No response
Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 3.42.0-1.0.pre-361, on Microsoft Windows [Version 10.0.26200.7840], locale en-US)
[√] Windows Version (Windows 11 or higher, 25H2, 2009)
[√] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.13.6)
[√] Connected device (3 available)
[√] Network resources
• No issues found!Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work liste: wasmIssues related to the wasm build of Flutter Web.Issues related to the wasm build of Flutter Web.engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.has 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 specificallyteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team