expo: Can't create a working ios release build for ejected app.

🐛 Bug Report

I’ve already run expo publish. I think my manifest file may be invalid. How can I debug this and figure out what’s causing the issue? It works just fine in “debug” configuration.

Environment

Expo CLI 3.17.21 environment info: System: OS: macOS 10.15.4 Shell: 3.2.57 - /bin/bash Binaries: Node: 13.11.0 - ~/.nvm/versions/node/v13.11.0/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.13.7 - ~/.nvm/versions/node/v13.11.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman IDEs: Android Studio: 3.2 AI-181.5540.7.32.5056338 Xcode: 11.4/11E146 - /usr/bin/xcodebuild npmPackages: expo: ^37.0.0 => 37.0.3 react: ~16.9.0 => 16.9.0 react-native: ~0.61.5 => 0.61.5 react-navigation: ^2.18.2 => 2.18.3 npmGlobalPackages: expo-cli: 3.17.21

Steps to Reproduce

Creating release build in xcode.

Expected Behavior

App doesn’t crash on startup.

Actual Behavior

App crashes on startup with this error in xcode.

*** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘The embedded manifest is invalid. If you are making a release build for the first time, make sure you have run expo publish at least once.’

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 6
  • Comments: 42 (14 by maintainers)

Most upvoted comments

expo is killing me after ejecting. It’s like a crazy ex that doesn’t want to leave you alone.

I ejected from the managed workflow to the bare workflow and I get the exact same error when trying a release build on iOS. My release builds on Android also crash immediately. There I can observe the error E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2 in Android Logcat after running react native --variant=release.

My ios/<your-project-name>/Supporting/app.manifest as well as my ios/<your-project-name>/Supporting/app.bundle are just {} - two empty objects.

I read through all of the discussion here - I don’t have any publishBundlePath nor publishManifestPath in my app.json and of course no expokit package in my package.json.

Perhaps my problem is worth a separate issue?!


UPDATE: After updating expo-cli from 3.17.21 to 3.17.24 and running expo publish again, the app.manifest now has content and the iOS release build as well as the Android release build worked 🎉

Request: After spending almost 2 days on trying to resolve these release build issues: I was not aware that by ejecting from the managed workflow, I now have to deal with the package expo-updates and read through it’s embedded assets documentation to spot that I have to run expo publish. A guide with “stuff to do after ejecting from the managed workflow” would be awesome. I’d also be happy to kick-off/contribute to such a guide in the docs.

2 Questions:

  1. Do I have to run expo publish before every new release build of my app in order to create the app.manifest and app.bundle files?
  2. app.manifest and app.bundle are in the .gitignore file. Why? Shouldn’t I rather add them to version control after ejecting from the managed workflow to the bare workflow?

@Andruschenko - sorry for the confusion! we just released expo-updates a couple of weeks ago and in some cases the workflow isn’t as ergonomic or clear as it could be.

what currently happens

if you have not published yet, you will see this in your logs when you run a release build on ios:

2020-04-14 13:16:20.854086-0700 app[12622:156506] *** Terminating app due to
uncaught exception 'NSInternalInconsistencyException', reason: 'The embedded
manifest is invalid. If you are making a release build for the first time,
make sure you have run `expo publish` at least once.'

if you have not published yet, you will see this in your logs when you run a release build on android:

04-14 13:53:55.551 28158 28158 E AndroidRuntime: java.lang.AssertionError:
The embedded manifest is invalid or could not be read. Make sure you have
created app.manifest and app.bundle files and added them to the `assets`
folder. If you are using Expo CLI, make sure you have run `expo publish` or
`expo export` at least once. More information at
https://expo.fyi/embedded-assets

what we are working on

we are investigating changing expo-updates such that a bundle is created at the time when a build is performed, rather than requiring you to publish beforehand. @esamelson is working on this now.

how we will improve the clarity around the current process of creating release builds


to address your questions specifically:

  1. yes
  2. we recently decided that they should indeed be left out of the gitignore (https://github.com/expo/expo/commit/6c58775625b3b86764c54a6c70601c8c9ea0c68c) and templates were updated accordingly. so, feel free to remove those lines in your project

@brentvatne Thanks for your elaborate reply and @esamelson and your efforts to make the transition to the bare workfllow smoother.

The reason I spent 2 days on this is because I was first only attempting a release build on Android. Since I got very irritating errors I first suspected the issue to be unrelated to Expo and spent a lot of time of trying different fixes. When I finally attempted a release build on iOS, I quickly got to this issue here which helped me to finally resolve it - that being said, thanks for adding some information on eject about publishing before release builds.

I really enjoyed the managed workflow experience of Expo and am looking forward to using the bare workflow after this first hick-up. Keep up the great work!

PS I wanted to thank you for your active support on this and your follow up. I don’t know if you guys are on payroll or not but we really appreciate this project/package. Please keep up the great work.

My project name was changed in my app.json which meant that expo publish was creating a folder with that name and putting the manifest in there instead of the original package name of my XCode project. Changing the app.json name back to the old one did the trick and I was able to simply change my project name in XCode.

@Andruschenko - my bad, we actually do show a relevant error on android – i can see why you would have missed it though because i did too. android logs scroll by so fast đŸ˜