Getting 'java.lang.NullPointerException' after opening a blank project created by 'expo init'

The following error occurs after opening a project in Expo Go app (Android) using QR code scan. The app crashes and I get to see the more detailed error from Android’s native ‘Expo Go keeps stopping’ dialog.

stacktrace:
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean expo.modules.updates.manifest.raw.RawManifest.isDevelopmentMode()' on a null object reference at host.exp.exponent.experience.ExperienceActivity.c(ExperienceActivity.java:1)

The app, cli and SDK should all be latest versions.

In fact the project I’m working on stopped working only after I updated Expo Go from the Play Store. After that I tried to update the cli and SDK to the latest ones as well. However, the problem seems to now occur even for a blank project created by ‘expo init’.

  • “expo”: “~42.0.0”
  • Client version: 2.21.4
  • expo-cli@4.7.3

I’ve tried to reinstall Expo Go app many times.

Device is OnePlus3.

Figured this out.

Expo Go on iPhone didn’t crash and was able to display an error message: “The network connection was lost”.

So this was caused by a network problem after all. The app wasn’t running on its default port 19000 due to my flawed port forwarding.

I think the Android app should be able to handle the situation as well and display appropriate error message.

Thanks for following up with the solution, @pjk!

I’m seeing the same crash, but I can’t find anything wrong with my network connection. Neither LAN nor Tunnel work.

Edit: same stack trace, but it doesn’t happen with the blank project. May be a different issue.

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