Unhandled JS Exception:undefined is not an object(evaluating 'n.Mode')


I have a project build upon Expo, but when i run expo build:ios
(have all the certification, and running well on expo client)

after i have the IPA link, and downloaded to my iPhone,

the app just stopped working and display:
“Unhandled JS Exception:undefined is not an object(evaluating ‘n.Mode’)”

can somebody help me on this?

Hey @ctwol,

Does the stack trace point to anything in particular? You can try running expo start --no-dev --minify to recreate the production environment JS bundle.



Thanks for replying!

The situation is that: the app works fine when i expo start(both iOS and Android)

Then, when I ran “expo build:iOS”

Downloaded, add to iPhone by Apple configurator2

When I open the app, after loading screen
It shows

(Btw, I also ran “expo start --no-dev --minify”, and the app works fine in both emulator and real device). Also, when I trying to “expo build:ios -t simulator”, the app stopped in emulator like the picture above


Are you able to create an .apk file and test it? If so, digging into the device logs via USB debugging and Android Studio will provide a lot more insight.

Hi thanks for reply:

1, I’m able to generate .apk file and it works in both android emulator and real device

2, so everything works fine but its just when i generate the iPA file, the errors comes out. And when search the code ‘n.MODE’ within project folder, nothing being found.

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