React Native / EXPO / iOS Simulator Stuck @ 'Downloading Javascript Bundle 100%'

Viewed 1507

A week ago, I installed a new package and my iOS simulator was working just fine but all of a sudden it stopped loading. I was running into 'font family' issues due to the use of Material Icons and Expo. I remember trying to open up the project on Xcode, but found a different solution that didn't require Xcode. I think maybe opening up the project in Xcode may have done something?

Here are things I've tried to do to fix this issue:

  • Erase 'Content and Settings' in the options for iOS sim.
  • Checking out to Master, Checkout out to master from weeks ago
  • Reverting all changes and uninstalling package
  • Taking care of CreateChannelAndroidAsync yellow error (it was the only error that popped up but is unrelated)
  • Cleared ALL the Things: watchman watch-del-all && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
  • Deleting and Reinstalled XCode
  • Branch works fine on my coworker's mac.
  • Haven't tried: creating a new project. This is what I'm going to do next.

Any recommendations on where to go from here?

1 Answers

In my App.js, I had my loadAsyncs function running like this:

async _loadAssetsAsyncIos() {

    let loadFonts = await Expo.Font.loadAsync({
      Lato: require("./static/fonts/Lato-Regular.ttf"),
      LatoBold: require("./static/fonts/Lato-Bold.ttf"),
      Arial: require("./static/fonts/arial.ttf"),
      'Material Icons': require('@expo/vector-icons/fonts/MaterialIcons.ttf')
    });

    let loadImages = await preloadImages.map(image => {
      Expo.Asset.fromModule(image).downloadAsync()
    })

    let location = await getDeviceLocation()

    Promise.all([ loadFonts, loadImages, location ]).then((resp) => {
      return
    })
  }

I commented out the let location and within the Promise, I removed location and now it's working!

It had to do with Location Services.

Related