Infinite loading to build an android build (SOLVED)

Hey,
I’ve try to resolve this problem with bob.jar.
It’s the first time i use bob.jar. I’ve reussised to intall bob.jar in my project, but i have already a little problem.
He said that :


And in the folder, there is :
erre
Thanks for advance.

Yes, it’s a known issue on windows.
Windows likes to “hold on” to loaded dll’s, so when the Java process shuts down, and it tries to remove the temp folder, it fails, because windows has locked the folder.

It’s annoying, but doesn’t impact the build itself.

Infinite loading to build an android build

What do you mean by this?

Ok, interesting thanks.

I try to make a simple bundle for Android.
image
but the bundling loads infinitely.


In the folder there is this :
image
And strangely it’s a aab file.

One thing to try is to check (like you are doing) if you can bundle the project using bob.jar. Something like this

java -jar bob.jar --platform=armv7-android --archive --verbose --bundle-format=aab --keystore=/path/to/your.keystore --keystore-pass=/path/to/keystore.pass --keystore-alias=keystore_alias build bundle

I have made this :

java -jar bob.jar --platform=armv7-android --archive --verbose --bundle-format=apk --keystore=key.keystore --keystore-pass=passowrd.txt --keystore-alias=key_alias build bundle

ok, the result is this :

Working...Build Remote Engine...
Building engine... ...done!
Bob: Engine build took 2,848000 s

Reading classes...Bob:
2147483647% ...done!
Reading tasks... ...done!
Building... 1% 2% 3% 4% 5% 6% 7% 8% 9% 10% 11% 12% 13% 14% 15% 16% 17% 18% 19% 20% 21% 22% 23% 24% 25% 26% 27% 28% 29% 30% 31% 32% 33% 34% 35% 36% 37% 38% 39% 40% 41% 42% 43% 44% 45% 46% 47% 48% 49% 50% 51% 52% 53% 54% 55% 56% 57% 58% 59% 60% 61% 62% 63% 64% 65% 66% 67% 68% 69% 70% 71% 72% 73% 74% 75% 76% 77% 78% 79% 80% 81% 82% 83% 84% 85% 86% 87% 88% 89% 90% 91% 92% 93% 94% 95% 96% 97% 98% ...done!
Bob: Content tasks took 0,488000 s

Bundling...Bob: Extracted 'META-INF/MANIFEST.MF' from 'jar:file:/C:/Users/scorp360/Documents/prooggrammmer/lua/Defold/projet/drop/DR0P/bob.jar!/lib/android-res.zip' to 'C:\Users\scorp360\AppData\Local\Temp\7579374141125971873\META-INF\MANIFEST.MF'
sept. 22, 2021 10:34:11 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Creating AAB base.zip
sept. 22, 2021 10:34:11 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Using extender binary for architecture: armv7-android
sept. 22, 2021 10:34:11 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Using extender binary for architecture: arm64-android
sept. 22, 2021 10:34:11 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Copying dex to C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\armv7-android\classes.dex
sept. 22, 2021 10:34:12 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Copying resource 'lib/arm64-v8a/libfmodstudio.so' to C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\aab\base\lib\arm64-v8a\libfmodstudio.so
sept. 22, 2021 10:34:12 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Copying resource 'lib/arm64-v8a/libfmod.so' to C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\aab\base\lib\arm64-v8a\libfmod.so
sept. 22, 2021 10:34:12 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Copying resource 'lib/armeabi-v7a/libfmodstudio.so' to C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\aab\base\lib\armeabi-v7a\libfmodstudio.so
sept. 22, 2021 10:34:12 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Copying resource 'lib/armeabi-v7a/libfmod.so' to C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\aab\base\lib\armeabi-v7a\libfmod.so
sept. 22, 2021 10:34:12 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Copying asset C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\game.projectc to C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\aab\base\assets\game.projectc
sept. 22, 2021 10:34:12 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Copying asset C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\game.arci to C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\aab\base\assets\game.arci
sept. 22, 2021 10:34:12 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Copying asset C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\game.arcd to C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\aab\base\assets\game.arcd
sept. 22, 2021 10:34:12 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Copying asset C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\game.dmanifest to C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\aab\base\assets\game.dmanifest
sept. 22, 2021 10:34:12 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Copying asset C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\game.public.der to C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\aab\base\assets\game.public.der
sept. 22, 2021 10:34:12 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Copying resources to C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\aab\base\res
sept. 22, 2021 10:34:12 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Copying engine to C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\aab\base\lib\armeabi-v7a\libDR0P.so
sept. 22, 2021 10:34:12 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: exec: C:\Users\scorp360\AppData\Local\Temp\7579374141125971873\x86_64-win32\strip_android.exe C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\aab\base\lib\armeabi-v7a\libDR0P.so
sept. 22, 2021 10:34:13 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Copying engine to C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\aab\base\lib\arm64-v8a\libDR0P.so
sept. 22, 2021 10:34:13 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: exec: C:\Users\scorp360\AppData\Local\Temp\7579374141125971873\x86_64-win32\strip_android_aarch64.exe C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\aab\base\lib\arm64-v8a\libDR0P.so
sept. 22, 2021 10:34:13 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Zipping C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\aab\base to C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\aab\base.zip
sept. 22, 2021 10:34:14 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Creating Android Application Bundle
sept. 22, 2021 10:34:14 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: exec: C:\Program Files\Java\jdk-17\bin\java -jar C:\Users\scorp360\AppData\Local\Temp\7579374141125971873\bundletool-all.jar build-bundle --modules C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\aab\base.zip --output C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\DR0P.aab
sept. 22, 2021 10:34:15 AM com.dynamo.bob.bundle.AndroidBundler log
INFO: Sign C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\DR0P.aab
Exception in thread "main" com.dynamo.bob.CompileExceptionError: passowrd.txt
        at com.dynamo.bob.Project.build(Project.java:531)
        at com.dynamo.bob.Bob.mainInternal(Bob.java:687)
        at com.dynamo.bob.Bob.main(Bob.java:736)
Caused by: java.nio.file.NoSuchFileException: passowrd.txt
        at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
        at java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:236)
        at java.base/java.nio.file.Files.newByteChannel(Files.java:380)
        at java.base/java.nio.file.Files.newByteChannel(Files.java:432)
        at java.base/java.nio.file.Files.readAllBytes(Files.java:3288)
        at com.dynamo.bob.bundle.AndroidBundler.readFile(AndroidBundler.java:94)
        at com.dynamo.bob.bundle.AndroidBundler.getKeystorePassword(AndroidBundler.java:179)
        at com.dynamo.bob.bundle.AndroidBundler.signFile(AndroidBundler.java:597)
        at com.dynamo.bob.bundle.AndroidBundler.createAAB(AndroidBundler.java:686)
        at com.dynamo.bob.bundle.AndroidBundler.bundleApplication(AndroidBundler.java:791)
        at com.dynamo.bob.Project.bundle(Project.java:676)
        at com.dynamo.bob.Project.doBuild(Project.java:1155)
        at com.dynamo.bob.Project.build(Project.java:521)
        ... 2 more

Is the file called “password.txt” ?

Ok, this is a mistake on my part :expressionless:

I have retry and i’ve this :

INFO: exec: C:\Program Files\Java\jdk-17\bin\jarsigner -verbose -keystore key.keystore -storepass tester C:\Users\scorp360\Documents\prooggrammmer\lua\Defold\projet\drop\DR0P\build\default\DR0P\DR0P.aab key_alias
Exception in thread "main" com.dynamo.bob.CompileExceptionError: jarsigner: Certificate chain not found for: key_alias.  key_alias must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.

        at com.dynamo.bob.Project.build(Project.java:531)
        at com.dynamo.bob.Bob.mainInternal(Bob.java:687)
        at com.dynamo.bob.Bob.main(Bob.java:736)
Caused by: java.io.IOException: jarsigner: Certificate chain not found for: key_alias.  key_alias must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain.

        at com.dynamo.bob.bundle.AndroidBundler.signFile(AndroidBundler.java:607)
        at com.dynamo.bob.bundle.AndroidBundler.createAAB(AndroidBundler.java:686)
        at com.dynamo.bob.bundle.AndroidBundler.bundleApplication(AndroidBundler.java:791)
        at com.dynamo.bob.Project.bundle(Project.java:676)
        at com.dynamo.bob.Project.doBuild(Project.java:1155)
        at com.dynamo.bob.Project.build(Project.java:521)
        ... 2 more

What’s keystore_alias ? How can I create it ? Use a .txt file works for keystore pass ?

A keystore contains one or more keys and certificates for use when signing an Android application. Each pair of key+cert is associated to an alias (a name). In order to sign an Android application we need to know three things:

  1. The path to the keystore (–keystore=/path/to/your.keystore)
  2. The password to the keystore, stored in a plain text file (–keystore-pass=/path/to/keystore.pass)
  3. The alias associated with the key+cert (–keystore-alias=keystore_alias)

What was the alias/name you used when you created the keystore?

Refer to our documentation or the official Android docs for more info.

Ok, I just didn’t know where to find it in keystore explorer ( KeyStore Explorer is an open source GUI replacement for the Java command-line ) .
And it works, i have the bundle :

image

I try in Defold with the keystore, new password and it works.

The loads infinitely came from a keystore error.

It’s strange, the error I got does not show an error, like this one.
image

In any case, thank you for your quick response. :grin:

Ok, that is something we should fix then. Do you remember if it failed due to the wrong alias or keystore password?

2 Likes

I have unfortunately delete the keystore, but if i find the same problem, I will put the keystore, alias and pass in this room.

Maybe I can help ( I used the editor, not the command line - command line and I have a somewhat strained relationship).
The non-ending bundling without error message happened to me when I used different passwords for key and keystore (and used the keystore’s password in the editor).
The error “unable to find keystore alias” showed up when I used the key’s password in the editor.
Using same password for key and keystore: bundling without problems.

1 Like