Punya App Building/Downloading Error

Hi, I am experiencing two different errors when interacting with the MIT App Inventor Punya subproject.

First, I am having trouble building the Android App (.apk). When using Punya, I try to use the Build < Android App (.apk) dropdown and I receive an error pop-up that says Server error: could not build target. Please try again later!

Second, I am having an error when I try to build Punya locally. I followed these steps but used the Punya repository. I can build and run app inventor, but running into errors when running the build server. Here is a portion of the error after I run ant RunLocalBuildServer:

...
AndroidRuntime:
    [javac] Compiling 437 source files to /mnt/c/Users/capuzb/research/punya/appinventor/components/build/classes/AndroidRuntime
    [javac] warning: In component GoogleMap, method addPolygon is missing a description.
    [javac] warning: In component GoogleMap, method clearAllPolygons is missing a description.
    [javac] warning: In component GoogleMap, method drawCentralSquare is missing a description.
    [javac] warning: In component GoogleMap, method getBoundingBox is missing a description.
    [javac] warning: In component GoogleMap, method addOverlay is missing a description.
    [javac] warning: In component GoogleMap, method addTileOverlay is missing a description.
    [javac] warning: In component GoogleMap, method getMapCenter is missing a description.
    [javac] warning: In component GoogleMap, method getZoomLevelInfo is missing a description.
    [javac] warning: In component LinkedDataBase, method GetLangStatements is missing a description.
    [javac] warning: In component LinkedData, event FailedToAddDataToWeb is missing a description.
    [javac] warning: In component LinkedData, event FinishedAddingDataToWeb is missing a description.
    [javac] warning: In component LinkedData, event FailedToFeedDataToWeb is missing a description.
    [javac] warning: In component LinkedData, event FinishedFeedingDataToWeb is missing a description.
    [javac] warning: In component LinkedData, event FailedToDeleteDataFromWeb is missing a description.
    [javac] warning: In component LinkedData, event FinishedDeletingDataFromWeb is missing a description.
    [javac] warning: In component LinkedData, event FailedToDeleteDataFromLocal is missing a description.
    [javac] warning: In component LinkedData, event FinishedDeletingDataFromLocal is missing a description.
    [javac] warning: In component LinkedData, event FinishedHttsPostingFileToWeb is missing a description.
    [javac] warning: In component LinkedData, event FailedHttsPostingFileToWeb is missing a description.
    [javac] warning: In component LinkedData, method HttpsPostFileToWeb is missing a description.
    [javac] warning: In component LinkedData, method ResultsToSimpleJSON is missing a description.
    [javac] warning: In component GoogleCloudMessaging, method isRegistered is missing a description.
    [javac] warning: In component GoogleCloudMessaging, method isServiceReady is missing a description.
    [javac] warning: In component LinkedDataStreamingClient, event SubscriptionResponseReceived is missing a description.
    [javac] warning: In component LinkedDataStreamingClient, method isRegistered is missing a description.
    [javac] warning: In component LinkedDataStreamingClient, method isServiceReady is missing a description.
    [javac] Note: Wrote file file:/mnt/c/Users/capuzb/research/punya/appinventor/components/build/classes/AndroidRuntime/simple_components.json
    [javac] warning: In component GoogleMap, method addPolygon is missing a description.
    [javac] warning: In component GoogleMap, method clearAllPolygons is missing a description.
    [javac] warning: In component GoogleMap, method drawCentralSquare is missing a description.
    [javac] warning: In component GoogleMap, method getBoundingBox is missing a description.
    [javac] warning: In component GoogleMap, method addOverlay is missing a description.
    [javac] warning: In component GoogleMap, method addTileOverlay is missing a description.
    [javac] warning: In component GoogleMap, method getMapCenter is missing a description.
    [javac] warning: In component GoogleMap, method getZoomLevelInfo is missing a description.
    [javac] warning: In component LinkedDataBase, method GetLangStatements is missing a description.
    [javac] warning: In component LinkedData, event FailedToAddDataToWeb is missing a description.
    [javac] warning: In component LinkedData, event FinishedAddingDataToWeb is missing a description.
    [javac] warning: In component LinkedData, event FailedToFeedDataToWeb is missing a description.
    [javac] warning: In component LinkedData, event FinishedFeedingDataToWeb is missing a description.
    [javac] warning: In component LinkedData, event FailedToDeleteDataFromWeb is missing a description.
    [javac] warning: In component LinkedData, event FinishedDeletingDataFromWeb is missing a description.
    [javac] warning: In component LinkedData, event FailedToDeleteDataFromLocal is missing a description.
    [javac] warning: In component LinkedData, event FinishedDeletingDataFromLocal is missing a description.
    [javac] warning: In component LinkedData, event FinishedHttsPostingFileToWeb is missing a description.
    [javac] warning: In component LinkedData, event FailedHttsPostingFileToWeb is missing a description.
    [javac] warning: In component LinkedData, method HttpsPostFileToWeb is missing a description.
    [javac] warning: In component LinkedData, method ResultsToSimpleJSON is missing a description.
    [javac] warning: In component GoogleCloudMessaging, method isRegistered is missing a description.
    [javac] warning: In component GoogleCloudMessaging, method isServiceReady is missing a description.
    [javac] warning: In component LinkedDataStreamingClient, event SubscriptionResponseReceived is missing a description.
    [javac] warning: In component LinkedDataStreamingClient, method isRegistered is missing a description.
    [javac] warning: In component LinkedDataStreamingClient, method isServiceReady is missing a description.
    [javac] Note: Wrote file file:/mnt/c/Users/capuzb/research/punya/appinventor/components/build/classes/AndroidRuntime/simple_components.txt
    [javac] Note: Wrote file file:/mnt/c/Users/capuzb/research/punya/appinventor/components/build/classes/AndroidRuntime/simple_components_build_info.json
    [javac] warning: In component GoogleMap, method addPolygon is missing a description.
    [javac] warning: In component GoogleMap, method clearAllPolygons is missing a description.
    [javac] warning: In component GoogleMap, method drawCentralSquare is missing a description.
    [javac] warning: In component GoogleMap, method getBoundingBox is missing a description.
    [javac] warning: In component GoogleMap, method addOverlay is missing a description.
    [javac] warning: In component GoogleMap, method addTileOverlay is missing a description.
    [javac] warning: In component GoogleMap, method getMapCenter is missing a description.
    [javac] warning: In component GoogleMap, method getZoomLevelInfo is missing a description.
    [javac] warning: In component LinkedDataBase, method GetLangStatements is missing a description.
    [javac] warning: In component LinkedData, event FailedToAddDataToWeb is missing a description.
    [javac] warning: In component LinkedData, event FinishedAddingDataToWeb is missing a description.
    [javac] warning: In component LinkedData, event FailedToFeedDataToWeb is missing a description.
    [javac] warning: In component LinkedData, event FinishedFeedingDataToWeb is missing a description.
    [javac] warning: In component LinkedData, event FailedToDeleteDataFromWeb is missing a description.
    [javac] warning: In component LinkedData, event FinishedDeletingDataFromWeb is missing a description.
    [javac] warning: In component LinkedData, event FailedToDeleteDataFromLocal is missing a description.
    [javac] warning: In component LinkedData, event FinishedDeletingDataFromLocal is missing a description.
    [javac] warning: In component LinkedData, event FinishedHttsPostingFileToWeb is missing a description.
    [javac] warning: In component LinkedData, event FailedHttsPostingFileToWeb is missing a description.
    [javac] warning: In component LinkedData, method HttpsPostFileToWeb is missing a description.
    [javac] warning: In component LinkedData, method ResultsToSimpleJSON is missing a description.
    [javac] warning: In component GoogleCloudMessaging, method isRegistered is missing a description.
    [javac] warning: In component GoogleCloudMessaging, method isServiceReady is missing a description.
    [javac] warning: In component LinkedDataStreamingClient, event SubscriptionResponseReceived is missing a description.
    [javac] warning: In component LinkedDataStreamingClient, method isRegistered is missing a description.
    [javac] warning: In component LinkedDataStreamingClient, method isServiceReady is missing a description.
    [javac] Note: Wrote file file:/mnt/c/Users/capuzb/research/punya/appinventor/components/build/classes/AndroidRuntime/AutogeneratedOdeMessages.java
    [javac] Note: Wrote file file:/mnt/c/Users/capuzb/research/punya/appinventor/components/build/classes/AndroidRuntime/ComponentsTranslation.java
    [javac] warning: In component GoogleMap, method addPolygon is missing a description.
    [javac] warning: In component GoogleMap, method clearAllPolygons is missing a description.
    [javac] warning: In component GoogleMap, method drawCentralSquare is missing a description.
    [javac] warning: In component GoogleMap, method getBoundingBox is missing a description.
    [javac] warning: In component GoogleMap, method addOverlay is missing a description.
    [javac] warning: In component GoogleMap, method addTileOverlay is missing a description.
    [javac] warning: In component GoogleMap, method getMapCenter is missing a description.
    [javac] warning: In component GoogleMap, method getZoomLevelInfo is missing a description.
    [javac] warning: In component LinkedDataBase, method GetLangStatements is missing a description.
    [javac] warning: In component LinkedData, event FailedToAddDataToWeb is missing a description.
    [javac] warning: In component LinkedData, event FinishedAddingDataToWeb is missing a description.
    [javac] warning: In component LinkedData, event FailedToFeedDataToWeb is missing a description.
    [javac] warning: In component LinkedData, event FinishedFeedingDataToWeb is missing a description.
    [javac] warning: In component LinkedData, event FailedToDeleteDataFromWeb is missing a description.
    [javac] warning: In component LinkedData, event FinishedDeletingDataFromWeb is missing a description.
    [javac] warning: In component LinkedData, event FailedToDeleteDataFromLocal is missing a description.
    [javac] warning: In component LinkedData, event FinishedDeletingDataFromLocal is missing a description.
    [javac] warning: In component LinkedData, event FinishedHttsPostingFileToWeb is missing a description.
    [javac] warning: In component LinkedData, event FailedHttsPostingFileToWeb is missing a description.
    [javac] warning: In component LinkedData, method HttpsPostFileToWeb is missing a description.
    [javac] warning: In component LinkedData, method ResultsToSimpleJSON is missing a description.
    [javac] warning: In component GoogleCloudMessaging, method isRegistered is missing a description.
    [javac] /mnt/c/Users/capuzb/research/punya/appinventor/components/src/com/google/appinventor/components/runtime/Spreadsheet.java:293: error: cannot find symbol
    [javac]       credential = GoogleCredential.fromStream(in)
    [javac]                                    ^
    [javac]   symbol:   method fromStream(InputStream)
    [javac]   location: class GoogleCredential
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 1 error
    [javac] 100 warnings

BUILD FAILED
/mnt/c/Users/capuzb/research/punya/appinventor/build-common.xml:349: The following error occurred while executing this line:
/mnt/c/Users/capuzb/research/punya/appinventor/components/build.xml:260: The following error occurred while executing this line:
/mnt/c/Users/capuzb/research/punya/appinventor/build-common.xml:131: Compile failed; see the compiler error output for details.

Total time: 5 minutes 17 seconds

You may need to try an ant clean if you've switched branches recently as we have a few different Google libraries floating around the code base.

1 Like

It looks like ant clean got me a little further in the build but it now fails on the YaClientApp step. Do you know how to fix this error?

YaClientApp:
     [java] Compiling module com.google.appinventor.YaClient-dev
     [java]    Ignored 7 units with compilation errors in first pass.
     [java] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
     [java]    Computing all possible rebind results for 'com.google.appinventor.client.utils.HTML5DragDrop.HTML5DragDropSupport'
     [java]       Rebinding com.google.appinventor.client.utils.HTML5DragDrop.HTML5DragDropSupport
     [java]          Invoking generator com.google.gwt.query.rebind.JsniBundleGenerator
     [java]             JsniBundleGenerator - importing external javascript: com/google/appinventor/client/utils/html5dnd.js
     [java]    Computing all possible rebind results for 'com.google.appinventor.client.editor.youngandroid.BlocklyPanel.BlocklySource'
     [java]       Rebinding com.google.appinventor.client.editor.youngandroid.BlocklyPanel.BlocklySource
     [java]          Invoking generator com.google.gwt.query.rebind.JsniBundleGenerator
     [java]             JsniBundleGenerator - importing external javascript: com/google/appinventor/client/editor/youngandroid/blockly.js
     [java]    Compiling 1 permutation
     [java]       Compiling permutation 0...
     [java]    Compile of permutations succeeded
     [java]    Compilation succeeded -- 440.607s
     [java] Linking into /mnt/c/Users/capuzb/research/punya/appinventor/appengine/build/war/ode; Writing extras to /mnt/c/Users/capuzb/research/punya/appinventor/appengine/build/extra/ode
     [java]    Invoking Linker Cross-Site-Iframe
     [java]       [ERROR] Failed to link
     [java] java.lang.OutOfMemoryError: Java heap space
     [java]     at java.util.Arrays.copyOf(Arrays.java:3332)
     [java]     at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
     [java]     at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:448)
     [java]     at java.lang.StringBuilder.append(StringBuilder.java:141)
     [java]     at com.google.gwt.core.linker.CrossSiteIframeLinker.wrapPrimaryFragment(CrossSiteIframeLinker.java:700)
     [java]     at com.google.gwt.core.ext.linker.impl.SelectionScriptLinker.generatePrimaryFragmentString(SelectionScriptLinker.java:411)
     [java]     at com.google.gwt.core.ext.linker.impl.SelectionScriptLinker.generatePrimaryFragment(SelectionScriptLinker.java:386)
     [java]     at com.google.gwt.core.ext.linker.impl.SelectionScriptLinker.doEmitCompilation(SelectionScriptLinker.java:254)
     [java]     at com.google.gwt.core.ext.linker.impl.SelectionScriptLinker.link(SelectionScriptLinker.java:196)
     [java]     at com.google.gwt.core.ext.linker.impl.StandardLinkerContext.invokeLinkForOnePermutation(StandardLinkerContext.java:384)
     [java]     at com.google.gwt.dev.Link.finishPermutation(Link.java:483)
     [java]     at com.google.gwt.dev.Link.doSimulatedShardingLink(Link.java:445)
     [java]     at com.google.gwt.dev.Link.link(Link.java:178)
     [java]     at com.google.gwt.dev.Compiler.compile(Compiler.java:244)
     [java]     at com.google.gwt.dev.Compiler.compile(Compiler.java:155)
     [java]     at com.google.gwt.dev.Compiler.compile(Compiler.java:144)
     [java]     at com.google.gwt.dev.Compiler$1.run(Compiler.java:118)
     [java]     at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:55)
     [java]     at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:50)
     [java]     at com.google.gwt.dev.Compiler.main(Compiler.java:125)
     [java]          [ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...)

BUILD FAILED
/mnt/c/Users/capuzb/research/punya/appinventor/build.xml:16: The following error occurred while executing this line:
/mnt/c/Users/capuzb/research/punya/appinventor/appengine/build.xml:640: Java returned: 1

Total time: 17 minutes 13 seconds

Also, do you know why the Build < Android App (.apk) produces an error pop-up that says Server error: could not build target. Please try again later!?

You'll need to increase the -Xmx parameter in the YaClientApp target if you're running out of memory.

You need to run ant RunLocalBuildServer to run the build server in a separate terminal. You may also need to adjust your firewall settings so that it can listen on port 9990.

Increasing the -Xmx parameter in the YaClientApp target worked!

Downloading the APK on https://punya.appinventor.mit.edu/ still produces the server error

If you're running locally, you need to run a local copy of the buildserver to be able to build your apps.

It works when I run locally using the buildserver, but doesn't work on the public website version

We've been having some infrastructure related issues on our end that are affecting buildservers. I'll take a look.

2 Likes

I am getting this issue when I run it. It seems different from what bcapuzzo is getting.

Buildfile: /home/spadezap/Research/punya/appinventor/build.xml

all:

init:

MakeWarLibsDir:

common_CommonUtils:

init:

CommonUtils:

common_CommonVersion:

init:

CommonVersion:

components_CommonConstants:

init:

CommonConstants:

WarLibs:

AiSharedLib:

AiServerLib:

components_AndroidRuntime:

common_CommonVersion:

init:

CommonVersion:

init:

HtmlEntities:

Barcode:

CopyComponentLibraries:

common_CommonUtils:

init:

CommonUtils:

CommonConstants:

AnnotationProcessors:

AndroidRuntime.uptodate:

AndroidRuntime:

AiClientLib:

AiRebindLib:

blocklyeditor_BlocklyTranslationGenerator:

CheckBlocklyTranslations:

init:

CheckBlocklyCompile:

BlocklyCompile:
[java] Exception in thread "main" java.lang.ExceptionInInitializerError
[java] at org.plovr.cli.BuildCommand.runCommandWithOptions(BuildCommand.java:58)
[java] at org.plovr.cli.BuildCommand.runCommandWithOptions(BuildCommand.java:31)
[java] at org.plovr.cli.AbstractCommandRunner.runCommand(AbstractCommandRunner.java:41)
[java] at org.plovr.cli.Command.execute(Command.java:47)
[java] at org.plovr.cli.Main.mainWithExitCode(Main.java:56)
[java] at org.plovr.cli.Main.main(Main.java:30)
[java] Caused by: com.google.inject.internal.util.$ComputationException: java.lang.ExceptionInInitializerError
[java] at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:553)
[java] at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:419)
[java] at com.google.inject.internal.util.$CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
[java] at com.google.inject.internal.FailableCache.get(FailableCache.java:50)
[java] at com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:49)
[java] at com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:125)
[java] at com.google.inject.internal.InjectorImpl.initializeBinding(InjectorImpl.java:507)
[java] at com.google.inject.internal.AbstractBindingProcessor$Processor$1.run(AbstractBindingProcessor.java:159)
[java] at com.google.inject.internal.ProcessedBindingData.initializeBindings(ProcessedBindingData.java:44)
[java] at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:122)
[java] at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106)
[java] at com.google.inject.Guice.createInjector(Guice.java:95)
[java] at com.google.inject.Guice.createInjector(Guice.java:72)
[java] at com.google.inject.Guice.createInjector(Guice.java:62)
[java] at com.google.template.soy.GuiceInitializer.initializeIfNecessary(GuiceInitializer.java:55)
[java] at com.google.template.soy.SoyFileSet$Builder.(SoyFileSet.java:141)
[java] at com.google.template.soy.SoyFileSet$Builder.(SoyFileSet.java:125)
[java] at org.plovr.CompileRequestHandler.(CompileRequestHandler.java:33)
[java] ... 6 more
[java] Caused by: java.lang.ExceptionInInitializerError
[java] at com.google.inject.internal.cglib.reflect.$FastClassEmitter.(FastClassEmitter.java:67)
[java] at com.google.inject.internal.cglib.reflect.$FastClass$Generator.generateClass(FastClass.java:72)
[java] at com.google.inject.internal.cglib.core.$DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
[java] at com.google.inject.internal.cglib.core.$AbstractClassGenerator.create(AbstractClassGenerator.java:216)
[java] at com.google.inject.internal.cglib.reflect.$FastClass$Generator.create(FastClass.java:64)
[java] at com.google.inject.internal.BytecodeGen.newFastClass(BytecodeGen.java:207)
[java] at com.google.inject.internal.DefaultConstructionProxyFactory.create(DefaultConstructionProxyFactory.java:53)
[java] at com.google.inject.internal.ProxyFactory.create(ProxyFactory.java:153)
[java] at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:89)
[java] at com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:28)
[java] at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:36)
[java] at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:32)
[java] at com.google.inject.internal.FailableCache$1.apply(FailableCache.java:39)
[java] at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:549)
[java] ... 23 more
[java] Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte,int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @163cc7b8
[java] at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
[java] at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
[java] at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:200)
[java] at java.base/java.lang.reflect.Method.setAccessible(Method.java:194)
[java] at com.google.inject.internal.cglib.core.$ReflectUtils$2.run(ReflectUtils.java:56)
[java] at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
[java] at com.google.inject.internal.cglib.core.$ReflectUtils.(ReflectUtils.java:46)
[java] ... 37 more

BUILD FAILED
/home/spadezap/Research/punya/appinventor/build.xml:16: The following error occurred while executing this line:
/home/spadezap/Research/punya/appinventor/build-common.xml:307: The following error occurred while executing this line:
/home/spadezap/Research/punya/appinventor/blocklyeditor/build.xml:120: Java returned: 1

Total time: 2 seconds

I think I've identified the issue on the production build servers and I'm working on a fix.

Any news on this fix?

Unfortunately I have had a lot of deadlines so I am yet to get to implementing a solution.

Okay, please tell me when you can get it out.