Compilation Stuck at BlocklyCompile in MIT App Inventor Source Build

Hello Everyone,

I am trying to build MIT App Inventor from source on my MacBook Air (M1, macOS Sonoma), but I have encountered multiple issues during the setup and compilation process.

1. KeyczarTool.jar Issue

Initially error is caused by an invalid or corrupt KeyczarTool.jar file. The build process is failing when trying to generate a keystore using KeyczarTool

2. Fixing the KeyczarTool.jar Issue

To resolve this, I manually downloaded the correct version from the GitHub releases page and moved it to the correct directory:

mv ~/Downloads/keyczar-Java_release_0.71j.zip /Users/nayakdivyanshu/Desktop/appinventor-sources/appinventor/lib/keyczar/

**3. Compilation Stuck at **BlocklyCompile

After fixing the KeyczarTool issue, I started compiling the project using:

ant -Dskip.ios=true

However, the compilation stuck indefinitely at the following step:

BlocklyCompile:

I waited for over 15 minutes, but it did not proceed further.


Request for Help

If anyone has encountered this issue before or knows a potential fix, I would really appreciate your help!

Thanks in advance! :rocket:

Some of us have M1 and some have M3, so I'm not sure what the issue is here. There should be no reason for the KeyczarTool to be considered corrupt. What's the specific error message you are seeing?

Now the log look like this:

Keystore:
     [echo] Using KeyczarTool to generate keystore
    [mkdir] Created dir: /Users/nayakdivyanshu/Desktop/appinventor-sources/appinventor/appengine/build/war/WEB-INF/keystore
     [java] Error: Unable to access jarfile /Users/nayakdivyanshu/Desktop/appinventor-sources/appinventor/lib/keyczar/KeyczarTool.jar

BUILD FAILED
/Users/nayakdivyanshu/Desktop/appinventor-sources/appinventor/build.xml:16: The following error occurred while executing this line:
/Users/nayakdivyanshu/Desktop/appinventor-sources/appinventor/appengine/build.xml:251: Java returned: 1

Total time: 28 minutes 33 seconds
nayakdivyanshu@NAYAKs-Air appinventor %

@ewpatton, I recently upgraded the Google Cloud SDK. Could that be causing the issue?

nayakdivyanshu@NAYAKs-Air appinventor % gcloud --version

Google Cloud SDK 509.0.0

app-engine-java 2.0.32

app-engine-python 1.9.114

bq 2.1.12

cloud-datastore-emulator 2.3.1

core 2025.01.31

gcloud-crc32c 1.0.0

gsutil 5.33

No, Google Cloud SDK doesn't come into play until you try to run the server.

What is the output of ant -diagnostics? If you're getting Keyczar errors my guess is that it's showing a version of Java > 11.

nayakdivyanshu@NAYAKs-Air appinventor % ant -diagnostics

------- Ant diagnostics report -------

Apache Ant(TM) version 1.10.15 compiled on August 25 2024

-------------------------------------------

Implementation Version

-------------------------------------------

core tasks : 1.10.15 in file:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant.jar

-------------------------------------------

ANT PROPERTIES

-------------------------------------------

ant.version: Apache Ant(TM) version 1.10.15 compiled on August 25 2024

ant.java.version: 11

Is this the Apache Harmony VM? no

Is this the Kaffe VM? no

Is this gij/gcj? no

ant.core.lib: /opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant.jar

ant.home: /opt/homebrew/Cellar/ant/1.10.15/libexec

-------------------------------------------

ANT_HOME/lib jar listing

-------------------------------------------

ant.home: /opt/homebrew/Cellar/ant/1.10.15/libexec

ant-commons-net.jar (91614 bytes)

ant-xz.jar (11353 bytes)

ant-junit4.jar (13681 bytes)

ant-jai.jar (29590 bytes)

ant-apache-resolver.jar (9918 bytes)

ant-jdepend.jar (14994 bytes)

ant-apache-regexp.jar (10028 bytes)

ant-apache-log4j.jar (8770 bytes)

ant-javamail.jar (14354 bytes)

ant-apache-bcel.jar (15618 bytes)

ant.jar (2304360 bytes)

ant-netrexx.jar (17327 bytes)

ant-swing.jar (13936 bytes)

ant-jsch.jar (55252 bytes)

ant-junitlauncher.jar (96279 bytes)

ant-jakartamail.jar (14337 bytes)

ivy-2.5.2.jar (1405631 bytes)

ant-junit.jar (141395 bytes)

ant-imageio.jar (31588 bytes)

ant-launcher.jar (18870 bytes)

ant-antlr.jar (12273 bytes)

ant-testutil.jar (28844 bytes)

ant-apache-oro.jar (10054 bytes)

ant-jmf.jar (13023 bytes)

ant-apache-xalan2.jar (8421 bytes)

ant-apache-bsf.jar (10151 bytes)

ant-commons-logging.jar (10182 bytes)

bcel-6.9.0.jar (738607 bytes)

-------------------------------------------

USER_HOME/.ant/lib jar listing

-------------------------------------------

user.home: /Users/nayakdivyanshu

No such directory.

-------------------------------------------

Tasks availability

-------------------------------------------

sshsession : Missing dependency com.jcraft.jsch.Logger

scp : Missing dependency com.jcraft.jsch.Logger

image : Missing dependency javax.media.jai.PlanarImage

jdepend : Missing dependency jdepend.textui.JDepend

xz : Missing dependency org.tukaani.xz.FilterOptions

sshexec : Missing dependency com.jcraft.jsch.Logger

ftp : Missing dependency org.apache.commons.net.ftp.FTPClient

A task being missing/unavailable should only matter if you are trying to use it

-------------------------------------------

org.apache.env.Which diagnostics

-------------------------------------------

Not available.

Download it at https://xml.apache.org/commons/

-------------------------------------------

XML Parser information

-------------------------------------------

XML Parser : com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl

XML Parser Location: unknown

Namespace-aware parser : com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser

Namespace-aware parser Location: unknown

-------------------------------------------

XSLT Processor information

-------------------------------------------

XSLT Processor : com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl

XSLT Processor Location: unknown

-------------------------------------------

System properties

-------------------------------------------

gopherProxySet : false

awt.toolkit : sun.lwawt.macosx.LWCToolkit

ant.library.dir : /opt/homebrew/Cellar/ant/1.10.15/libexec/lib

java.specification.version : 11

sun.cpu.isalist :

sun.jnu.encoding : UTF-8

java.class.path : /opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-launcher.jar:/opt/homebrew/share/ant:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-commons-net.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-xz.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-junit4.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-jai.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-apache-resolver.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-jdepend.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-apache-regexp.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-apache-log4j.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-javamail.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-apache-bcel.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-netrexx.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-swing.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-jsch.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-junitlauncher.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-jakartamail.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ivy-2.5.2.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-junit.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-imageio.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-launcher.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-antlr.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-testutil.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-apache-oro.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-jmf.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-apache-xalan2.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-apache-bsf.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/ant-commons-logging.jar:/opt/homebrew/Cellar/ant/1.10.15/libexec/lib/bcel-6.9.0.jar

java.vm.vendor : Azul Systems, Inc.

sun.arch.data.model : 64

java.vendor.url : http://www.azul.com/

user.timezone :

os.name : Mac OS X

java.vm.specification.version : 11

sun.java.launcher : SUN_STANDARD

user.country : IN

sun.boot.library.path : /Users/nayakdivyanshu/.sdkman/candidates/java/11.0.25-zulu/zulu-11.jdk/Contents/Home/lib

sun.java.command : org.apache.tools.ant.launch.Launcher -cp -lib /opt/homebrew/share/ant -diagnostics

http.nonProxyHosts : local|*.local|169.254/16|*.169.254/16

jdk.debug : release

sun.cpu.endian : little

user.home : /Users/nayakdivyanshu

user.language : en

java.specification.vendor : Oracle Corporation

java.version.date : 2024-10-15

java.home : /Users/nayakdivyanshu/.sdkman/candidates/java/11.0.25-zulu/zulu-11.jdk/Contents/Home

file.separator : /

java.vm.compressedOopsMode : Zero based

line.separator :

java.specification.name : Java Platform API Specification

java.vm.specification.vendor : Oracle Corporation

jdk.vendor.version : Zulu11.76+21-CA

java.awt.graphicsenv : sun.awt.CGraphicsEnvironment

sun.management.compiler : HotSpot 64-Bit Tiered Compilers

ftp.nonProxyHosts : local|*.local|169.254/16|*.169.254/16

java.runtime.version : 11.0.25+9-LTS

user.name : nayakdivyanshu

path.separator : :

os.version : 14.5

java.runtime.name : OpenJDK Runtime Environment

file.encoding : UTF-8

java.vm.name : OpenJDK 64-Bit Server VM

java.vendor.version : Zulu11.76+21-CA

java.vendor.url.bug : http://www.azul.com/support/

java.io.tmpdir : /var/folders/0k/3wgll6nj76106jtjzxxwgnxm0000gn/T/

java.version : 11.0.25

user.dir : /Users/nayakdivyanshu/Desktop/appinventor-sources/appinventor

os.arch : aarch64

java.vm.specification.name : Java Virtual Machine Specification

java.awt.printerjob : sun.lwawt.macosx.CPrinterJob

ant.home : /opt/homebrew/Cellar/ant/1.10.15/libexec

sun.os.patch.level : unknown

java.library.path : /Users/nayakdivyanshu/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.

java.vm.info : mixed mode

java.vendor : Azul Systems, Inc.

java.vm.version : 11.0.25+9-LTS

java.specification.maintenance.version : 3

sun.io.unicode.encoding : UnicodeBig

java.class.version : 55.0

socksNonProxyHosts : local|*.local|169.254/16|*.169.254/16

-------------------------------------------

Temp dir

-------------------------------------------

Temp dir is /var/folders/0k/3wgll6nj76106jtjzxxwgnxm0000gn/T/

Temp dir is writeable

Temp dir alignment with system clock is 18 ms

-------------------------------------------

Locale information

-------------------------------------------

Timezone India Standard Time offset=19800000

-------------------------------------------

Proxy information

-------------------------------------------

http.nonProxyHosts = "local|*.local|169.254/16|*.169.254/16"

ftp.nonProxyHosts = "local|*.local|169.254/16|*.169.254/16"

Java1.5+ proxy settings:

Direct connection

nayakdivyanshu@NAYAKs-Air appinventor %

Is your Desktop synced via iCloud? If so, it might be the case that the jar files haven't been downloaded from the cloud. You may want to move your App Inventor clone to a directory guaranteed to be local to your machine.

1 Like

yes this can be the issue.i will move App Inventor clone to a directory guaranteed to be local to my machine.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.