expo: Upgraded to SDK 49 and I get 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 on EAS built APK
Minimal reproducible example
Summary
I upgraded to SDK 49 and I get this error in the ADB logs from the Android app built with EAS:
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
This is my app.json:
{
"expo": {
"name": "101 Soundboards",
"slug": "sb-soundboards-all",
"privacy": "public",
"platforms": [
"ios",
"android",
"web"
],
"version": "110.0.0",
"orientation": "default",
"icon": "./assets/icon-android-512.png",
"splash": {
"image": "./assets/splash-dark-mode.png",
"resizeMode": "contain",
"backgroundColor": "#212529"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "sb.soundboards.all",
"buildNumber": "110.0.0",
"backgroundColor": "#212529",
"icon": "./assets/icon-ios-1024.png",
"isTabletOnly": false
},
"android": {
"package": "sb.soundboards.all",
"versionCode": 110,
"blockedPermissions": [
"android.permission.WRITE_EXTERNAL_STORAGE"
],
"config": {},
"intentFilters": [
{
"action": "VIEW",
"data": [
{
"scheme": "https",
"host": "*.101soundboards.com",
"pathPrefix": "/boards/"
}
],
"category": [
"BROWSABLE",
"DEFAULT"
]
}
]
},
"androidNavigationBar": {
"backgroundColor": "#212529"
},
"scheme": "sb101",
"hooks": {
},
"extra": {
"eas": {
"projectId": "dbac0ffc-934b-4b3d-97d3-972000582278"
}
},
"plugins": [
]
}
}
Environment
expo-env-info 1.0.5 environment info:
System:
OS: Windows 10 10.0.19045
Binaries:
Node: 18.16.0 - C:\Program Files\nodejs\node.EXE
npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: AI-222.4459.24.2221.10121639
npmPackages:
expo: ^49.0.0 => 49.0.3
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.72.3 => 0.72.3
react-native-web: ~0.19.6 => 0.19.6
Expo Workflow: managed
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 10
- Comments: 22 (6 by maintainers)
I managed to get it working by:
expo-updatesto version0.18.11(npx expo install expo-updates) andeas-clito version3.17.0(npm install -g eas-cli).eas update:configure, and copied the missing configuration to theapp.json. In my case, it ended like this:eas build:configure. In my case myeas.jsonwas OK, but check yours.expo-updatesto your plugins inapp.json:@manuelmhtr and @sem4phor solution didn’t work for me, still facing this error.
I resolved this issue, removing
expo-updatesfrom dependenciesCan confirm that this was crashing before initialising it with
eas update:configureand now it’s working 😃To disable updates in the time you do not want to use that feature yet (
app.json):Same error for me, just consumed 5/30 build for this problem!
Looking at https://github.com/expo/sentry-expo/pull/356, the expo-updates dependency was removed in sentry-expo 7.0.1.
We can update the documentation to remove expo-updates as a dependency in the setup.
In a nutshell, if expo-updates is installed it needs to have some configuration. But we removed the need to install expo-updates for sentry-expo. So you should be able to remove expo-updates if you’re not using it.
@azizsaad there’s no need to set the username. According to the documentation, EAS configures it automatically.
Other this I did but didn’t mention because I think they are not related (but may be worth the try) are:
releaseChanneltochannelineas.jsonyarn upgradeHope it helps!
Hey @wschurman 👋
Thanks for the update! I just ran into this issue in a managed expo project of mine, following an upgrade to Expo SDK 49.
We weren’t actively using the legacy
expo-updatesmodule, it had only been added as a dependency due to thesentry-exposetup guide. After removingexpo-updatesfrom the package.json, replacing references ofConstants.manifestwithConstants.expoConfigand also removing anyexpo-updatesconfig properties from theapp.json&eas.jsonfiles, I no longer encountered the issue described here. 🎉The answer of @manuelmhtr is perfect. Thanks
Switching from the classic expo-updates to eas-update fixed this for me in production
Possible workaround
Got the app working by using
expo@49.0.6,expo-updates@0.18.11,sentry-expo@7.0.1, and by adding the following topackage.jsonas suggested here:The app has been running in production for about a week and Sentry seems to work as expected.
Recipe for reproducing crash on Android
expo-updateas a side dependency)expo-updatesFor the record here is the stacktrace from Logcat:
I removed sentry-expo and expo-updates and the Android build worked.
Possibly related to https://github.com/expo/expo/issues/23382. Suspected cause is unconfigured expo-updates which can happen after setting up sentry-expo which mandates expo-updates as a side dependency. Have an app which where this happens as well. Have so far only been able to reproduce in an app built with EAS Build in release mode (no Expo Go).