No app.manifest or app.bundle present

hey! it looks like you’re using expo-updates@0.2.7, the embedded assets article you linked to above applies to older versions. this article explains how it works in 0.2.7: Over-the-air updates from Expo are now even easier to use! | by Eric Samelson | Exposition

if it’s unclear from reading that what needs to be done, please try creating a new app with expo init and choose bare workflow, then compare the resulting files with your app. also see the expo-updates readme: expo/README.md at master · expo/expo · GitHub

Everything looks identical. I noticed an error produced by my my IDE’s debugger:

A problem occurred evaluating project ':app'.
Could not read script '/Users/user/myProject/node_modules/expo-updates/scripts/create-manifest-android.gradle' as it does not exist.

It does exist, however.

Screen Shot 2020-06-05 at 5.18.58 PM

try doing a release build in the new project you created for comparison, yarn android --variant Release - if that gives you the same error then you will know something is wrong on a system level vs project level. if it works, then you may be missing some part of the config

Yeah, that test ran without error… let me do some digging.

I have scoured every inch of code and compared everything to the test build you asked me to spin up and can’t find the root cause.

When I run react-native run android I get the error from the OP.

When I run yarn android --variant Release I get an Invariant Violation that application "main" has not been registered.

I went through several troubleshooting steps for that error to no avail. I didn’t change anything about the name configuration in MainApplication.java or MainActivity.java

Either way, the app crashes on startup.

can you share the project with me on github? brentvatne

my guess is that this step wasn’t done:

so i would compare android/app/build.gradle in a new project with your existing one

Unfortunately, that’s not the case. My configuration is correct (followed from the docs).

Sorry, I can’t share the full project due to NDA restrictions. I can share Gists though of specific files.

I got it running!

There was an @Override from some other package in my MainApplication.java that was disallowing some packages from bundling.

This is the code that was present:

return Arrays.<ReactPackage>asList(
        new MainReactPackage(),
        new StripeReactPackage()
      );

This is the code that should be there:

List<ReactPackage> packages = new PackageList(this).getPackages();
      packages.add(new ModuleRegistryAdapter(mModuleRegistryProvider));
      return packages;
1 Like

Even though I have this. I am still facing this error. Could anyone help?

@pratikkataria - create a new bare project with expo init and compare the android files with those in your project

Ah I’ve come too far in my current project to compare right. Anyway, a part of the problem got fixed once I ran expo update. I say a part because I don’t have problems with the built apk using expo build:android or even using barcode of expo start. But can’t get npm run android to work directly on my emulated device.

it sounds like… you have a managed project and not a bare project? so i’m not sure why you would see the error mentioned in this thread

I am new to expo terminology. I believe I’ve managed project - never ejected. I was trying to make react-native run-android work which made me encounter this error. I caught the error in Logcat of Android Studio. 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.

I’ve ran expo publish after which I was able to figure out about expo build:android that built a working .apk.

you wouldn’t use react-native run-android in a managed project. run expo start —android or yarn android. if you have ios and android directories in your project then it’s a bare project as in we don’t manage the native projects for you. you can remove those if you don’t use them

1 Like

Thanks for making it clear for me. I was unnecessarily going through android project and making changes.

Hi, I am going through the same situation after an expo eject. The app builds and it gets installed in the android emulator but it fails to open with " java.io.FileNotFoundException: app.manifest".

I have already fixed several issues but in this case, I can see that the eject command did everything that was expected. I even compared the output of an expo init bare workflow project and I see no differences in the key sections. I have ejected 20 days ago and I have now hit this major roadblock. Please help. I am on “expo-updates”: “~0.2.0” and currently locked to “version”: “0.2.14”. See screenshots below, everything seems to be OK, with the exception of a config file in expo-udpates that VSCode is flagging as with errors. That referenced “expo-module-scripts/tsconfig.base” file does not exist in my node_modules, but not sure if this is missleading. Any help will be greatly appreciated.

android/app/build.gradle

android\app\src\main\java\com\lemmonet\contentcreators\MainApplication.java

node_modules\expo-updates\tsconfig.json

adb logcat *:E -T 100 (when openning the app in the emulator)
08-25 01:54:39.195 22038 26859 E ActivityThread: Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded
08-25 01:54:42.068 27779 27779 E EmbeddedLoader: Could not read embedded manifest
08-25 01:54:42.068 27779 27779 E EmbeddedLoader: java.io.FileNotFoundException: app.manifest
08-25 01:54:42.068 27779 27779 E EmbeddedLoader:        at android.content.res.AssetManager.nativeOpenAsset(Native Method)
08-25 01:54:42.068 27779 27779 E EmbeddedLoader:        at android.content.res.AssetManager.open(AssetManager.java:744)
08-25 01:54:42.068 27779 27779 E EmbeddedLoader:        at android.content.res.AssetManager.open(AssetManager.java:721)
08-25 01:54:42.068 27779 27779 E EmbeddedLoader:        at expo.modules.updates.loader.EmbeddedLoader.readEmbeddedManifest(EmbeddedLoader.java:73)
08-25 01:54:42.068 27779 27779 E EmbeddedLoader:        at expo.modules.updates.UpdatesController.start(UpdatesController.java:285)
08-25 01:54:42.068 27779 27779 E EmbeddedLoader:        at expo.modules.updates.UpdatesController.initialize(UpdatesController.java:96)
08-25 01:54:42.068 27779 27779 E EmbeddedLoader:        at com.lemmonet.contentcreators.MainApplication.onCreate(MainApplication.java:85)
08-25 01:54:42.068 27779 27779 E EmbeddedLoader:        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
08-25 01:54:42.068 27779 27779 E EmbeddedLoader:        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
08-25 01:54:42.068 27779 27779 E EmbeddedLoader:        at android.app.ActivityThread.access$1100(ActivityThread.java:199)
08-25 01:54:42.068 27779 27779 E EmbeddedLoader:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
08-25 01:54:42.068 27779 27779 E EmbeddedLoader:        at android.os.Handler.dispatchMessage(Handler.java:106)
08-25 01:54:42.068 27779 27779 E EmbeddedLoader:        at android.os.Looper.loop(Looper.java:193)
08-25 01:54:42.068 27779 27779 E EmbeddedLoader:        at android.app.ActivityThread.main(ActivityThread.java:6669)
08-25 01:54:42.068 27779 27779 E EmbeddedLoader:        at java.lang.reflect.Method.invoke(Native Method)
08-25 01:54:42.068 27779 27779 E EmbeddedLoader:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
08-25 01:54:42.068 27779 27779 E EmbeddedLoader:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
--------- beginning of crash
08-25 01:54:42.069 27779 27779 E AndroidRuntime: FATAL EXCEPTION: main
08-25 01:54:42.069 27779 27779 E AndroidRuntime: Process: com.lemmonet.contentcreators, PID: 27779
08-25 01:54:42.069 27779 27779 E AndroidRuntime: 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
08-25 01:54:42.069 27779 27779 E AndroidRuntime:        at expo.modules.updates.loader.EmbeddedLoader.readEmbeddedManifest(EmbeddedLoader.java:78)
08-25 01:54:42.069 27779 27779 E AndroidRuntime:        at expo.modules.updates.UpdatesController.start(UpdatesController.java:285)
08-25 01:54:42.069 27779 27779 E AndroidRuntime:        at expo.modules.updates.UpdatesController.initialize(UpdatesController.java:96)
08-25 01:54:42.069 27779 27779 E AndroidRuntime:        at com.lemmonet.contentcreators.MainApplication.onCreate(MainApplication.java:85)
08-25 01:54:42.069 27779 27779 E AndroidRuntime:        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
08-25 01:54:42.069 27779 27779 E AndroidRuntime:        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
08-25 01:54:42.069 27779 27779 E AndroidRuntime:        at android.app.ActivityThread.access$1100(ActivityThread.java:199)
08-25 01:54:42.069 27779 27779 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
08-25 01:54:42.069 27779 27779 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:106)
08-25 01:54:42.069 27779 27779 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:193)
08-25 01:54:42.069 27779 27779 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6669)
08-25 01:54:42.069 27779 27779 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
08-25 01:54:42.069 27779 27779 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
08-25 01:54:42.069 27779 27779 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
1 Like

No app manifest could be related to the answer I posted here: After ejecting, cant find app.manifest

For anyone who lands on this issue, I was able to solve the problem by removing the line import com.facebook.react.BuildConfig; from MainApplication.java. Now the Android app runs as expected.

1 Like

Saved my life. I was also able to solve this problem by removing the mentioned import statement.