HomeiOS DevelopmentExpo app caught on splash display screen then Hermes OOM crash (3GB...

Expo app caught on splash display screen then Hermes OOM crash (3GB RAM) on each iOS & Android simulators


Drawback
Once I open my app, splash display screen seems just a few seconds after which app provides crash. It begins consuming increasingly more reminiscence because the time go. After reaching 3GB of ram it provides crash and closes. There is no such thing as a log in expo console however I’ve discovered associated log in native ios logs:

2025-11-26 11:30:31.097 I  Expo Go[11351:3cbc4] [dev.hermesengine:Default] HermesGC: OOM: [RNBridgeless] motive = Max heap dimension was exceeded (1 from class: vm_allocate_category), numCollections = 3193, heapSize = 3221225472, allotted = 3145696648, va = 3221225472, exterior = 2997258.

right here is my bundle.json

{
  "identify": "my_app",
  "foremost": "expo-router/entry",
  "model": "1.0.0",
  "scripts": {
    "begin": "expo begin",
    "reset-project": "node ./scripts/reset-project.js",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "internet": "expo begin --web",
    "lint": "expo lint"
  },
  "dependencies": {
    "@expo/vector-icons": "^15.0.3",
    "@react-native-async-storage/async-storage": "2.2.0",
    "@react-navigation/bottom-tabs": "^7.4.0",
    "@react-navigation/parts": "^2.6.3",
    "@react-navigation/native": "^7.1.8",
    "expo": "~54.0.25",
    "expo-constants": "~18.0.10",
    "expo-font": "~14.0.9",
    "expo-haptics": "~15.0.7",
    "expo-image": "~3.0.10",
    "expo-linear-gradient": "~15.0.7",
    "expo-linking": "~8.0.9",
    "expo-router": "~6.0.15",
    "expo-splash-screen": "~31.0.11",
    "expo-status-bar": "~3.0.8",
    "expo-symbols": "~1.0.7",
    "expo-system-ui": "~6.0.8",
    "expo-web-browser": "~15.0.9",
    "react": "19.1.0",
    "react-dom": "19.1.0",
    "react-native": "0.81.5",
    "react-native-gesture-handler": "~2.28.0",
    "react-native-reanimated": "~4.1.1",
    "react-native-safe-area-context": "~5.6.0",
    "react-native-screens": "~4.16.0",
    "react-native-svg": "15.12.1",
    "react-native-svg-transformer": "^1.5.2",
    "react-native-web": "~0.21.0",
    "react-native-worklets": "0.5.1"
  },
  "devDependencies": {
    "@sorts/react": "~19.1.0",
    "eslint": "^9.25.0",
    "eslint-config-expo": "~10.0.0",
    "typescript": "~5.9.2"
  },
  "personal": true
}

What I exploit

  • {Hardware}: Mac mini m4
  • OS: macOS Tahoe 26.1
  • Simulator: Xcode simulator iPhone 16e (iOS 26.1) & Android studio emulator Pixel 9a
  • Xcode model: Model 26.1.1 (17B100)

Each of the android and ios simulator inflicting similar drawback. Whats occurring? My app is just not that a lot huge. This appears like an infinite render loop (however I do not know actually), however none of my parts are being rendered. I suppose the crash occurs earlier than react mounts. The app is caught completely on the splash display screen after which crash.

Issues I attempted:

  • Reset Metro (expo begin –clear)
  • expo prebuild + pod set up (tried construct as an alternative of Expo go however similar drawback occurred.)
  • Eradicating all context suppliers
  • Eradicating customized fonts
  • Testing each iOS & Android simulators

I’ve additionally tried on a brand new contemporary Expo mission and it did not trigger this drawback. It’s most likely inflicting from my ThemeProvide.tsx. Once I take away that the issue was gone.

ThemeProvider.tsx

import { ThemeContext } from "@/context/theme";
import { darkish, gentle } from "@/design";
import { UserPref } from "@/design/colours";
import AsyncStorage from "@react-native-async-storage/async-storage";
import { useCallback, useEffect, useMemo, useState } from "react";
import { ColorSchemeName, useColorScheme } from "react-native";
import { ProviderProps } from "../supplier.sorts";

const STORAGE_KEY = "app_theme_pref";

const resolveMode = (userPref: UserPref, sys: ColorSchemeName) => {
  const scheme = sys ?? "gentle";
  return userPref === "system" ? scheme : userPref;
};

const ThemeProvider = ({ kids }: ProviderProps) => {
  const [userPref, setUserPref] = useState("system");
  const sys = useColorScheme();

  useEffect(() => {
    (async () => {
      const saved = await AsyncStorage.getItem(STORAGE_KEY);
      if (saved === "gentle" || saved === "darkish" || saved === "system") {
        setUserPref(saved);
      }
    })();
  }, []);

  const effectiveMode = useMemo(
    () => resolveMode(userPref, sys),
    [userPref, sys]
  );

  const theme = effectiveMode === "darkish" ? darkish : gentle;

  const updateUserPref = useCallback(async (pref: UserPref) => {
    setUserPref(pref);
    await AsyncStorage.setItem(STORAGE_KEY, pref);
  }, []);

  const val = useMemo(
    () => ({ theme, userPref, effectiveMode, updateUserPref }),
    [theme, userPref, effectiveMode, updateUserPref]
  );

  return {kids};
};

export default ThemeProvider;

Query

Why do each iOS and Android simulators set off a Hermes OOM earlier than React mounts?
Is that this a recognized bug with Expo SDK 54 + RN 0.81 + Hermes on simulators?
What ought to I do or attempt to establish the basis of the issue?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments