Android app fails to open with manifest error

My application is failing to open prod builds. The application builds completely fine with via: eas build --platform android. And it installs correctly also.

However when I run the application I get:

ava.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 expo.modules.updates.loader.EmbeddedLoader.readEmbeddedManifest(EmbeddedLoader.java:91)
	at expo.modules.updates.loader.LoaderTask.launchFallbackUpdateFromDisk(LoaderTask.java:232)
	at expo.modules.updates.loader.LoaderTask.start(LoaderTask.java:111)
	at expo.modules.updates.UpdatesController.start(UpdatesController.java:332)
	at expo.modules.updates.UpdatesController.initialize(UpdatesController.java:102)
	at expo.modules.updates.UpdatesPackage$1.createReactInstanceManager(UpdatesPackage.java:48)
	at expo.modules.ReactNativeHostWrapper.createReactInstanceManager(ReactNativeHostWrapper.kt:30)
	at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:39)
	at com.whiterosemaths.oneminutemathsks1.MainApplication.onCreate(MainApplication.java:63)
	at android.app.Instrumentation.callApplicationOnCreate(Unknown Source:0)
	at android.app.ActivityThread.handleBindApplication(Unknown Source:1021)
	at android.app.ActivityThread.-wrap1(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(Unknown Source:499)
	at android.os.Handler.dispatchMessage(Unknown Source:21)
	at android.os.Looper.loop(Unknown Source:152)
	at android.app.ActivityThread.main(Unknown Source:65)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(Unknown Source:11)
	at com.android.internal.os.ZygoteInit.main(Unknown Source:338)

I use a managed workflow, with eas-cli/0.33.1 darwin-x64 node-v16.4.2. My app.json is:

{
  "displayName": "1-Minute Maths",
  "expo": {
    "name": "1-Minute Maths",
    "slug": "One-Minute-Maths-KS1",
    "version": "1.0.8",
    "orientation": "portrait",
    "assetBundlePatterns": [
      "**/*",
      "**/**/*",
      "assets/images/*",
      "assets/fonts/*"
    ],
    "icon": "./assets/images/AppLogo.png",
    "splash": {
      "image": "./assets/images/splash.png",
      "resizeMode": "contain"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "com.whiterosemaths.oneminutemathsks1",
      "buildNumber": "1.0.8",
      "requireFullScreen": true
    },
    "android": {
      "permissions": [],
      "adaptiveIcon": {
        "backgroundImage": "./assets/images/AppLogoBackground.png",
        "foregroundImage": "./assets/images/AppLogoForeground.png"
      },
      "versionCode": 8,
      "package": "com.whiterosemaths.oneminutemathsks1"
    },
    "web": {
      "favicon": "./assets/favicon.png"
    }
  }
}

This has only started happening today. The first version 1.0.5 worked fine two days ago. Versions 1.0.6 - 1.0.8 all failed today.

Any help would be welcome

this should be resolved in [updates] Fix Android app.manifest not generated in onesignal integration by Kudo · Pull Request #14938 · expo/expo · GitHub (the title specifically refers to onesignal, which was a case where we were able to reproduce it, but another developer who this impacted who did not use onesignal confirmed that it indeed resolved the issue on his end too).

please ensure that you have expo-updates@0.10.6 installed in your app and try another build

Thank you for the quick response. I have just installed expo-updates@0.10.6 and I am trying it again now. I will let you know how it goes.

1 Like

I didn’t seem to work.
I ran: npm install expo-updates@0.10.6 and checked that “expo-updates”: “^0.10.6”,
was included in my package.json under dependencies. I then ran eas build --platform android .

I get the same error. Is there anything else I am meant to do?

My package.json file is:

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject",
    "test": "jest -t --bail"
  },
  "dependencies": {
    "@react-native-async-storage/async-storage": "^1.15.9",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/stack": "^6.0.11",
    "expo": "~43.0.0",
    "expo-av": "^10.1.2",
    "expo-status-bar": "~1.1.0",
    "expo-updates": "^0.10.6",
    "jest": "^27.3.1",
    "jest-expo": "^43.0.1",
    "prop-types": "^15.7.2",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-native": "0.64.2",
    "react-native-confetti": "^0.1.0",
    "react-native-responsive-fontsize": "^0.5.1",
    "react-native-web": "0.17.1",
    "react-test-renderer": "^17.0.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "jest": {
    "preset": "jest-expo",
    "transformIgnorePatterns": [
      "node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)"
    ]
  },
  "private": true
}

This only happens with eas builds. When I run expo build:android and build the apk, that installs fine and runs normally.

However I need to use the eas builds as I need my app to be ‘3+ family rated’ on Google.

do you have any custom config plugins in your project? can you share your build page?

No, there are no custom config plugins in the project

is looks like this is a yarn workspaces monorepo, can you verify this?

is there any chance you could share the repository with me on github so i can try to reproduce this? i’m brentvatne on github

This is actually a mixed workspace. I started out via npm, but then followed the instructions to configure the eas builds which then swapped to yarn. In the previous builds I only ran npm install and not yarn add.

I am no running a new build after running yarn add expo-updates@0.10.6. If this doesn’t work I will share my git repo.

i see! i would recommend removing package-lock.json everywhere. you should not use npm and yarn side by side in the same workspace

by the way, if you set the build type to apk you can test it without submitting to the play store – you can just install it directly to your device or emulator

Thanks for the tip, that will certainly speed things up. Unfortunately, only using Yarn still didn’t seem to fix the issue. I have just shared the repo with you. It is hosted on bitbucket. I am working off the eas-config branch.

i do have bitbucket but the website doesn’t appear to be working properly at the moment and it won’t let me sign in through google. if you can put it on github as a private repo and share it there it’d be much easier

No worries, I have created a GitHub repo and added you to that

thanks! i just looked at it and it doesn’t appear to be a monorepo. i’ll try to reproduce without it but i’m not sure that will work without the rest of the repository

i was able to reproduce this in my own monorepo app. we’ll have a fix soon

Fantastic, thank you!

give it another try, it should be resolved now

1 Like