Search code examples
react-nativeexpoexpo-go

Debugging application not starting in Expo Go


I'm working on a mobile / web application using React Native with Expo. The last couple of weeks I've been focusing on the web version which is running fine on my local browser.

Now I am trying to run it in the Expo Go app on Android, but it won't start. The developer tools shows a proper log line 'Android bundling complete' but the application is not appearing in the Expo Go app.

It is showing the 'splash screen' and no interactions are possible, shaking the device for triggering the development menu on the mobile device doesn't work either.

Any tips how to debug this issue? The developer tools acts like everything is fine and no error is appearing in the Expo go app.

Expo go splashscreen

Not sure if it is relevent, but these are my dependencies:

{
  "name": "Wonderfully",
  "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",
    "test": "jest --watchAll"
  },
  "dependencies": {
    "@expo/vector-icons": "^12.0.5",
    "@react-native-async-storage/async-storage": "~1.15.14",
    "@react-native-community/masked-view": "0.1.11",
    "@react-navigation/bottom-tabs": "^6.0.9",
    "@react-navigation/drawer": "^6.1.8",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/native-stack": "^6.2.5",
    "@react-navigation/stack": "^6.0.11",
    "@use-expo/font": "^2.0.0",
    "base-64": "^1.0.0",
    "expo": "~44.0.3",
    "expo-asset": "~8.4.5",
    "expo-constants": "~13.0.0",
    "expo-font": "~10.0.4",
    "expo-linear-gradient": "~11.0.0",
    "expo-linking": "~3.0.0",
    "expo-splash-screen": "~0.14.1",
    "expo-status-bar": "~1.2.0",
    "expo-updates": "^0.11.3",
    "expo-web-browser": "~10.1.0",
    "moment": "^2.29.1",
    "native-base": "^3.2.2",
    "react-dom": "^17.0.2",
    "react-native": "0.64.3",
    "react-native-gesture-handler": "~2.1.0",
    "react-native-image-slider-box": "^1.1.14",
    "react-native-reanimated": "~2.3.1",
    "react-native-safe-area-context": "^3.3.2",
    "react-native-screens": "~3.10.1",
    "react-native-svg": "12.1.1",
    "react-native-swiper": "^1.6.0",
    "react-native-web": "^0.17.5",
    "react-redux": "^7.2.6",
    "redux": "^4.1.2",
    "redux-logger": "^3.0.6",
    "redux-persist": "^6.0.0",
    "redux-thunk": "^2.4.1"
  },
  "devDependencies": {
    "@babel/core": "^7.16.5",
    "@types/react": "~17.0.38",
    "@types/react-native": "~0.66.10",
    "babel-plugin-react-native-web": "^0.17.5",
    "babel-preset-expo": "~9.0.2",
    "jest-expo": "~44.0.1",
    "redux-devtools": "^3.5.0",
    "redux-mock-store": "^1.5.4",
    "typescript": "~4.5.4"
  },
  "private": true,
  "jest": {
    "preset": "jest-expo"
  }
}

Index.js which hasn't been touched for a long time:

import { createStore, applyMiddleware } from 'redux'
import thunkMiddleware from 'redux-thunk'
import { createLogger } from 'redux-logger'
import rootReducer from '../reducers/RootReducer'
import AsyncStorage from '@react-native-async-storage/async-storage';
import {jwt} from './jwt'
import React from 'react';
import { persistStore, persistReducer } from 'redux-persist';
 

const loggerMiddleware = createLogger()

const persistConfig = {
  key: 'primary',
  storage: AsyncStorage
};

const pReducer = persistReducer(persistConfig, rootReducer);
 const middleware = applyMiddleware(jwt, thunkMiddleware);
 const store = createStore(pReducer, middleware);
 const persistor = persistStore(store);

 export { persistor, store };

Solution

  • There are probably many possible causes for being stuck at the splash screen. I was able to fix the issue by comparing it with a minimal project and adding my functionality one by one.

    In my specific case is was related the module-resolver plugin in my babel.config.js. After removing the module-resolver from the config it was starting again.