Skip to content

flutter 3.27 Black Screen crash after upgrade from 3.24.5 to 3.27.0 #160228

Closed as not planned

Description

Steps to reproduce

1- created new counter app with flutter 3.27.0
2- run counter app with flutter 3.27.0

Expected results

The app should launch correctly with no problems.

using flutter 3.24.5 the app correctly launches.

Actual results

results in some real android devices crashing, the app is unable to launch and the screen is black.

Some real devices experiencing the problem:
android 12; Samsung Galaxy M31

Code sample

Code sample
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // TRY THIS: Try running your application with "flutter run". You'll see
        // the application has a purple toolbar. Then, without quitting the app,
        // try changing the seedColor in the colorScheme below to Colors.green
        // and then invoke "hot reload" (save your changes or press the "hot
        // reload" button in a Flutter-supported IDE, or press "r" if you used
        // the command line to start the app).
        //
        // Notice that the counter didn't reset back to zero; the application
        // state is not lost during the reload. To reset the state, use hot
        // restart instead.
        //
        // This works for code too, not just values: Most code changes can be
        // tested with just a hot reload.
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      // This call to setState tells the Flutter framework that something has
      // changed in this State, which causes it to rerun the build method below
      // so that the display can reflect the updated values. If we changed
      // _counter without calling setState(), then the build method would not be
      // called again, and so nothing would appear to happen.
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Scaffold(
      appBar: AppBar(
        // TRY THIS: Try changing the color here to a specific color (to
        // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar
        // change color while the other colors stay the same.
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: Text(widget.title),
      ),
      body: Center(
        // Center is a layout widget. It takes a single child and positions it
        // in the middle of the parent.
        child: Column(
          // Column is also a layout widget. It takes a list of children and
          // arranges them vertically. By default, it sizes itself to fit its
          // children horizontally, and tries to be as tall as its parent.
          //
          // Column has various properties to control how it sizes itself and
          // how it positions its children. Here we use mainAxisAlignment to
          // center the children vertically; the main axis here is the vertical
          // axis because Columns are vertical (the cross axis would be
          // horizontal).
          //
          // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint"
          // action in the IDE, or press "p" in the console), to see the
          // wireframe for each widget.
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headlineMedium,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
flutter.error.ImpellerValidationBreak.webm

Logs

Logs
Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
[CXX1101] NDK at C:\Android_SDK\ndk\26.1.10909125 did not have a source.properties file
√ Built build\app\outputs\flutter-apk\app-debug.apk
I/flutter ( 5497): [IMPORTANT:flutter/shell/platform/android/android_context_vk_impeller.cc(60)] Using the Impeller rendering backend (Vulkan).
E/flutter ( 5497): [ERROR:flutter/impeller/renderer/backend/vulkan/android/ahb_texture_source_vk.cc(108)] Break on 'ImpellerValidationBreak' to inspect point of failure: Could not find memory type of external image.
E/flutter ( 5497): [ERROR:flutter/impeller/renderer/backend/vulkan/swapchain/ahb/ahb_texture_pool_vk.cc(69)] Break on 'ImpellerValidationBreak' to inspect point of failure: Could not create hardware buffer texture source for swapchain image of size: (1080, 2154)
E/flutter ( 5497): [ERROR:flutter/impeller/renderer/backend/vulkan/android/ahb_texture_source_vk.cc(108)] Break on 'ImpellerValidationBreak' to inspect point of failure: Could not find memory type of external image.
E/flutter ( 5497): [ERROR:flutter/impeller/renderer/backend/vulkan/swapchain/ahb/ahb_texture_pool_vk.cc(69)] Break on 'ImpellerValidationBreak' to inspect point of failure: Could not create hardware buffer texture source for swapchain image of size: (1080, 2154)
E/flutter ( 5497): [ERROR:flutter/impeller/renderer/backend/vulkan/android/ahb_texture_source_vk.cc(108)] Break on 'ImpellerValidationBreak' to inspect point of failure: Could not find memory type of external image.
E/flutter ( 5497): [ERROR:flutter/impeller/renderer/backend/vulkan/swapchain/ahb/ahb_texture_pool_vk.cc(69)] Break on 'ImpellerValidationBreak' to inspect point of failure: Could not create hardware buffer texture source for swapchain image of size: (1080, 2154)
Connecting to VM Service at ws://127.0.0.1:51520/_KpdHFsucsQ=/ws
Connected to the VM Service.
E/flutter ( 5497): [ERROR:flutter/impeller/renderer/backend/vulkan/swapchain/ahb/ahb_swapchain_impl_vk.cc(110)] Break on 'ImpellerValidationBreak' to inspect point of failure: Could not create AHB texture source.
E/flutter ( 5497): [ERROR:flutter/shell/gpu/gpu_surface_vulkan_impeller.cc(58)] No surface available.
E/flutter ( 5497): [ERROR:flutter/impeller/renderer/backend/vulkan/swapchain/ahb/ahb_swapchain_impl_vk.cc(110)] Break on 'ImpellerValidationBreak' to inspect point of failure: Could not create AHB texture source.
E/flutter ( 5497): [ERROR:flutter/shell/gpu/gpu_surface_vulkan_impeller.cc(58)] No surface available.
E/flutter ( 5497): [ERROR:flutter/impeller/renderer/backend/vulkan/swapchain/ahb/ahb_swapchain_impl_vk.cc(110)] Break on 'ImpellerValidationBreak' to inspect point of failure: Could not create AHB texture source.
E/flutter ( 5497): [ERROR:flutter/shell/gpu/gpu_surface_vulkan_impeller.cc(58)] No surface available.
E/flutter ( 5497): [ERROR:flutter/impeller/renderer/backend/vulkan/android/ahb_texture_source_vk.cc(108)] Break on 'ImpellerValidationBreak' to inspect point of failure: Could not find memory type of external image.
E/flutter ( 5497): [ERROR:flutter/impeller/renderer/backend/vulkan/swapchain/ahb/ahb_texture_pool_vk.cc(69)] Break on 'ImpellerValidationBreak' to inspect point of failure: Could not create hardware buffer texture source for swapchain image of size: (1080, 2154)
E/flutter ( 5497): [ERROR:flutter/impeller/renderer/backend/vulkan/swapchain/ahb/ahb_swapchain_impl_vk.cc(110)] Break on 'ImpellerValidationBreak' to inspect point of failure: Could not create AHB texture source.
E/flutter ( 5497): [ERROR:flutter/shell/gpu/gpu_surface_vulkan_impeller.cc(58)] No surface available.
D/ProfileInstaller( 5497): Installing profile for com.example.flutter_test_project
Application finished.

Exited (-1).

Flutter Doctor output

Doctor output
PS C:\Users\ASHRAF\Desktop\2023 Files\flutter_test_project> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.27.0, on Microsoft Windows [Version 10.0.19045.5247], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Enterprise 2019 16.11.15)
[√] Android Studio (version 2023.2)
[√] Android Studio (version 2024.1)
[√] Android Studio (version 2022.1)
[√] VS Code (version 1.96.0)
[√] Connected device (4 available)
[√] Network resources

• No issues found!

Activity

  1. shpy2001 commented on Dec 13, 2024

    @shpy2001

    Same issue here.
    For Android:
    Some devices get black splash screen and delay ~10s to continue. Some devices show normal splash screen but stuck there. And other devices get whole black screen.
    Tested on 2 apps. Everythings are ok on Flutter 3.24.5.

  2. cachapa commented on Dec 13, 2024

    @cachapa
    Contributor

    I'm not experiencing problems myself (Pixel 8), but am getting reports from users that mirror what is described in this ticket - not yet sure what devices those users are on.

    This happened after updating my app with Flutter 3.27.0 last night.

  3. Hung6129 commented on Dec 13, 2024

    @Hung6129

    same issue after updated from 3.24

    after upgrade to 3.27

    when i create a new project and run, its show a black screen
    and sometime its quit the emulator(android studio lady bug)

  4. darshankawar commented on Dec 13, 2024

    @darshankawar
    Member

    I tried on S10+ device (Android 12) with latest stable and also on Pixel XL api 35 emulator on which I didn't get the reported behavior.

    Could be similar to #160201. @kwsoftnet7 and everyone in this thread seeing the black screen, can you try as mentioned in this comment to see if it helps in your case or not ?

    For emulator specific issue showing black screen, maybe it could be similar / related to #160168

  5. darshankawar commented on Dec 13, 2024

    @darshankawar
    Member
  6. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Dec 13, 2024
  7. taniksha-mfy commented on Dec 13, 2024

    @taniksha-mfy

    I am getting the same issue after upgrading to 3.27. Getting black screen on android Samsung Galaxy note 10 lite.
    Had to install app using flutter run --no-enable-impellerthen it worked. But when restarting the app after killing it then again same issue, everytime need to install like this on my device.

  8. richanshah commented on Dec 13, 2024

    @richanshah
  9. KuroodoD commented on Dec 13, 2024

    @KuroodoD
  10. rubenlop88 commented on Dec 13, 2024

    @rubenlop88

    I do not get a blank screen but my app is stuck in the splash screen. Only in the emulator.

  11. eijiotieno-official commented on Dec 13, 2024

    @eijiotieno-official
  12. eijiotieno-official commented on Dec 13, 2024

    @eijiotieno-official
  13. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Dec 16, 2024
  14. 11 remaining items

  15. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Dec 17, 2024
  16. richanshah commented on Dec 17, 2024

    @richanshah

    I have tried with 3.27.1, but my app still stuck on launch screen and getting below logs.

    I/flutter ( 9626): [INFO:flutter/shell/platform/android/android_context_vk_impeller.cc(64)] Known bad Vulkan driver encountered, falling back to OpenGLES. then no responds.

    [✓] Flutter (Channel stable, 3.27.1, on macOS 15.1 24B83 darwin-arm64, locale en-IN)
    • Flutter version 3.27.1 on channel stable at /Users/richa.shah/fvm/versions/3.27.1
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 17025dd (12 hours ago), 2024-12-17 03:23:09 +0900
    • Engine revision cb4b5fff73
    • Dart version 3.6.0
    • DevTools version 2.40.2

    [✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/richa.shah/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)
    • All Android licenses accepted.

    [✓] Xcode - develop for iOS and macOS (Xcode 16.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16A242d
    • CocoaPods version 1.16.2

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

    [✓] Android Studio (version 2024.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
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)

    [✓] Connected device (6 available)
    • HD1901 (mobile) • 6c346dec • android-arm64 • Android 12 (API 31)

  17. darshankawar commented on Dec 18, 2024

    @darshankawar
    Member

    thanks @darshankawar now after install hotfix version (3.27.1) the issue is solved and now the app working on vm and real devices very good without problems.

    Based on this, I will close this as fixed. If anyone still facing same issues, please file new issue and we would need device details and binary version so that we can properly address it.

  18. added
    r: fixedIssue is closed as already fixed in a newer version
    and removed
    in triagePresently being triaged by the triage team
    on Dec 18, 2024
  19. amoghkb commented on Dec 20, 2024

    @amoghkb

    I am facing issues with Android Studio. Before the update, it was working fine, but after updating to the latest version, I can no longer run my application. The app installs successfully, but it gets stuck on the default splash screen and doesn't proceed further. I have tried troubleshooting the issue, but nothing seems to work.

    Doctor summary (to see all details, run flutter doctor -v):
    [√] Flutter (Channel stable, 3.27.1, on Microsoft Windows [Version 10.0.22631.4602], locale en-IN)
    [√] Windows Version (Installed version of Windows is version 10 or higher)
    [√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    [√] Chrome - develop for the web
    [√] Android Studio (version 2024.2)
    [√] IntelliJ IDEA Community Edition (version 2024.2)
    [√] VS Code (version 1.93.1)
    [√] Connected device (4 available)
    [√] Network resources

    Screenshot 2024-12-20 182909
    this the device i am using and i also tried with other as well ,but same issue.

  20. rubenlop88 commented on Dec 20, 2024

    @rubenlop88

    @amon Checkout this issue #160439. I had the same problem after I upgraded to 3.27. I created another emulator with the API 35 image instead of the VanillaIceCream one and I was able to run my app again. Hope this helps.

  21. caospi commented on Dec 20, 2024

    @caospi

    I continue with the error in physical devices with this message
    I/flutter (30787): [INFO:flutter/shell/platform/android/android_context_vk_impeller.cc(64)] Known bad Vulkan driver encountered, falling back to OpenGLES.
    Running app in release mode

    flutter doctor
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 3.27.1, on macOS 15.0.1 24A348 darwin-arm64, locale es-CO)
    [✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    [✓] Xcode - develop for iOS and macOS (Xcode 16.0)
    [✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google
    Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
    [✓] Android Studio (version 2022.3)
    [✓] VS Code (version 1.96.1)
    [✓] Connected device (3 available)
    ! Error: Browsing on the local area network for iPhone de Carlos. 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

    ! Doctor found issues in 1 category.

  22. neel-vaghani commented on Dec 25, 2024

    @neel-vaghani

    Please try with latest hotfix version (3.27.1) and confirm the behavior

    I am using flutter 3.27.1 and i got same issue

    WhatsApp Image 2024-12-25 at 5 33 30 PM

    Device Name : OPPO F19 Pro
    Android version : 13

  23. caospi commented on Dec 25, 2024

    @caospi

    @neel-vaghani you should verify if you have some dependencie outdated that it’ll can generating conflicts with the last version of flutter.

    In my case I had sentry_flutter dependencie outdated and it was my problem.

  24. shalabycr7 commented on Dec 25, 2024

    @shalabycr7

    I also have the same issue on my phone but the app works fine on the emulator.. strange

    Device Name : OPPO A94
    Android version : 13

  25. arefrafei92 commented on Dec 27, 2024

    @arefrafei92

    When I add <meta-data android:name="io.flutter.embedding.android.EnableImpeller" android:value="false" /> to the AndroidManifest file, the app still gets stuck on the splash screen. However, if I bring the app to the foreground, it resumes working. Interestingly, running the app with the --no-enable-impeller flag (e.g., flutter run --release --no-enable-impeller) resolves the issue.

    I've confirmed that the tag is placed correctly under the tag in the AndroidManifest, but it seems like Impeller isn't being disabled as expected. What could be causing this, and how can I fix it?

    <application android:label="CanSell" android:name=".Application" android:icon="@mipmap/launcher_icon" android:usesCleartextTraffic="true">
        <meta-data android:name="io.flutter.embedding.android.EnableImpeller" android:value="false" />
        <receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ActionBroadcastReceiver" />
        <activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize" android:enableOnBackInvokedCallback="true">
    
            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="https" android:host="cansell.info" />
            </intent-filter>
    
            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="cansell" android:host="verify" />
            </intent-filter>
    
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
    
            <intent-filter>
                <action android:name="FLUTTER_NOTIFICATION_CLICK" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
    
        </activity>
    
        <activity android:name="com.yalantis.ucrop.UCropActivity" android:screenOrientation="portrait" android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
    
        <meta-data android:name="flutterEmbedding" android:value="2" />
    
        <meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/ic_notification" />
        <meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/colorPrimary" />
    </application>
    
    
    Flutter is already up to date on channel stable
    Flutter 3.27.1 • channel stable • https://github.com/flutter/flutter.git
    Framework • revision 17025dd882 (10 days ago) • 2024-12-17 03:23:09 +0900
    Engine • revision cb4b5fff73
    Tools • Dart 3.6.0 • DevTools 2.40.2
    
  26. github-actions commented on Jan 12, 2025

    @github-actions

    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.

  27. locked as resolved and limited conversation to collaborators on Jan 12, 2025
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

    r: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions