Thanks to visit codestin.com
Credit goes to github.com

Skip to content

iOS Simulator shows background red and doesn't render any widget #168149

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

Closed
PINHOf opened this issue May 1, 2025 · 4 comments
Closed

iOS Simulator shows background red and doesn't render any widget #168149

PINHOf opened this issue May 1, 2025 · 4 comments
Labels
r: solved Issue is closed as solved

Comments

@PINHOf
Copy link

PINHOf commented May 1, 2025

Steps to reproduce

When running any Flutter app on an iOS simulator (iPhone 15 or 16, iOS 17 or 18) on macOS Sequoia 15.3 with Flutter 3.29.3, the app displays a red screen. The same code works perfectly on a real iOS device and on macOS builds.

I have also created a demo using Swift / XCode and no issue was detected.

Notes:

  • Tried to disable Impeller via Info.plist (FLTEnableImpeller set to false) and also using flags "--no-enable-impeller"
  • Tried with flutter clean, new simulators, and new Flutter projects
  • Tested multiple device types and iOS versions (15, 17, 18)

Reproduced consistently.

Actual results

The following demo code:

import 'package:flutter/material.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        backgroundColor: Colors.white,
        body: Center(child: Text('Hello World')),
      ),
    );
  }
}

Renders in the simulator:

Image

Logs

https://pastecode.io/s/2g25v5tp

Flutter Doctor output

Doctor output
✓] Flutter (Channel stable, 3.29.3, on macOS 15.3 24D60 darwin-x64, locale en-US) [1,059ms]
    • Flutter version 3.29.3 on channel stable at /Users/lm/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ea121f8859 (3 weeks ago), 2025-04-11 19:10:07 +0000
    • Engine revision cf56914b32
    • Dart version 3.7.2
    • DevTools version 2.42.3

[✗] Android toolchain - develop for Android devices [747ms]
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/to/macos-android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


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

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) [26ms]
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[!] Android Studio (not installed) [23ms]
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/to/macos-android-setup for detailed instructions).

[✓] VS Code (version 1.99.3) [23ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.108.0

[✓] Connected device (2 available) [8.2s]
    • iPhone 16 Pro (mobile) • B546391F-9AEC-4EDE-88D4-024A4AF87FCC • ios        • com.apple.CoreSimulator.SimRuntime.iOS-18-4 (simulator)
    • macOS (desktop)        • macos                                • darwin-x64 • macOS 15.3 24D60 darwin-x64
    ! Error: Browsing on the local area network for LM. 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 [858ms]
    • All expected network resources are available.
@Aryan-Sood
Copy link

I tried to reproduce this issue on Mac OS Sequoia 15.4.1 with flutter version 3.29.3.
Seems to be working fine on this version of Mac OS.

Flutter (Channel stable, 3.29.3, on macOS 15.4.1 24E263 darwin-x64, locale en-IN) [1,138ms]
    • Flutter version 3.29.3 on channel stable at /Users/aryan.sood/Documents/Flutter SDK/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ea121f8859 (3 weeks ago), 2025-04-11 19:10:07 +0000
    • Engine revision cf56914b32
    • Dart version 3.7.2
    • DevTools version 2.42.3

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1) [4.2s]
    • Android SDK at /Users/aryan.sood/Library/Android/sdk
    • Platform android-35, build-tools 35.0.1
    • ANDROID_HOME = /Users/aryan.sood/Library/Android/sdk
    • Java binary at: /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/java
      This JDK is specified in your Flutter configuration.
      To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version Java(TM) SE Runtime Environment (build 17.0.12+8-LTS-286)
    • All Android licenses accepted.

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

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

[✓] Android Studio (version 2024.3) [40ms]
    • 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 21.0.5+-13047016-b750.29)

[✓] VS Code (version 1.99.3) [36ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.108.0

[✓] Connected device (3 available) [8.4s]
    • iPhone 15 Pro (mobile) • F9261492-AE4C-44DE-91DD-F1FFAE51BE2A • ios            • com.apple.CoreSimulator.SimRuntime.iOS-18-4 (simulator)
    • macOS (desktop)        • macos                                • darwin-x64     • macOS 15.4.1 24E263 darwin-x64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 135.0.7049.115

[✓] Network resources [1,028ms]
    • All expected network resources are available.

@darshankawar darshankawar added the in triage Presently being triaged by the triage team label May 2, 2025
@darshankawar
Copy link
Member

darshankawar commented May 2, 2025

Thanks for the report and above update. I am on macOS Sequoia 15.2, but didn't observe the reported behavior:

Image

Maybe this is specific to 15.3 version as, per above findings, on 15.4.1, it doesn't replicate. My machine is also intel, so I think it is the only difference of OS version and not CPU arch of mac machines. Are you by any chance using Open Core Legacy Patcher ?

@PINHOf Can you switch to latest master and re-run your scenario to confirm if the behavior still persist or not ?

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 2, 2025
@PINHOf
Copy link
Author

PINHOf commented May 3, 2025

Hello @Aryan-Sood @darshankawar

Yes, I'm using OpenCore Legacy Patcher. I recently updated macOS to version 15.4.1 and Xcode to 16.3, but the issue still persists. In a few hours, I'll be able to test on another macOS machine that doesn't use OpenCore Legacy Patcher and will share feedback.

It's worth noting that the issue doesn't occur when deploying to a real iOS device.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 3, 2025
@PINHOf
Copy link
Author

PINHOf commented May 3, 2025

Hello again @darshankawar,

I just confirmed, the issue is due to OpenCore Legacy Patcher. It works great on a different macOS machine that doesn't use OpenCore Legacy Patcher (same macOS, Flutter & Xcode versions).

@PINHOf PINHOf closed this as completed May 3, 2025
@darshankawar darshankawar added r: solved Issue is closed as solved and removed in triage Presently being triaged by the triage team labels May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
r: solved Issue is closed as solved
Projects
None yet
Development

No branches or pull requests

3 participants