Skip to content

[iOS] Flutter run throws Runner quit unexpectedly after upgrading Xcode and Simulator #135208

@afnx

Description

@afnx

Is there an existing issue for this?

Steps to reproduce

  1. Upgrade Xcode, Simulator, and Flutter to the latest versions.
  2. Download and install iOS 14 on Xcode.
  3. Create and open a Simulator with iOS 14.
  4. Run the app: futter run

Expected results

Should be able to run the app on iOS 14/15/16/17 without any crashing.

Actual results

Currently not able to run the app on iOS 14 at all. Throws a "Runner quit unexpectedly" and never starts the app.

Looks like only Simulator with iOS 17 installed works, but it's extremely slow and laggy. Sometimes crashes (mostly while using the keyboard).

Code sample

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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  final String title;

  const MyHomePage({
    Key? key,
    required this.title,
  }) : super(key: key);

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

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

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            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),
      ),
    );
  }
}

Screenshots or Video

No response

Logs

The log from the console after running the app:
Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running Xcode build...                                                  
 └─Compiling, linking and signing...                       23.2s⣷
Xcode build done.                                           49.6s
[VERBOSE-2:FlutterDarwinContextMetalImpeller.mm(37)] Using the Impeller rendering backend.
Syncing files to device iPhone 15 Pro Max...  

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.13.5, on macOS 13.5.2 22G91
    darwin-x64, locale en-US)
    • Flutter version 3.13.5 on channel stable at
      /Users/user/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 12fccda598 (35 hours ago), 2023-09-19
      13:56:11 -0700
    • Engine revision bd986c5ed2
    • Dart version 3.1.2
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK
    version 33.0.2)
    • Android SDK at /Users/user/Library/Android/sdk
    • Platform android-31, build-tools 33.0.2
    • 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.6b829.9-10027231)
    • All Android licenses accepted.

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

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

[✓] Android Studio (version 2022.3)
    • 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
      17.0.6+0-17.0.6b829.9-10027231)

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

[✓] Connected device (3 available)
    • iPhone 12 Pro Max (mobile) •
      23231853-7B41-4390-A29A-D8E19E2041FC • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-1 (simulator)
    • macOS (desktop)                       • macos
      • darwin-x64     • macOS 13.5.2 22G91 darwin-x64
    • Chrome (web)                          • chrome
      • web-javascript • Google Chrome 116.0.5845.187

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

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    in triagePresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions