Base
MobileReact nativeExpo

RN Troubleshooting

General

App Keeps Crashing

Various Possibilities:

  • Check if the adaptiveIcon size / color is already following guideline or not
  • Check if the splash image already following guideline or not

Android

  • Clean gradle cache

    cd android
    ./gradlew clean
    cd ../
     
    // then retry build

    if still persist:

    rm -rf android
    yarn prebuild
    yarn android
  • [Expo] update latest version: npx expo install --check

  • [Network] Try to change wifi network (sometimes some ISP block some resource url)

[Development Builds] Static Env through Expo Constants Extra

Whenever values in expo constants extra is updated, we must:

  1. run prebuild AND clean to make sure it loads current values.

    yarn prebuild --platform android --clean
  2. Then rebuild the development build

    yarn android

iOS

[Prebuild and Run Development Build Issue] Can't find node

or:

  • iOS Release build from XCode fails at "[CP-User] [Hermes] Replace Hermes for the right configuration, if needed" step after adding a package

resolution:

  • edit ios/.xcode.env.local:
    export NODE_BINARY=$(which node)

References:

PhaseScriptExecution failed with a nonzero exit code

  • edit ios/.xcode.env:

    export NODE_BINARY=<<exact_node_binary_location_not_the_command_which_node_or_else>>
    <!-- export NODE_BINARY=/Users/nathan/.nvm/versions/node/v18.18.0/bin/node -->

Debugging EAS Local Build

Set EAS_LOCAL_BUILD_SKIP_CLEANUP=1 and see xcode logs

References:

Signing Issue

a. Open keychain access (open spotlight, search Keychain Access) b. under login > My Certificates, delete all Apple Distribution: ... certificates

References: