Crash on startup if app is closed before splash screen.

Please provide the following:

  1. SDK Version: 40.0.1
  2. Platforms(Android/iOS/web/all): Android 10
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

Uncaught Error: Attempt to invoke virtual method ‘boolean’ on a null object reference

If the app is closed before fully loading, this error will occur
Problem occurs on a release apk as well, if the app is ended before splash loading, it will crash on next launch

See video and screenshot:


import * as React from 'react';
import { StyleSheet, Text, View, Button } from 'react-native';
import Animated from 'react-native-reanimated';
import BottomSheet from 'reanimated-bottom-sheet';

export default function App() {
  const renderContent = () => (
        backgroundColor: 'white',
        padding: 16,
        height: 450,
      <Text>Swipe down to close</Text>

  const sheetRef = React.useRef(null);

  return (
          flex: 1,
          backgroundColor: 'papayawhip',
          alignItems: 'center',
          justifyContent: 'center',
          title="Open Bottom Sheet"
          onPress={() => sheetRef.current.snapTo(0)}
        snapPoints={[450, 300, 0]}

With newly created expo project (app.json):

  "expo": {
    "name": "test_app",
    "slug": "test_app",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    "updates": {
      "fallbackToCacheTimeout": 0
    "assetBundlePatterns": [
    "ios": {
      "supportsTablet": true
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#FFFFFF"
    "web": {
      "favicon": "./assets/favicon.png"

This error is not related to the package BottomSheet from ‘reanimated-bottom-sheet’… the functionality works fine, it is an error with expo loading the reanimated package.
This occurs with other reanimated use cases

Through some research this may be related to Issue in expo 39 in start up in android sometimes or OTA updates but I’m not quite sure

Edit: this also may be related to the crash BaseExperienceActivity.lambda$consumeErrorQueue$0
at .(-java:2)

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