Crashes on production build

Please provide the following:

  1. SDK Version: 38
  2. Platforms(Android/iOS/web/all): Android / iOS

Hi,

I release my app via expo build:ios using expo service create certs, ipa etc. I uploaded the ipa via Transporter app to the iTunes Connect, and started an Internal Testing. When launching app it crashes on launch, I see only the splash screen and it crashes. I send crash to iTunes Connect but it’s empty, even BugSnag can’t catch the error.

How can I debug this, or what possible can go wrong?

After I found this useful command expo start --minify --no-dev I can see the error however it doesn’t make sense.

I already have "expo-constants": "~9.1.1" installed and using it in multiple places like this.

For example:

import Constants from "expo-constants";

const styles = StyleSheet.create({
  container: {
    alignContent: "center",
    alignItems: "center",
    backgroundColor: colors.danger,
    height: 80,
    justifyContent: "center",
    marginVertical: Constants.statusBarHeight,
    width: "100%"
  },
  text: {
    color: colors.white,
  },
});

Ahh my bad, I’ve really found that I’ve missed import it but why it doesn’t crash on dev env? why only production.

Hey @kodart,

It should just show a red error screen in development. In production apps it should crash. These are the expected behaviors as you don’t want your users to see a confusing red error stacktrace.

Cheers,
Adam

Hi Adam,

Right but as a developer I should get a crash report… Anyway, with above method I could get it.

Thanks!