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

[android][platform_views] Views are not properly updated on Android Q #98722

Closed
0xZOne opened this issue Feb 18, 2022 · 11 comments · Fixed by flutter/engine#31698
Closed

[android][platform_views] Views are not properly updated on Android Q #98722

0xZOne opened this issue Feb 18, 2022 · 11 comments · Fixed by flutter/engine#31698
Assignees
Labels
a: platform-views Embedding Android/iOS views in Flutter apps c: regression It was better in the past than it is now e: OS-version specific Affects only some versions of the relevant operating system engine flutter/engine repository. See also e: labels. found in release: 2.11 Found to occur in 2.11 has reproducible steps The issue has been confirmed reproducible and is ready to work on P0 Critical issues such as a build break or regression platform-android Android applications specifically r: fixed Issue is closed as already fixed in a newer version waiting for PR to land (fixed) A fix is in flight

Comments

@0xZOne
Copy link
Member

0xZOne commented Feb 18, 2022

petal_20220218_114144.mp4

Steps to Reproduce

  1. Get the demo as below:
git clone -b task/boost3.0_for_2.8.x https://github.com/0xZOne/flutter_boost.git
  1. Enter the example directory and execute flutter run.

  2. Follow the video steps.

Related PR: flutter/engine#31198

flutter doctor -v
[✓] Flutter (Channel master, 2.11.0-0.0.pre.611, on macOS 12.0.1 21A559 darwin-x64, locale zh-Hans-CN)
    • Flutter version 2.11.0-0.0.pre.611 at /Users/zero/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 0fa8d3a132 (86 minutes ago), 2022-02-17 21:29:16 -0500
    • Engine revision c5e89cbb73
    • Dart version 2.17.0 (build 2.17.0-117.0.dev)
    • DevTools version 2.10.0

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/zero/Library/Android/sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • ANDROID_HOME = /Users/zero/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/zero/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 12.5.1)
    • Xcode at /Applications/Xcode12.5.app/Contents/Developer
    ! Flutter recommends a minimum Xcode version of 13.
      Download the latest version or update via the Mac App Store.
    • CocoaPods version 1.10.1

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

[✓] Android Studio (version 2021.1)
    • 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 11.0.11+0-b60-7590822)

[✓] VS Code (version 1.64.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (2 available)
    • NOH AN00 (mobile) • PQY5T20A14002065 • android-arm64  • Android 10 (API 29)
    • Chrome (web)      • chrome           • web-javascript • Google Chrome 98.0.4758.102

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.
@danagbemava-nc danagbemava-nc added the in triage Presently being triaged by the triage team label Feb 18, 2022
@danagbemava-nc
Copy link
Member

This appears to be a regression in master on android 10 as it works just fine on stable, according to my tests.

Steps to reproduce

  • Clone the sample using the command in the initial post
  • cd into the example directory and execute flutter run on android
  • Select open flutter page
  • Select Platform View Perf Test
  • Scroll through the list
videos
stable 2.10.1 (android 10) master (android 10) master (android 12)
Screen.Recording.2022-02-18.at.08.49.30.mov
Screen.Recording.2022-02-18.at.08.45.29.mov
Screen.Recording.2022-02-18.at.08.42.09.mov
flutter doctor -v
[✓] Flutter (Channel stable, 2.10.1, on macOS 12.2 21D49 darwin-arm, locale en-GB)
    • Flutter version 2.10.1 at /Users/nexus/dev/sdks/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision db747aa133 (9 days ago), 2022-02-09 13:57:35 -0600
    • Engine revision ab46186b24
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

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

[✓] Android Studio (version 2021.1)
    • 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 11.0.11+0-b60-7772763)

