Skip to content

[quick_actions] start event is reported twice with pre-warmed FlutterEngine #89615

Open

Description

@nt4f04uNd

Steps to Reproduce

When flutter engine is pre-warmed, quick_actions reports the initial action twice

Expected results: 1 event, 1 alert

Actual results: 2 event, 2 alerts

Reproducible https://github.com/nt4f04unds-archive/issues/tree/flutter_89615
(you can clone it by command in the readme)

To reproduce, run the app in the release mode, close the activity, then open it with the quick action

flutter doctor -v
[√] Flutter (Channel master, 2.6.0-1.0.pre.195, on Microsoft Windows [Version 10.0.19041.1165], locale ru-RU)
    • Flutter version 2.6.0-1.0.pre.195 at C:\dev\src\flutter
    • Upstream repository [email protected]:nt4f04und/flutter.git
    • FLUTTER_GIT_URL = [email protected]:nt4f04und/flutter.git
    • Framework revision e36c3a764c (6 hours ago), 2021-09-07 14:16:04 -0400
    • Engine revision 929931b747
    • Dart version 2.15.0 (build 2.15.0-82.0.dev)

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\danya\AppData\Local\Android\sdk
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.7)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.7.30621.155
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 4.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    • 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 1.8.0_242-release-1644-b01)

[√] IntelliJ IDEA Community Edition (version 2020.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.3
    • 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

[√] VS Code (version 1.60.0)
    • VS Code at C:\Users\danya\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.26.0

[√] Connected device (4 available)
    • Redmi Note 5 (mobile) • 40c9f14 • android-arm64  • Android 9 (API 28)
    • Windows (desktop)     • windows • windows-x64    • Microsoft Windows [Version 10.0.19041.1165]
    • Chrome (web)          • chrome  • web-javascript • Google Chrome 93.0.4577.63
    • Edge (web)            • edge    • web-javascript • Microsoft Edge 93.0.961.38

! Doctor found issues in 1 category.

Activity

  1. TahaTesser commented on Sep 8, 2021

    @TahaTesser
    Contributor

    Hi @nt4f04uNd
    Based on the instructions, the app should but it fails

    [   +1 ms] e: C:\Users\Taha\StudioProjects\issues\android\app\src\main\kotlin\com\example\issues\MainActivity.kt: (9,
    14): Unresolved reference: MyApp
    [  +67 ms] FAILURE: Build failed with an exception.
    [        ] * What went wrong:
    [        ] Execution failed for task ':app:compileReleaseKotlin'.
    [        ] > Compilation error. See log for more details
    [        ] * Try:
    [        ] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log
    output. Run with --scan to get full insights.
    [        ] * Get more help at https://help.gradle.org
    [        ] BUILD FAILED in 50s
    
  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Sep 8, 2021
  3. nt4f04uNd commented on Sep 8, 2021

    @nt4f04uNd
    MemberAuthor

    Sorry, I updated the repro.

  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Sep 8, 2021
  5. TahaTesser commented on Sep 9, 2021

    @TahaTesser
    Contributor

    Hi @nt4f04uNd
    Thanks, the issue is reproducible, this event is fired twice when clicking an initial for the first time

    [  +79 ms] W/FlutterActivityAndFragmentDelegate(20567): A splash screen was
    provided to Flutter, but this is deprecated. See
    flutter.dev/go/android-splash-migration for migration steps.
    [+18969 ms] W/FlutterActivityAndFragmentDelegate(20567): A splash screen was
    provided to Flutter, but this is deprecated. See
    flutter.dev/go/android-splash-migration for migration steps.
    stable master
    ❗️ ❗️

    Check flutter doctor -v outputs for each channel below

    flutter doctor -v
    [✓] Flutter (Channel stable, 2.5.0, on macOS 12.0 21A5506j darwin-x64, locale en-GB)
        • Flutter version 2.5.0 at /Users/tahatesser/Code/flutter_stable
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 4cc385b4b8 (26 hours ago), 2021-09-07 23:01:49 -0700
        • Engine revision f0826da7ef
        • Dart version 2.14.0
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        • Android SDK at /Users/tahatesser/Code/SDK
        • Platform android-31, build-tools 30.0.3
        • ANDROID_HOME = /Users/tahatesser/Code/SDK
        • Java binary at: /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7621141/Android Studio.app/Contents/jre/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS
        • Xcode at /Applications/Xcode-beta.app/Contents/Developer
        • Xcode 13.0, Build version 13A5212g
        • CocoaPods version 1.10.2
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2020.3)
        • Android Studio at /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7621141/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.10+0-b96-7281165)
    
    [✓] Android Studio (version 2020.3)
        • Android Studio at /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7621141/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.10+0-b96-7281165)
    
    [✓] Android Studio (version 2020.3)
        • Android Studio at /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7583922/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.10+0-b96-7281165)
    
    [✓] VS Code (version 1.60.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.26.0
    
    [✓] Connected device (3 available)
        • IN2011 (mobile) • c9d8ee0c • android-arm64  • Android 11 (API 30)
        • macOS (desktop) • macos    • darwin-x64     • macOS 12.0 21A5506j darwin-x64
        • Chrome (web)    • chrome   • web-javascript • Google Chrome 93.0.4577.63
    
    • No issues found!
    [✓] Flutter (Channel master, 2.6.0-1.0.pre.219, on macOS 12.0 21A5506j darwin-x64, locale en-GB)
        • Flutter version 2.6.0-1.0.pre.219 at /Users/tahatesser/Code/flutter_master
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 58944e6b88 (5 hours ago), 2021-09-08 19:37:34 -0700
        • Engine revision 6a3b04632b
        • Dart version 2.15.0 (build 2.15.0-82.0.dev)
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        • Android SDK at /Users/tahatesser/Code/SDK
        • Platform android-31, build-tools 30.0.3
        • ANDROID_HOME = /Users/tahatesser/Code/SDK
        • Java binary at: /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7621141/Android Studio.app/Contents/jre/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 13.0)
        • Xcode at /Applications/Xcode-beta.app/Contents/Developer
        • CocoaPods version 1.10.2
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2020.3)
        • Android Studio at /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7621141/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.10+0-b96-7281165)
    
    [✓] Android Studio (version 2020.3)
        • Android Studio at /Users/tahatesser/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/203.7583922/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.10+0-b96-7281165)
    
    [✓] VS Code (version 1.60.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.26.0
    
    [✓] Connected device (3 available)
        • IN2011 (mobile) • c9d8ee0c • android-arm64  • Android 11 (API 30)
        • macOS (desktop) • macos    • darwin-x64     • macOS 12.0 21A5506j darwin-x64
        • Chrome (web)    • chrome   • web-javascript • Google Chrome 93.0.4577.63
    
    • No issues found!

    ✅: No Issue ❗️: Issue reproduced

  6. added
    engineflutter/engine related. See also e: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    platform-androidAndroid applications specifically
    and removed
    in triagePresently being triaged by the triage team
    on Sep 9, 2021
  7. added
    P2Important issues not at the top of the work list
    on Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.found in release: 2.5Found to occur in 2.5found in release: 2.6Found to occur in 2.6has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: quick_actionsQuickActions pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions