Downloading .apk file on local server build hangs at 100%

Hey everyone! I'm new to the community/open-source so please forgive me if I make an obvious mistake.

Issues:

  1. Attempting to download the .apk file under the Build options hangs at 100% with the following message:
    "Waiting for the barcode."

  2. Additionally, adding components to a screen on App Inventor local server build causes a red alert to appear at the top of the browser with the following message:
    "Server error: could not save one or more files. Please try again later!"

Steps to Reproduce:
Starting Point: after sshing into vagrant (as described in README)
$git submodule update --init
$ant clean
$ant MakeAuthKey
$ant
$start_appinventor
*Navigate to http://localhost:8888
*Add component to screen (2)
*Use build window to get .apk file (1)

Machine Details:
Host Operating System: Windows 10
Setup Method: Vagrant (as described in the README)
Vagrant Version: 2.2.15
3rd-Party Provider: VirtualBox 6.1

Thoughts:
Most of the error messages seem to list google app engine. I found an issue with a similar error message
https://github.com/mit-cml/appinventor-sources/issues/2093
which thinks App Engine version might be outdated. However, I'm using the vagrant setup so my dependencies should be valid for building purposes.

$ cd appinventor/buildserver
$ ant RunLocalBuildServer

Just run build server

1 Like

Yes, I tried that earlier, but it does not fix my problem. Running the dev server before the build server seems to throw a port collision.

Running the build server before the dev server, however, gives the following FileNotFoundException (top terminal) which points to a missing encoded_gs_key

To give more information, I'm running both the dev and build servers on the same computer, just in different terminals.

It looks like you may be running this via Vagrant on Windows. Depending on how your Windows disk is formatted, you might be running into path length problems. Try moving your checkout of the sources to a folder higher up in the folder hierarchy to see if it resolves the problem (in regards to the missing file). The error around having multiple processes listening on 9990 is typically due to having a second buildserver running in another window. Check your process list or use sudo netstat -ntlp to identify the offending program.

Thanks for the response! I will try this asap and let you know how it goes

Sorry for the delay. I can bypass the port issue by starting the build server before running app inventor. As for the missing encoded_gs_key, cloning the repo into a folder higher up in the hierarchy did not resolve the issue. Initially, it was in my Desktop folder, but neither moving it to an individual user folder (e.g. ...User\...) nor to the root folder of my partition (C:\...) worked. I also enabled long file paths just in case it exceeds the 260 character limit. This did not work.

Upon further examination, the FileNotFoundException relating to the encoded_gs_key error occurs when a component is added (i.e. dragged and dropped) to a screen, not when attempting to build the .apk file. The hanging progress bar occurs after building the .apk file, even an empty project. Below is a screenshot of this behavior.

Note that 'BUILD 2' refers to me creating and attempting to build another non-empty project ('test') to determine if the issues were separate before testing on an empty project ('test2').

I understand that the missing key issue seems to be separate from the title of this post. I can open another post with a more accurate title if you like.

The error regarding the encoded key means that the Screen contents will not save, so the project going to the build server will be empty. I think the problem might be that Windows doesn't allow : in filenames, but this is how the Linux version of App Engine encodes file names. You may just need to skip using Vagrant and configure your Windows machine to build (and use the Windows version of App Engine which is aware of these constraints).

Edit: Likewise, the build server needs to send the compiled app, but it cannot be stored so the build will never "finish"

Thank you for this solution! I'll give up on vagrant and follow the manual setup instructions for Windows.