[☠] IntelliJ IDEA Community Edition (the doctor check crashed)
    ✗ Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know about this issue at https://github.com/flutter/flutter/issues.
    ✗ FormatException: Unexpected extension byte (at offset 5)
    • #0      _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1789:7)
      #1      Utf8Decoder.convert (dart:convert/utf.dart:351:42)
      #2      InputStream.readString (package:archive/src/util/input_stream.dart:207:30)
      #3      new ZipDirectory.read (package:archive/src/zip/zip_directory.dart:40:30)
      #4      ZipDecoder.decodeBuffer (package:archive/src/zip_decoder.dart:19:30)
      #5      ZipDecoder.decodeBytes (package:archive/src/zip_decoder.dart:14:12)
      #6      IntelliJPlugins._findPluginXml (package:flutter_tools/src/intellij/intellij.dart:130:44)
      #7      IntelliJPlugins._readPackageVersion (package:flutter_tools/src/intellij/intellij.dart:141:40)
      #8      IntelliJPlugins.validatePackage (package:flutter_tools/src/intellij/intellij.dart:63:35)
      #9      IntelliJValidator.validate (package:flutter_tools/src/intellij/intellij_validator.dart:103:15)
      #10     asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:111:32)
      #11     asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:109:18)
      #12     _rootRun (dart:async/zone.dart:1426:13)
      #13     _CustomZone.run (dart:async/zone.dart:1328:19)
      #14     _runZoned (dart:async/zone.dart:1861:10)
      #15     runZonedGuarded (dart:async/zone.dart:1849:12)
      #16     runZoned (dart:async/zone.dart:1780:12)
      #17     asyncGuard (package:flutter_tools/src/base/async_guard.dart:109:3)
      #18     Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:205:9)
      #19     Doctor.diagnose (package:flutter_tools/src/doctor.dart:309:47)
      #20     DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:50:48)
      #21     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1320:12)
      <asynchronous suspension>
      #22     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1161:27)
      <asynchronous suspension>
      #23     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
      <asynchronous suspension>
      #24     CommandRunner.runCommand (package:args/command_runner.dart:209:13)
      <asynchronous suspension>
      #25     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
      <asynchronous suspension>
      #26     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
      <asynchronous suspension>
      #27     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
      <asynchronous suspension>
      #28     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
      <asynchronous suspension>
      #29     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
      <asynchronous suspension>
      #30     main (package:flutter_tools/executable.dart:94:3)
      <asynchronous suspension>


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

[✓] Connected device (4 available)
    • Android SDK built for arm64 (mobile) • emulator-5554             • android-arm64  • Android 10 (API 29) (emulator)
    • Nexus (mobile)                       • 00008020-001875E83A38002E • ios            • iOS 15.3 19D50
    • macOS (desktop)                      • macos                     • darwin-arm64   • macOS 12.2 21D49 darwin-arm
    • Chrome (web)                         • chrome                    • web-javascript • Google Chrome 98.0.4758.102

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.
[✓] Flutter (Channel master, 2.11.0-0.0.pre.612, on macOS 12.2 21D49 darwin-arm, locale en-GB)
    • Flutter version 2.11.0-0.0.pre.612 at /Users/nexus/dev/sdks/flutters
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision c50b02f2c3 (6 hours ago), 2022-02-17 22:44:23 -0500
    • Engine revision 605454e201
    • Dart version 2.17.0 (build 2.17.0-118.0.dev)
    • DevTools version 2.10.0

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

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

[✓] Android Studio (version 2021.1)
    • 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 11.0.11+0-b60-7772763)

[✓] IntelliJ IDEA Community Edition (version 2021.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin version 213.5744.122

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

[✓] Connected device (4 available)
    • Android SDK built for arm64 (mobile) • emulator-5554             • android-arm64  • Android 10 (API 29) (emulator)
    • Nexus (mobile)                       • 00008020-001875E83A38002E • ios            • iOS 15.3 19D50
    • macOS (desktop)                      • macos                     • darwin-arm64   • macOS 12.2 21D49 darwin-arm
    • Chrome (web)                         • chrome                    • web-javascript • Google Chrome 98.0.4758.102

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

@danagbemava-nc danagbemava-nc added a: platform-views Embedding Android/iOS views in Flutter apps e: OS-version specific Affects only some versions of the relevant operating system engine flutter/engine repository. See also e: labels. found in release: 2.11 Found to occur in 2.11 has reproducible steps The issue has been confirmed reproducible and is ready to work on platform-android Android applications specifically c: regression It was better in the past than it is now and removed in triage Presently being triaged by the triage team labels Feb 18, 2022
@danagbemava-nc danagbemava-nc changed the title [platform_view] The platform view is not updated in Android Q [android][platform_views] Views are not properly updated in Android Q Feb 18, 2022
@danagbemava-nc danagbemava-nc changed the title [android][platform_views] Views are not properly updated in Android Q [android][platform_views] Views are not properly updated on Android Q Feb 18, 2022
@chinmaygarde
Copy link
Member

cc @blasten for a regression related to flutter/engine#31198.

@blasten
Copy link

blasten commented Feb 23, 2022

I'm able to repro this issue on an Android emulator, but unable on a physical device (Pixel 4) running Android 10.

@0xZOne
Copy link
Member Author

0xZOne commented Feb 23, 2022

I'm able to repro this issue on an Android emulator, but unable on a physical device (Pixel 4) running Android 10.

I've reproduced the issue on a Google Pixel2 physical device running Android 10.

@0xZOne
Copy link
Member Author

0xZOne commented Feb 23, 2022

@blasten You could also try on a HUAWEI Mate 40 Pro. :)

