Expo app - built apk crashed after splash screen

I build an apk using expo build:android -t apk command and the built was successful. However, the apk installed on my device crashed on Splash Screen.

It works on development and staging mode though.
When I switched to production mode, the app crashed just like the one for apk and I got this error. I can’t find which file the error came from as it is not clearly stated.

TypeError: undefined is not an object (evaluating 'B.map')

This error is located at:
    in P
    in RCTView
    in View
    in C
    in Unknown
    in Unknown
    in Unknown
    in Unknown
    in RCTView
    in View
    in RCTView
    in View
    in RCTView
    in View
    in ForwardRef
    in RCTView
    in View
    in k
    in ForwardRef
    in PanGestureHandler
    in Unknown
    in RCTView
    in View
    in k
    in ForwardRef
    in RCTView
    in View
    in G
    in Unknown
    in RCTView
    in View
    in Unknown
    in RCTView
    in View
    in Unknown
    in w
    in h
    in Unknown
    in RCTView
    in View
    in G
    in Unknown
    in xe
    in Unknown
    in Unknown
    in Unknown
    in Unknown
    in RCTView
    in View
    in RCTView
    in View
    in V
    in RCTView
    in View
    in c
    in RCTView
    in View
    in RCTView
    in View
    in AnimatedComponent(View)
    in RCTView
    in View
    in AnimatedComponent(View)
    in PanGestureHandler
    in Unknown
    in le
    in Unknown
    in RCTView
    in View
    in Unknown
    in Unknown
    in qe
    in Unknown
    in Unknown
    in Unknown
    in Unknown
    in RCTView
    in View
    in RCTView
    in View
    in RCTView
    in View
    in ForwardRef
    in RCTView
    in View
    in k
    in ForwardRef
    in PanGestureHandler
    in Unknown
    in RCTView
    in View
    in k
    in ForwardRef
    in RCTView
    in View
    in G
    in Unknown
    in RCTView
    in View
    in Unknown
    in RCTView
    in View
    in Unknown
    in w
    in h
    in RNCSafeAreaProvider
    in Unknown
    in Unknown
    in RCTView
    in View
    in G
    in Unknown
    in Unknown
    in ForwardRef
    in Unknown
    in ForwardRef
    in ut
    in c
    in h
    in RCTView
    in View
    in Unknown
    in Unknown
    in S
    in Unknown
    in RCTView
    in View
    in RCTView
    in View
    in C

I’m thinking this might be the cause of app crash in the apk version. Any help and explanation is very much appreciated.

it looks like you are calling map on a variable that is undefined. if you’re unable to trace down the cause, see https://expo.fyi/manual-debugging for tips on a more brute force approach

Ok, the issue is solved by changing some data passing from the backend and I can run on production mode.

But my apk still crashes despite having that solved.
Here’s the error from logcat:

I’ve checked the environment variables there seem to be no issue. In fact, we have been using the same logic for our previous standalone releases. The format is exactly like so https://medium.com/@peterpme/environment-variables-in-expo-using-release-channels-4934594c5307

Solutions that I’ve tried:

  • updated packages
  • removed splash screen as some suggest
  • commented out OTA feature
  • edited environment variable files

None of these solutions worked so far. Looking for new suggestions on how to fix this…

you could try adding sentry or bugsnag to your app to get the full symbolicated error trace

It is added in our app but there seems to be no error reported

maybe it’s not properly configured?

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.