Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Material3 app compiled with dart2wasm doesn't render text in search box #143743

Closed
mkustermann opened this issue Feb 20, 2024 · 6 comments · Fixed by flutter/engine#51074
Closed
Labels
a: text input Entering text in a text field or keyboard related problems e: wasm Issues related to the wasm build of Flutter Web. found in release: 3.20 Found to occur in 3.20 has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list platform-web Web applications specifically r: fixed Issue is closed as already fixed in a newer version team-web Owned by Web platform team triaged-web Triaged by Web platform team

Comments

@mkustermann
Copy link
Member

mkustermann commented Feb 20, 2024

When building the material 3 app (from https://github.com/kevmoo/flutter_samples_fork/tree/dual_deploy) with wasm (flutter build web --wasm) the text (when starting to type) in the color search box doesn't seem to render

This is the search box:

search

@mkustermann
Copy link
Member Author

/cc @eyebrowsoffire

@huycozy huycozy added the in triage Presently being triaged by the triage team label Feb 20, 2024
@huycozy
Copy link
Member

huycozy commented Feb 20, 2024

Hi @mkustermann
I checked this issue on Flutter master channel with dual_deploy/material_3_demo (built with wasm) but I see the search view still can be rendered as following demo video:

Screen.Recording.2024-02-20.at.18.59.27.mov
flutter doctor -v (master)
[!] Flutter (Channel master, 3.20.0-10.0.pre.49, on macOS 14.1 23B74 darwin-x64, locale en-VN)
    • Flutter version 3.20.0-10.0.pre.49 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f2eea969f7 (4 hours ago), 2024-02-19 17:41:24 -0500
    • Engine revision e96c18b6c5
    • Dart version 3.4.0 (build 3.4.0-155.0.dev)
    • DevTools version 2.33.0-dev.6
    • 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 34.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A507
    • CocoaPods version 1.14.3

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

[✓] Android Studio (version 2023.1)
    • Android Studio at /Applications/Android Studio Hedgehog.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 17.0.7+0-17.0.7b1000.6-10550314)

[✓] Android Studio (version 2022.2)
    • 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
    • android-studio-dir = /Applications/Android Studio.app/
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.86.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.82.0

[✓] Connected device (4 available)
    • RMX2001 (mobile) • EUYTFEUSQSRGDA6D                         • android-arm64  • Android 11 (API 30)
    • iPhone (mobile)  • d9a94afe2b649fef56ba0bfeb052f0f2a7dae95e • ios            • iOS 15.8 19H370
    • macOS (desktop)  • macos                                    • darwin-x64     • macOS 14.1 23B74 darwin-x64
    • Chrome (web)     • chrome                                   • web-javascript • Google Chrome 121.0.6167.184

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

! Doctor found issues in 1 category.

Which Flutter version are you seeing this issue? Could you share the output of flutter doctor -v along with a demo video of the issue?

@huycozy huycozy added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 20, 2024
@mkustermann
Copy link
Member Author

I checked this issue on Flutter master channel with dual_deploy/material_3_demo (built with wasm) but I see the search view still can be rendered as following demo video:

@huycozy Did you look in chrome whether in your case it actually used the main.dart.wasm file? (e.g. serving files with dhttpd --host=0.0.0.0 --port=8888 '--headers=Cross-Origin-Embedder-Policy=credentialless;Cross-Origin-Opener-Policy=same-origin')

@mkustermann mkustermann removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 20, 2024
@kevmoo kevmoo added the e: wasm Issues related to the wasm build of Flutter Web. label Feb 20, 2024
@kevmoo
Copy link
Contributor

kevmoo commented Feb 20, 2024

I just deployed at https://flutterweb-wasm.web.app/ – with all the right headers and am seeing the issue

@huycozy
Copy link
Member

huycozy commented Feb 21, 2024

I also can reproduce the issue with those headers.

Screen.Recording.2024-02-21.at.11.42.19.mov
flutter doctor -v (master)
[!] Flutter (Channel master, 3.20.0-10.0.pre.79, on macOS 14.1 23B74 darwin-x64, locale en-VN)
    • Flutter version 3.20.0-10.0.pre.79 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 35bdc94dda (43 minutes ago), 2024-02-20 21:29:23 -0500
    • Engine revision 3557277c57
    • Dart version 3.4.0 (build 3.4.0-157.0.dev)
    • DevTools version 2.33.0-dev.6
    • 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 34.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A507
    • CocoaPods version 1.14.3

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

[✓] Android Studio (version 2023.1)
    • Android Studio at /Applications/Android Studio Hedgehog.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 17.0.7+0-17.0.7b1000.6-10550314)

[✓] Android Studio (version 2022.2)
    • 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
    • android-studio-dir = /Applications/Android Studio.app/
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.86.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.82.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 14.1 23B74 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 121.0.6167.184

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

! Doctor found issues in 1 category.

@huycozy huycozy added a: text input Entering text in a text field or keyboard related problems platform-web Web applications specifically has reproducible steps The issue has been confirmed reproducible and is ready to work on team-web Owned by Web platform team found in release: 3.20 Found to occur in 3.20 and removed in triage Presently being triaged by the triage team labels Feb 21, 2024
eyebrowsoffire added a commit to eyebrowsoffire/engine that referenced this issue Feb 28, 2024
This fixes flutter/flutter#141001
This also fixes flutter/flutter#143743

* We need to always call `setStrutEnabled(true)` on `StrutStyle`.
* `getLineMetricsAt` had reversed ternary logic.
* Ported unit tests from CanvasKit over to UI to cover Skwasm and HTML
* The HTML renderer should return 0 line metrics for an empty paragraph.
@yjbanov yjbanov added P2 Important issues not at the top of the work list triaged-web Triaged by Web platform team labels Feb 29, 2024
auto-submit bot pushed a commit to flutter/engine that referenced this issue Feb 29, 2024
This fixes flutter/flutter#141001
This also fixes flutter/flutter#143743

* We need to always call `setStrutEnabled(true)` on `StrutStyle`.
* `getLineMetricsAt` had reversed ternary logic.
* We also need to apply the rounding hack in Skwasm.
* Ported unit tests from CanvasKit over to UI to cover Skwasm ~and HTML~
* ~The HTML renderer should return 0 line metrics for an empty paragraph.~
@huycozy huycozy added the r: fixed Issue is closed as already fixed in a newer version label Mar 1, 2024
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: text input Entering text in a text field or keyboard related problems e: wasm Issues related to the wasm build of Flutter Web. found in release: 3.20 Found to occur in 3.20 has reproducible steps The issue has been confirmed reproducible and is ready to work on P2 Important issues not at the top of the work list platform-web Web applications specifically r: fixed Issue is closed as already fixed in a newer version team-web Owned by Web platform team triaged-web Triaged by Web platform team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants