Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid App Bundle : 'BundleConfig.pb' file missing #165

Closed
crat1985 opened this issue Feb 10, 2024 · 7 comments
Closed

Invalid App Bundle : 'BundleConfig.pb' file missing #165

crat1985 opened this issue Feb 10, 2024 · 7 comments

Comments

@crat1985
Copy link

crat1985 commented Feb 10, 2024

Here is the complete error :

[BT:1.15.6] Error: The archive doesn't seem to be an App Bundle, it is missing required file 'BundleConfig.pb'.
com.android.tools.build.bundletool.model.exceptions.InvalidBundleException: The archive doesn't seem to be an App Bundle, it is missing required file 'BundleConfig.pb'.
	at com.android.tools.build.bundletool.model.exceptions.UserExceptionBuilder.build(UserExceptionBuilder.java:58)
	at com.android.tools.build.bundletool.validation.MandatoryFilesPresenceValidator.checkBundleHasBundleConfig(MandatoryFilesPresenceValidator.java:73)
	at com.android.tools.build.bundletool.validation.MandatoryFilesPresenceValidator.validateBundleZipFile(MandatoryFilesPresenceValidator.java:60)
	at com.android.tools.build.bundletool.validation.ValidatorRunner.lambda$validateBundleZipFile$0(ValidatorRunner.java:42)
	at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:422)
	at com.android.tools.build.bundletool.validation.ValidatorRunner.validateBundleZipFile(ValidatorRunner.java:42)
	at com.android.tools.build.bundletool.validation.AppBundleValidator.validateFile(AppBundleValidator.java:103)
	at com.android.tools.build.bundletool.commands.BuildApksCommand.execute(BuildApksCommand.java:900)
	at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:83)
	at com.android.tools.build.bundletool.BundleToolMain.main(BundleToolMain.java:55)

It happens also when I try to upload it on Google Play.
It happens if the app is signed and if it isn't.

I created a repo if you want the files : https://github.com/RIC217/test-winit-android

@MarijnS95
Copy link
Member

Could this be fixed by #156? xbuild might build apks with a .aab extension currently, leading to all kinds of inexplicable and strange errors.

@crat1985
Copy link
Author

crat1985 commented Feb 11, 2024

Could this be fixed by #156? xbuild might build apks with a .aab extension currently, leading to all kinds of inexplicable and strange errors.

Instead of explicitly requiring gradle: true in the manifest, enable it by default when the (implicit or explicit!) output package format is Aab for convenience, as there is currently no way to select the gradle backend via command line parameters and hardcoding it in manifest.yaml makes it inconvenient to build Apks with the "native" builtin backend.

Hi, thanks for your response :)
I'm using a NativeActivity so not Gradle to build so yes ! It could perhaps solve it ! I didn't know about manifest.yaml ! Thanks !

I'll try this asap !

@crat1985
Copy link
Author

Strange 🤔
I get another error, even without gradle: true inside manifest.yaml :

 ❯ x build --release --store play --pem ~/keys_for_android/pem         main ✭
[1/3] Fetch precompiled artifacts
info: component 'rust-std' for target 'aarch64-linux-android' is up to date
[1/3] Fetch precompiled artifacts [182ms]
[2/3] Build rust `test_winit_android`
   Compiling test_winit_android v0.1.0 (/home/riccardo/test-winit-android)
