expo: [SDK 48][expo-updates] Could not read embedded manifest; java.io.FileNotFoundException: app.manifest
Minimal reproducible example
"expo": "^48.0.1",
"expo-dev-client": "~2.1.1",
"expo-modules-core": "~1.2.1",
"expo-updates": "~0.16.1",
Summary
After updating to SDK 48, my release builds are throwing this error in logcat. Seems related to #19721 #19693 #19624
java.lang.AssertionError: The embedded manifest is invalid or could not be read. Make sure you have configured expo-updates correctly in android/app/build.gradle. app.manifest
at vh.b.a(EmbeddedManifest.kt:102)
at th.i.x(LoaderTask.kt:39)
at th.i.D(LoaderTask.kt:106)
at expo.modules.updates.b.P(UpdatesController.kt:132)
at expo.modules.updates.b$a.b(UpdatesController.kt:22)
at expo.modules.updates.UpdatesPackage$b.g(UpdatesPackage.kt:19)
at be.f.createReactInstanceManager(ReactNativeHostWrapperBase.kt:23)
at com.facebook.react.w.b(ReactNativeHost.java:10)
at com.cams.cams_app.MainApplication.onCreate(MainApplication.java:12)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1277)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6759)
at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2133)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Environment
expo-env-info 1.0.5 environment info:
System:
OS: macOS 13.2.1
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.15.0 - ~/.asdf/installs/nodejs/16.15.0/bin/node
Yarn: 1.22.19 - ~/Documents/GitHub/CAMS_App/node_modules/.bin/yarn
npm: 8.5.5 - ~/.asdf/plugins/nodejs/shims/npm
Watchman: 2023.01.30.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /Users/thespacemanatee/.asdf/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
IDEs:
Android Studio: Giraffe 2022.3.1 Canary 4 Giraffe 2022.3.1 Canary 4
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
npmPackages:
expo: ^48.0.1 => 48.0.1
react: 18.2.0 => 18.2.0
react-native: 0.71.3 => 0.71.3
Expo Workflow: bare
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 9
- Comments: 19 (5 by maintainers)
Commits related to this issue
- Fix manifest build error https://github.com/expo/expo/issues/21238#issuecomment-1638450974 — committed to 75grand/app by jxxe a year ago
Thank you very much, you are completely right!!
Following your instructions and the documentation I ran
eas update:configure
which added theupdates.url
key.It immediately fixed the crash on my end.
But, this sentry documentation require to install
expo-updates
, but doesn’t mention thateas update:configure
is required, which is misleading. If my assumptions are correct, maybe we should open an issue/PR to update this documentation?https://docs.expo.dev/guides/using-sentry/
I had to install expo updates to my project because of sentry update on Expo 48, maybe you’re experiencing the same issue that I was. I installed expo-updates, but didn’t configured anything at all, that was my mistake… If you install expo-updates in your project, even though you’re not using it, you must at least configure a link to updates in app.json like this :
“updates”:{ “url”: “https://…” }
This url you’ll find in your android manifest in the property EXPO_UPDATE_URL. It was created automatically when installed expo-updates to your project as I understood.
The moment that I did this I had no more problems.
Hello
I encountered the same issue. I am still using the classic updates system.
I fixed the error by adding
useClassicUpdates: true
in the expo config, in theupdates
fieldI encounter the same problem with SDK 49.
Yeah… I mean, they should at least mention that expo-updates require some configurations… Sentry’s documentation only says that it deppends on expo-updates and some other libs… And that’s all… I spent almost a whole day to figure that expo-updates was in lack of configurations, since I don’t use it…
After upgrading to SDK 49, same manifest error with expo-updates.
EDIT: I have the same bug on SDK 48 now.
On SDK 48, a previous version of my app was working fine. The new version isn’t working anymore. The “only” applicable change between the two versions I think is:
In my
package.json
. Could it be it? I haveexpo-updates
installed but no specific configurations. I also use sentry.Playstore is alerting me about this :
java.lang.AssertionError: The embedded manifest is invalid or could not be read. Make sure you have configured expo-updates correctly in android/app/build.gradle.
Also my app is not opening after downloading it in playstore, It only works if a build it and download directly from expo build 😕
Also having this issue while trying to run the .apk file generated from EAS.
I realized that the
eas build --profile preview --platform android
command make these changes in theAndroidManifest.xml
fileThe build runs fine in both the simulator and IOS, tho.
@tylercote I did not. There’s no easy way to reproduce it either so I guess we are stuck since the expo team won’t work on it unless more people make noise.
FYI
sentry-expo@7.0.1
removed the dependency onexpo-updates
- see https://github.com/expo/sentry-expo/pull/356Did you configured any link for updates in app.json like this :
?