0

I have installed App Inventor 2 using a Debian package and these instructions. The software is 32 bit and my computer is 64.

Apparently also needed Oracle JRE for App Inventor and finally got it to work with Firefox. (The verification of my Java version works on Oracle's website and Firefox correctly opens jnlp files.)

However, I can't get aiStarter to work, which is needed to use the online Emulator. Seems to have to do with the 32-64-bit clash? I get the following error:

$ ./aiStarter
Bottle server starting up (using WSGIRefServer())...
Listening on http://127.0.0.1:8004/
Hit Ctrl-C to quit.

Shutdown...
Traceback (most recent call last):
  File "<string>", line 129, in <module>
  File "/home/mckinney/Development/repo/mit-cml/appinventor-setup/Linux/aiStarter/build/aiStarter/out00-PYZ.pyz/bottle", line 2389, in run
  File "/home/mckinney/Development/repo/mit-cml/appinventor-setup/Linux/aiStarter/build/aiStarter/out00-PYZ.pyz/bottle", line 2086, in run
  File "/usr/lib/python2.7/wsgiref/simple_server.py", line 144, in make_server
    return [stdout.getvalue()]
  File "/home/mckinney/Development/repo/mit-cml/appinventor-setup/Linux/aiStarter/build/aiStarter/out00-PYZ.pyz/SocketServer", line 419, in __init__
  File "/usr/lib/python2.7/wsgiref/simple_server.py", line 48, in server_bind
    HTTPServer.server_bind(self)
  File "/home/mckinney/Development/repo/mit-cml/appinventor-setup/Linux/aiStarter/build/aiStarter/out00-PYZ.pyz/BaseHTTPServer", line 108, in server_bind
  File "/home/mckinney/Development/repo/mit-cml/appinventor-setup/Linux/aiStarter/build/aiStarter/out00-PYZ.pyz/SocketServer", line 430, in server_bind
  File "/home/mckinney/Development/repo/mit-cml/appinventor-setup/Linux/aiStarter/build/aiStarter/out00-PYZ.pyz/socket", line 224, in meth
socket.error: [Errno 98] Address already in use
/usr/google/appinventor/commands-for-Appinventor/adb: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

I also read this that I though might help and tried the following to see what dependencies to install, but no luck from what I can see:

$ dpkg-deb -I appinventor2-setup_2.3_all.deb 
 new debian package, version 2.0.
 size 75112754 bytes: control archive=2310 bytes.
     286 bytes,    10 lines      control              
   14440 bytes,   123 lines      md5sums              
 Package: appinventor2-setup
 Version: 2.3
 Architecture: all
 Maintainer: Hal Abelson <hal@mit.edu>
 Installed-Size: 173563
 Section: misc
 Priority: optional
 Description: Appinventor2-setup version 1.1
   This software is used in conjunction with
   MIT App Inventor.  See appinventor.mit.edu

Anyone who's managed this and can give me a hand?

Ingrid
  • 371
  • Make sure you're not running something else on port 8004 - socket.error: [Errno 98] Address already in use indicates that you may already have something running there – Thomas Ward Feb 18 '16 at 14:42
  • Hm.. I get this from netstat -lp: tcp 0 0 localhost:8004 *:* LISTEN 6957/aiStarter. Is it already running there itself? (Sorry for silly questions, don't know much about ports...) – Ingrid Feb 18 '16 at 14:47

1 Answers1

0

Based on the error message of socket.error: [Errno 98] Address already in use in your error log output above, the problem is that something is binding already to port 8004 on the system.

Based on your netstat output in your comment above, something is already listening on port 8004 on localhost (aka 127.0.0.1), and that something is aiStarter. My guess is the application is already running; it may be configured such that it loads at boot or loaded right after installation. It may also be the case that this is a temporary thing and when you reboot or log off you'll have to run the command to execute aiStarter again.

The second problem you have is that you're missing a lot of libraries - including the 32-bit version of libstdc++. My guess is you'll need a lot of libraries, so lets go ahead and install build-essential. This pulls in a lot more than just libstdc++, but it may help resolve a majority of the 'missing library' issues you're going to be seeing.

Thomas Ward
  • 74,764
  • Thanks, that is true - I noticed now on a connection test they have at App Inventor that aiStarter is active. But it still says it's not when I try to use the online emulator, so something is still wrong.. – Ingrid Feb 18 '16 at 14:53
  • @Ingrid sudo killall aiStarter; then try and run the program again and see if it works. If you still get that issue, then that's a different question. – Thomas Ward Feb 18 '16 at 14:54
  • Ok, something seems to have changes since the last error message, because now I get: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory. And I can't get aiStarter to run again after restarting terminal. – Ingrid Feb 18 '16 at 15:03
  • @Ingrid that's a different issue needing its own question - but it looks like you're missing some required libraries – Thomas Ward Feb 18 '16 at 15:11
  • Well, there was also an error about libstdc++.so.6 missing in my first error message. I guess that's connected with libz.so.1 missing? Can't a solution to both the port issue and the libraries be the answer? :) – Ingrid Feb 18 '16 at 15:23
  • @Ingrid "address already in use" and "Missing libraries" are different issues; your question only addresses the failing to bind issue given the errors. – Thomas Ward Feb 18 '16 at 15:26