error: linking with `clang` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/riccardo/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" VSLANG="1033" "clang" "-Wl,--version-script=/tmp/rustcTooNPJ/list" "-Wl,--no-undefined-version" "/tmp/rustcTooNPJ/symbols.o" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/test_winit_android.test_winit_android.163a2da37ea14fb0-cgu.00.rcgu.o" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/test_winit_android.test_winit_android.163a2da37ea14fb0-cgu.01.rcgu.o" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/test_winit_android.test_winit_android.163a2da37ea14fb0-cgu.02.rcgu.o" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/test_winit_android.test_winit_android.163a2da37ea14fb0-cgu.03.rcgu.o" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/test_winit_android.test_winit_android.163a2da37ea14fb0-cgu.04.rcgu.o" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/test_winit_android.test_winit_android.163a2da37ea14fb0-cgu.05.rcgu.o" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/test_winit_android.test_winit_android.163a2da37ea14fb0-cgu.06.rcgu.o" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/test_winit_android.test_winit_android.163a2da37ea14fb0-cgu.07.rcgu.o" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/test_winit_android.test_winit_android.163a2da37ea14fb0-cgu.08.rcgu.o" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/test_winit_android.test_winit_android.163a2da37ea14fb0-cgu.09.rcgu.o" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/test_winit_android.test_winit_android.163a2da37ea14fb0-cgu.10.rcgu.o" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/test_winit_android.fl96jihsg38gc9u.rcgu.o" "-Wl,--as-needed" "-L" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps" "-L" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/release/deps" "-L" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib" "-Wl,-Bstatic" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libandroid_logger-ecb4902b1324ca0f.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libenv_logger-4981fe9191de8249.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libregex-d51305f6fb91ce6a.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libregex_automata-d3465dd6b7fc619d.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libaho_corasick-6ae19a90f0c305eb.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libregex_syntax-3beb06353fd1ace7.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libandroid_log_sys-fd2cde174b380c90.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libwinit-4f69c9d1dc367c4e.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libcursor_icon-dc66b0679708c158.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libonce_cell-eff1a8590b29da15.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libandroid_activity-1a141fc3a6f32af2.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libandroid_properties-859a6ee51e5e2fec.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libndk_context-7b634560125ff962.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libjni-f10fa338015a05da.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libcesu8-9746bd34e02328ca.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libcombine-c7a1d518684cb7a4.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libmemchr-d7c8b10e1ee4cb85.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libbytes-b67a7a639b6ffe9c.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libndk-26aee75c817473bd.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libndk_sys-3d717340386de69f.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libjni_sys-d6a528279aaddde7.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libthiserror-66460c904c4c37e5.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libnum_enum-c111c040977d7e24.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/liblibc-9d3e4ab2c412a7c0.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libsmol_str-e7970ad633199daf.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libraw_window_handle-d62f07605372b877.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libbitflags-de767f5457cae91e.rlib" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/liblog-945087ba12efc3ff.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libstd-b18d79dbb1c3d14a.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libpanic_unwind-f9248de4da37bb05.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libobject-9fec6e815b8d8bb6.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libmemchr-bf9e60854b0b92e3.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libaddr2line-a5ac29c029a87834.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libgimli-e36cc26127c6c050.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/librustc_demangle-2db6a821beff3669.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libstd_detect-d58476a798be4bde.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libhashbrown-2002b14199e5cb72.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/librustc_std_workspace_alloc-6dd1bd40dd6713ea.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libminiz_oxide-94499ab839f5e309.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libadler-4aa6ae81d02ee158.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libunwind-32b5404f650fb3d5.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libcfg_if-1e15fbafe41c1f31.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/liblibc-67fd329767fc8624.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/liballoc-d0133230f4492315.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/librustc_std_workspace_core-fa41c19e40ce4079.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libcore-541011fb2b1d225f.rlib" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libcompiler_builtins-d06a0e93cb52f726.rlib" "-Wl,-Bdynamic" "-llog" "-landroid" "-ldl" "-llog" "-lunwind" "-ldl" "-lm" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/riccardo/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib" "-o" "/home/riccardo/test-winit-android/target/x/release/android/arm64/cargo/aarch64-linux-android/release/deps/libtest_winit_android.so" "-Wl,--gc-sections" "-shared" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "--sysroot=/home/riccardo/.cache/x/Android.ndk" "-fuse-ld=lld" "--target=aarch64-linux-android" "-B/home/riccardo/.cache/x/Android.ndk/usr/lib/aarch64-linux-android/33" "-L/home/riccardo/.cache/x/Android.ndk/usr/lib/aarch64-linux-android/33" "-L/home/riccardo/.cache/x/Android.ndk/usr/lib/aarch64-linux-android"
  = note: clang-16: error: invalid linker name in argument '-fuse-ld=lld'
          

error: could not compile `test_winit_android` (lib) due to 1 previous error

@crat1985
Copy link
Author

crat1985 commented Feb 11, 2024

My bad, I just installed llvm and lld and it worked ! I'll now try to upload it on Google Play Console

@crat1985
Copy link
Author

Unfortunately, I get the same File 'BundleConfig.pb' was not found. error 🥲
And it doens't seem to use Gradle (I tried without it being installed on my OS (Arch) and with it being installed) :

[1/3] Fetch precompiled artifacts
info: component 'rust-std' for target 'aarch64-linux-android' is up to date
[1/3] Fetch precompiled artifacts [274ms]
[2/3] Build rust `test_winit_android`
    Finished release [optimized] target(s) in 1.11s
[2/3] Build rust `test_winit_android` [1275ms]
[3/3] Create aab [21160ms]

Or it just don't display it I don't know

@MarijnS95
Copy link
Member

Closing as duplicate of #163 (thanks for pointing that out in the winit matrix channel). Keep in mind that having all relevant information in a single already-open issue is always preferred over having multiple.

@MarijnS95 MarijnS95 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 12, 2024
@MarijnS95
Copy link
Member

For completeness, aab's can only be built with gradle. Any other combinations (aab without gradle which seems to be tried here) will not work. Either build apks or enable the gradle backend (for which I have many PRs open to fix all kinds of issues with the current release).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants