SDK 45 Android Crash at Startup

I just updated our app to SDK 45 (Classic build, Managed flow). We’ve been seeing an uptick in crashes since SDK 44. I’m not able to reproduce but they appear on the Google Play Console and appear to be happening more than they were on 44.

Has anyone else seen this?

I’m actually seeing that first error produced on Samsung devices running Android 12 and appears to only happen when first installed.

Set up a new app, added my original dependencies and working myself up. Able to reproduce the crash with limited FE logic.

Dependency List:

{
  "name": "expo-demo",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@expo/react-native-action-sheet": "^3.13.0",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/datetimepicker": "6.1.2",
    "@react-native-picker/picker": "2.4.0",
    "@react-navigation/bottom-tabs": "^6.3.1",
    "@react-navigation/drawer": "^6.4.1",
    "@react-navigation/native": "^6.0.10",
    "@react-navigation/stack": "^6.2.1",
    "expo": "~45.0.0",
    "expo-app-loading": "~2.0.0",
    "expo-camera": "~12.2.0",
    "expo-constants": "~13.1.1",
    "expo-file-system": "~14.0.0",
    "expo-firebase-analytics": "~7.0.0",
    "expo-font": "~10.1.0",
    "expo-haptics": "~11.2.0",
    "expo-image-manipulator": "~10.3.1",
    "expo-image-picker": "~13.1.1",
    "expo-intent-launcher": "~10.2.0",
    "expo-linking": "~3.1.0",
    "expo-localization": "~13.0.0",
    "expo-location": "~14.2.2",
    "expo-secure-store": "~11.2.0",
    "expo-splash-screen": "~0.15.1",
    "expo-status-bar": "~1.3.0",
    "expo-system-ui": "~1.2.0",
    "expo-updates": "~0.13.2",
    "firebase": "^9.8.3",
    "i18n-js": "^3.9.2",
    "jest": "^26.6.3",
    "jwt-decode": "^3.1.2",
    "moment": "^2.29.3",
    "prop-types": "^15.8.1",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-native": "0.68.2",
    "react-native-gesture-handler": "~2.2.1",
    "react-native-get-random-values": "~1.8.0",
    "react-native-maps": "0.30.2",
    "react-native-reanimated": "~2.8.0",
    "react-native-safe-area-context": "4.2.4",
    "react-native-screens": "~3.11.1",
    "react-native-web": "0.17.7",
    "react-native-webview": "11.18.1",
    "react-navigation-header-buttons": "^9.0.1",
    "react-redux": "^8.0.2",
    "redux": "^4.2.0",
    "redux-thunk": "^2.4.1",
    "uuid": "^3.4.0",
    "expo-web-browser": "~10.2.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}

expo: 45.0.0
react-native: 0.68.2
react-native-reanimated: 2.8.0

I provided these details in the linked GitHub issue. This issue appears to be tied to react-native-reanimated (a dependency of React Navigation 6 for us). If I remove the package the issue appears to stop. It is affecting Samsung devices running Android 12.

I think the next step here is to at least see if Expo SDK 46 running RN 0.69.0 or greater alleviates this issue.

I had created a test Expo app to evaluate. Please see code below:

{
  "name": "expo-demo",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@react-navigation/native": "^6.0.10",
    "@react-navigation/stack": "^6.2.1",
    "expo": "~45.0.0",
    "expo-splash-screen": "~0.15.1",
    "expo-status-bar": "~1.3.0",
    "expo-updates": "~0.13.2",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-native": "0.68.2",
    "react-native-reanimated": "~2.8.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}
// App.js

import * as SplashScreen from 'expo-splash-screen';
import React, { useEffect, useState } from 'react';
import RootNavigator from './src/navigation/RootNavigator';

export default function App() {
  const [appIsReady, setAppIsReady] = useState(false);

  useEffect(() => {
    async function initApp () {
      try {
        await SplashScreen.preventAutoHideAsync();
      } catch (e) {
        console.log(e);
      } finally {
        setAppIsReady(true);
      }
    }

    initApp();
  }, []);

  if (!appIsReady) {
    return null;
  }

  return (
    <RootNavigator />
  );
}
// RootNavigator.js

import * as SplashScreen from 'expo-splash-screen';
import React, { useEffect, useState } from 'react';
import RootNavigator from './src/navigation/RootNavigator';

export default function App() {
  const [appIsReady, setAppIsReady] = useState(false);

  useEffect(() => {
    async function initApp () {
      try {
        await SplashScreen.preventAutoHideAsync();
      } catch (e) {
        console.log(e);
      } finally {
        setAppIsReady(true);
      }
    }

    initApp();
  }, []);

  if (!appIsReady) {
    return null;
  }

  return (
    <RootNavigator />
  );
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.