@0xZOne
Copy link
Member Author

0xZOne commented Feb 23, 2022

@blasten Here are some logs when I reproduce this issue:

  1. From Huawei Mate40pro
[   +5 ms] W/BufferQueueProducer(32669): [SurfaceTexture-0-32669-0]:1390: disconnect: not connected (req=1)
[        ] W/libEGL  (32669): EGLNativeWindowType 0xb72cf008 disconnect failed
[        ] D/OpenGLRenderer(32669): disableOutlineDraw is true
[   +4 ms] D/OpenGLRenderer(32669): disableOutlineDraw is true
[   +2 ms] D/OpenGLRenderer(32669): disableOutlineDraw is true
[        ] D/OpenGLRenderer(32669): disableOutlineDraw is true
[        ] D/OpenGLRenderer(32669): disableOutlineDraw is true
[        ] D/OpenGLRenderer(32669): disableOutlineDraw is true
[        ] D/OpenGLRenderer(32669): disableOutlineDraw is true
[        ] D/OpenGLRenderer(32669): disableOutlineDraw is true
[   +7 ms] W/libEGL  (32669): EGLNativeWindowType 0xd39e6d88 disconnect failed
[ +499 ms] W/OpenGLRenderer(32669): dequeueBuffer failed, error = -110; switching to fallback
[ +104 ms] I/Choreographer(32669): Skipped 35 frames!  The application may be doing too much work on its main thread.
[   +1 ms] W/OpenGLRenderer(32669): reserveNext failed, error = -2147483648 (Unknown error -2147483648)
[   +2 ms] W/BufferQueueProducer(32669): [SurfaceTexture-0-32669-2]:1390: disconnect: not connected (req=1)
[        ] W/libEGL  (32669): EGLNativeWindowType 0xd39e6c08 disconnect failed

log_huawei_mate40pro.txt

  1. From Pixel2
[+4008 ms] W/OpenGLRenderer( 6884): dequeueBuffer failed, error = -110; switching to fallback
[  +24 ms] I/Choreographer( 6884): Skipped 241 frames!  The application may be doing too much work on its main thread.
[        ] W/OpenGLRenderer( 6884): reserveNext failed, error = -2147483648 (Unknown error -2147483648)

@blasten
Copy link

blasten commented Mar 7, 2022

@0xZOne I tried your change in an emulator running Q.

Screen Shot 2022-03-07 at 12 28 08 PM

Note that the platform 179 is missing. I wonder if this is an issue in the example app or something in the implementation. Would you be able to take a look?

@0xZOne
Copy link
Member Author

0xZOne commented Mar 8, 2022

@blasten I tested multiple real devices running Android 10, including Pixel2, Pixel3L, Huawei Mate40 Pro, etc., and did not reproduce the issue you described.

@blasten
Copy link

blasten commented Mar 8, 2022

this might be an emulator only thing then. I will keep an eye

@0xZOne
Copy link
Member Author

0xZOne commented Mar 8, 2022

This video is from Huawei Mate40 Pro running Android 10.

petal_20220308_110443.mp4

@github-actions
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 22, 2022
@danagbemava-nc danagbemava-nc added the r: fixed Issue is closed as already fixed in a newer version label Mar 22, 2022
@flutter-triage-bot flutter-triage-bot bot added P0 Critical issues such as a build break or regression and removed P2 labels Jun 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: platform-views Embedding Android/iOS views in Flutter apps c: regression It was better in the past than it is now e: OS-version specific Affects only some versions of the relevant operating system engine flutter/engine repository. See also e: labels. found in release: 2.11 Found to occur in 2.11 has reproducible steps The issue has been confirmed reproducible and is ready to work on P0 Critical issues such as a build break or regression platform-android Android applications specifically r: fixed Issue is closed as already fixed in a newer version waiting for PR to land (fixed) A fix is in flight
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants