How do you install MIT AI2 offline in Linux based OS?

Linux & Mac
chmod +x startAIServer.sh (ONLY THE FIRST TIME)
./startAIServer.sh (and go to url: localhost:8888)

tried above, but not launching
output is
image

Are you already using port 8888 for another service? If so you need to change either that or the port AI2 will run on. However, it could be that you already have the Ai2 service up and running, and need to shut that down before starting a new session.

ok will restart my PC and try again

Hurrah!
It works Fine (both Companion and ai2)
But Build server gets this issue


Got the Below Error.
image
I Figured out that, i saw an option called "Generate YAIL". BUt when I Click then nothing happens.
image
If this is the issue then someone help me

nothing solved the issue

As you can see it would be a guessing game if you dont tell anything about your project.


Just inserted check box and button, in order to test the software

Does the project compile in proper AI2?

Yes, I just also tried in normal ai2

I got the same here. hmmmm some testing to do

Error message
SDK_BIN is: /home/peter/AppInventor/AI2Offline3.9/AppEngine
Executing [/usr/lib/jvm/java-11-openjdk-amd64/bin/java, -Dfile.encoding=UTF-8, -classpath, /home/peter/AppInventor/AI2Offline3.9/AppEngine/lib/appengine-tools-api.jar, com.google.appengine.tools.development.DevAppServerMain, --property=kickstart.user.dir=/home/peter/AppInventor/AI2Offline3.9, --no_java_agent, --port=8888, --address=0.0.0.0, /home/peter/AppInventor/AI2Offline3.9/war]


There is a new version of the SDK available.

Latest SDK:
Release: 1.9.97
Timestamp: Thu May 26 09:27:02 CEST 2022
API versions: [1.0]


Your SDK:
Release: 1.9.94
Timestamp: Thu Jan 01 01:00:00 CET 1970
API versions: [1.0]


Please visit gcloud components update  |  Google Cloud CLI Documentation
to see how to get the latest version.


WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.appengine.tools.development.StreamHandlerFactory (file:/home/peter/AppInventor/AI2Offline3.9/AppEngine/lib/impl/appengine-local-runtime.jar) to method java.net.URL.getURLStreamHandler(java.lang.String)
WARNING: Please consider reporting this to the maintainers of com.google.appengine.tools.development.StreamHandlerFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Jun 04, 2022 5:49:06 PM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties
INFO: Overwriting system property key 'java.util.logging.config.file', value '/home/peter/AppInventor/AI2Offline3.9/AppEngine/config/sdk/logging.properties' with value 'WEB-INF/logging.properties' from '/home/peter/AppInventor/AI2Offline3.9/war/WEB-INF/appengine-web.xml'
2022-06-04 17:49:06.611:INFO::main: Logging initialized @832ms to org.eclipse.jetty.util.log.StdErrLog
2022-06-04 17:49:06.638:WARN:oejs.AbstractConnector:main: Ignoring deprecated socket close linger time
2022-06-04 17:49:06.755:INFO:oejs.Server:main: jetty-9.4.44.v20210927; built: 2021-09-27T23:02:44.612Z; git: 8da83308eeca865e495e53ef315a249d63ba9332; jvm 11.0.15+10-Ubuntu-0ubuntu0.20.04.1
Jun 04, 2022 3:49:07 PM com.google.appinventor.server.storage.ObjectifyStorageIo
INFO: Default GCS Bucket Configured from App Identity: app_default_bucket
Jun 04, 2022 3:49:07 PM com.google.appengine.api.datastore.dev.LocalDatastoreService init
INFO: Local Datastore initialized:
Type: High Replication
Storage: /home/peter/AppInventor/AI2Offline3.9/war/WEB-INF/appengine-generated/local_db.bin
Jun 04, 2022 3:49:07 PM com.google.appengine.api.datastore.dev.LocalDatastoreService load
INFO: Time to load datastore: 11 ms
2022-06-04 17:49:07.336:INFO:oejsh.ContextHandler:main: Started c.g.a.t.d.j.DevAppEngineWebAppContext@35f639fa{/,file:///home/peter/AppInventor/AI2Offline3.9/war/,AVAILABLE}{/home/peter/AppInventor/AI2Offline3.9/war}
2022-06-04 17:49:07.337:INFO:oejs.session:main: DefaultSessionIdManager workerName=node0
2022-06-04 17:49:07.337:INFO:oejs.session:main: node0 Scavenging disabled
2022-06-04 17:49:07.355:INFO:oejs.AbstractConnector:main: Started NetworkTrafficSelectChannelConnector@2f01783a{HTTP/1.1, (http/1.1)}{0.0.0.0:8888}
2022-06-04 17:49:07.356:INFO:oejs.Server:main: Started @1578ms
Jun 04, 2022 3:49:07 PM com.google.appengine.tools.development.AbstractModule startup
INFO: Module instance default is running at http://localhost:8888/
Jun 04, 2022 3:49:07 PM com.google.appengine.tools.development.AbstractModule startup
INFO: The admin console is running at http://localhost:8888/_ah/admin
Jun 04, 2022 5:49:07 PM com.google.appengine.tools.development.DevAppServerImpl doStart
INFO: Dev App Server is now running
Jun 04, 2022 5:49:37 PM com.google.appengine.api.datastore.dev.LocalDatastoreService$11 run
INFO: Time to persist datastore: 7 ms
Jun 04, 2022 5:50:07 PM com.google.appengine.api.datastore.dev.LocalDatastoreService$11 run
INFO: Time to persist datastore: 7 ms
Jun 04, 2022 5:50:08 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Received a build.status file contents = 0
Jun 04, 2022 5:50:09 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Received a build.status file contents = 15
Jun 04, 2022 5:50:09 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Received a build.status file contents = 20
Jun 04, 2022 5:50:10 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Received a build.status file contents = 30
Jun 04, 2022 5:50:11 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Saving build output files: build/Android/build.out
Jun 04, 2022 5:50:37 PM com.google.appengine.api.datastore.dev.LocalDatastoreService$11 run
INFO: Time to persist datastore: 4 ms
Jun 04, 2022 5:51:04 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Received a build.status file contents = 0
Jun 04, 2022 5:51:05 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Received a build.status file contents = 15
Jun 04, 2022 5:51:05 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Received a build.status file contents = 20
Jun 04, 2022 5:51:05 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Received a build.status file contents = 30
Jun 04, 2022 5:51:06 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Saving build output files: build/Android/build.out
Jun 04, 2022 5:51:07 PM com.google.appengine.api.datastore.dev.LocalDatastoreService$11 run
INFO: Time to persist datastore: 3 ms
Jun 04, 2022 5:51:20 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Received a build.status file contents = 0
Jun 04, 2022 5:51:21 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Received a build.status file contents = 15
Jun 04, 2022 5:51:21 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Received a build.status file contents = 20
Jun 04, 2022 5:51:21 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Received a build.status file contents = 30
Jun 04, 2022 5:51:21 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Saving build output files: build/Android/build.out
Jun 04, 2022 5:51:37 PM com.google.appengine.api.datastore.dev.LocalDatastoreService$11 run
INFO: Time to persist datastore: 2 ms
Jun 04, 2022 5:51:41 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Received a build.status file contents = 0
Jun 04, 2022 5:51:41 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Received a build.status file contents = 15
Jun 04, 2022 5:51:41 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Received a build.status file contents = 20
Jun 04, 2022 5:51:41 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Received a build.status file contents = 30
Jun 04, 2022 5:51:42 PM com.google.appinventor.server.ReceiveBuildServlet doPost
INFO: Saving build output files: build/Android/build.out
Jun 04, 2022 5:52:07 PM com.google.appengine.api.datastore.dev.LocalDatastoreService$11 run
INFO: Time to persist datastore: 2 ms

I hope you come up soon with a solution, and I'm waiting for it

Strange it has worked before. Something has changed but I don't know what.

Ohh! Ok let's check in next updated version

Parece que esta utilizando la version de java que viene por defecto en linux que es java 11, para que funcione correctamente se debe usar java 8 en su lugar.

java -version

sudo apt-get update

sudo apt-get install openjdk-8-jdk

java -version

sudo update-alternatives --config java

sudo update-alternatives --config javac

1 Like

Brainfart. I got this problem in the past but didn´t think about it. I got myself a new laptop some weeks ago and on my old one it was working. Thanks for keeping me away from spending to much time in finding the problem. I hope i will keep it in mind the next time.

I think we have already discussed this problem (JDK 8 for AI2Offline) extensively, for example here:

1 Like

Yes we did :grin::grin::grin::grin::grin: thats why i got it wrong. I was thinking that my laptop was running ok. It was the wrong laptop. :crazy_face:

1 Like