Please provide the following:
- SDK Version: 42 and 43
- Platforms(Android/iOS/web/all): iOS (maybe others too)
- This is a normal build. Not bare metal.
I’ve been build an app for several months and everything was going fine. Suddenly, I published a new version of my app that crashed immediately after launch. I tore it down all the way to a minimal example here: GitHub - trevorallred/expo-amplify
What’s happening? I’m seeing different behaviors but I think they’re all related.
- Running inside a native app from the apple app store. The app crashes on launch.
- Running a published app inside Expo Go, the app keeps downloading updates in a loop - Expo
- Running a minimal app (see code above from Github) inside Expo Go, the app doesn’t update but it also never gets past the splash page. Updates aren’t turned on.
- Running from Expo Go with Production Mode on phone or on Simulator, the app loops on updates or doesn’t load depending on whether or not updates are turned on.
I don’t get any sort of logging or hint at what’s wrong. The app just crashes. However, everything works perfectly fine in development mode.
The offending code is aws-amplify. It’s a massive library and includes aws SDK too, which is almost as big. I did see one time that “aws-amplify”: “4.3.4” started including 2 different versions of graphql (14.0 and 14.5), which you’re not supposed to do. Version 4.3.4 was released a few days before my changes and would totally explain the error. However, when I revert to a previous version 4.3.3, 4.3.2 or even 4.2, the problem doesn’t go away. I also updated from Expo 42 to 43 and still no change. I’ve also tried this on 2 different computers, cleared node_modules, and still get the above crashes in production. Again it always works fine in Dev mode.
I’m going to move away from Amplify given its bloated size. The problems all go away what I do that.
But here’s the real question…
How can I troubleshoot crashes that only occur in production? The app launches and then doesn’t. There’s not log stack trace. No warning. Nothing. Even Sentry didn’t pick up the crash.
My concern here is that I replace Amplify and then some other library causes an unknown issue that can’t be debugged. What do I do?