TypeError: undefined is not an object (evaluating 'e.items.length')
at anonymous (index.android.bundle:1:284133)
You uploaded source maps, yet the stack still says line 1. On Hermes/Expo it's almost always one of three things.
1. The map isn't composed
Metro maps sources → bundle. Hermes maps bundle → bytecode offsets. A Hermes map alone takes you back into generated JS. Compose them Metro first, Hermes second:
node node_modules/react-native/scripts/compose-source-maps.js \
index.android.bundle.packager.map index.android.bundle.hbc.map \
-o index.android.bundle.map
Android Gradle Hermes builds usually do this for you (keep the final map from the release variant, not .packager.map/.hbc.map). On iOS, set SOURCEMAP_FILE before react-native-xcode.sh runs. In EAS, do that through a config plugin, because a post-build hook is too late. For EAS Update, use npx expo export --source-maps and keep the maps from that exact export.
2. The release identifies the app, not the bundle
release: "1.0.0" breaks the moment you ship an OTA update. The native version is the same, but the JS and the map are different. Use one release per JS bundle: native version plus an embedded build ID, or the platform Updates.updateId (not the update-group ID). Never reuse a release when the JS changes. Keep Android and iOS separate in your tracker, because the same release has a different bundle on each.
3. The bundle URL doesn't match
Embedded bundles are index.android.bundle and main.jsbundle. OTA bundles may have hashed internal paths. Read the actual sourceURL from a real release stack and upload the map under that name. Don't assume it's your export filename.
Checklist
- [ ] Composed map (Metro → Hermes)
- [ ] Release per JS bundle, separate per platform
- [ ] Bundle URL checked against a real stack
- [ ] Map uploaded from the exact build/export you shipped (e.g. from the
eas-build-on-successnpm hook)
Native crashes need native symbol files and are a different problem. Everything here is about JS errors.
This article was written with the help of AI and reviewed by the author.
Top comments (0)