Using the emulator on a school network

448 views
Skip to first unread message
Assigned to j...@mit.edu by shadow...@gmail.com

didac...@gmail.com

unread,
Jul 20, 2014, 6:48:18 PM7/20/14
to mitappinv...@googlegroups.com
We have OS X and Windows available, so I have tried both. We have different errors and behaviours from each, so this gets complicated.

The emulator works under a staff account. It does not work under a student account.

In Windows, aiStarter runs, but does not accept connections (except sometimes, don't ask me why). The website logs CORS errors when trying to connect.

In OS X, aiStarter fails to run with a "socket in use" error (Errno 48). This has been reported by many other people, but remains unsolved. I believe it means that aiStarter is (like on Windows) running already but failing to accept connections.

I don't know enough about our firewall and proxy configuration to go into more detail, but I think it's smoothwall. It's a filtering proxy and we have limited control over it anyway.

How can we isolate the problem further?

Regards

David


SteveJG

unread,
Jul 20, 2014, 9:24:09 PM7/20/14
to
Here are several documents MIT has available for troubleshooting networks:


https://docs.google.com/document/d/1NbJRyCA9udxdU3oNyadR0fuvNglijYR7X3mVB_ZIeNU/pub




Connecting the phone over wifi       not your stated issue, but have you attempted WIFI (if you can)...if this works, it narrows the emulator issues.

I'm using wireless and the phone won't connect to the blocks editor.

Try the following steps to troubleshoot your wireless connection.

  1. Try to reach http://rendezvous.appinventor.mit.edu from your computer.
  2. Try to reach http://rendezvous.appinventor.mit.edu from the phone itself.
  3. If the steps above both work, try using the "ping" command to ping to the IP Address of the phone (displayed by the MIT AICompanion in its startup window). If you are using windows, type "ping" + *IP address of the phone* in cmd.exe window, if you are using mac or linux, type type "ping" + *IP address of the phone* in terminal window. Detailed instruction see http://www.wikihow.com/Ping-an-IP-Address
  4. If all of these steps succeed and Wireless App Inventor *still* doesn't work, then there may be a firewall between the computer and phone that is blocking ports 8001 and 9987. If you have a "telnet" program you can attempt to telnet from the computer to the phone on these ports. If the connection won't complete, then there is likely a firewall in place that is blocking connections to the phone.

You probably have already been there, however you may not have looked here at the treads discussing firewall issues:    https://groups.google.com/forum/#!searchin/mitappinventortest/firewall     .   The list is a bit disorganized but there will be suggestions/solutions others faced while battling school network firewalls.
It may help.   If it does, let us know.   If none of this stuff works for you, please return and let us know what else you have tried.


You said: David " In Windows, aiStarter runs, but does not accept connections (except sometimes, don't ask me why)."    What does this mean?   You can see the black AI starter panel, but the emulator does not come up?   or something else.      We have noticed that some emulator issues are related to browser issues, if you are using Chrome, try Firefox, or vice versa.   Are there any plug-ins on your browsers?   One add blocker  .. I think it is adbl  or something like that needs to be turned off w/ firefox.    Also virus scanners...we have reports the AVG and one other Eset?  have an issue unless the 'Advanced Settings ' on the virus software are set to allow linking with the AI2 site.

Here is another weird one.  When you are testing, do you have a Project "loaded" in the AI browser.    Sometimes first time users fail to have a project loaded and when that happens the emulator has nothing to emulate so it goes weird.   The solution is to load the aia from a simple project.

Do some reading, try some things and return and let us know what you discover.    It is difficult troubleshooting network connections and more difficult when we just give advice.  "Tell us more what you tried.

Are you the school's designated IT person or is there someone there who has that responsibility.   Frequently the school has someone who can help.

Regardless, we will try to get you running.   There are LOTS of schools working well with AI2 and we would like your to work too.

Regards,
Steve



Enis

unread,
Jul 20, 2014, 9:25:22 PM7/20/14
to mitappinv...@googlegroups.com
Hi David...

Here's a connection and setup problem guide...

Most of the emulator connection problems we have seen are a result of not having the most current version of the App Inventor setup software, or that software having been incompletely installed.

Still, there can be many other issues that could cause the connection to the emulator to fail.  Please read and follow the document below on connection issues:

Click here for Emulator Setup and Trouble Shooting Instructions

If you still cannot get the emulator running after following that document, please post in the forum and we'll try to help you out.

didac...@gmail.com

unread,
Jul 21, 2014, 1:25:42 AM7/21/14
to mitappinv...@googlegroups.com
I should have mentioned... in the course of our testing, we have seen the same issues in Chrome, Firefox and Safari.

We have already spent a considerable amount of time looking into this, and I have tried everything in the resources you suggest. Yes we have a project loaded when launching the emulator, but it never never even starts so I really don't think blocks are an issue.

When I say "we", I mean myself (CS teacher) and our IT team.

When I said "does not accept connections", I mean that in Windows, the aiStarter panel is present, and started successfully, but does not log requests and from the browser, requests appear to time out. In OS X, the behaviour is similar, but harder to diagnose exactly.

The most promising lead I have so far is the CORS error, it shows something clearly failing to work as designed. These errors are not logged when the emulator is working correctly.

Regards

David

didac...@gmail.com

unread,
Jul 21, 2014, 1:33:23 AM7/21/14
to mitappinv...@googlegroups.com
In the course of our testing, we have installed the software multiple times, and we have checked the versions are correct. Sadly, this isn't a quick fix.

I should reiterate: the problem is connecting to aiStarter. The emulator is never even launched. aiStarter is *running* however.

Regards

David

SteveJG

unread,
Jul 21, 2014, 8:54:01 AM7/21/14
to mitappinv...@googlegroups.com
The MIT development team has received a note of your issues David.

My guess, the issue is the school firewall / proxy server    is blocking.    Sorry, I can not help you there.

Thanks for answering the questions, the answers may help someone figure out a solution.

@MIT      here is the issue in a nutshell:
*  OS X and Windowsboth are available.  They result in different errors and behaviors from each

* The emulator works under a staff account. It does not work under a student account.   

* In Windows, aiStarter runs, but does not accept connections (except sometimes,). The website logs CORS errors when trying to connect.

* In OS X, aiStarter fails to run with a "socket in use" error (Errno 48). This has been reported by many other people, but remains unsolved. I believe it means that aiStarter is (like on Windows) running already but failing to accept connections.

* The firewall may be smoothwall. It's a filtering proxy and we have limited control over it anyway.

@David......     Can AI2 run on any of these systems using WIFI?     I expect there is no WIFI, but if there is, does AI2 run on any of the student PCs?   I realize you will not have the student's running WIFI however knowing this could isolate the issue.     Have you tried a USB connection with one of the student PCs?

The Windows PC ... what are they?      8.1, Win 7, Xp?     We are trying to find out if some issues are related to 'under powered'   window's PCs  running cache instead of real PC memory.

Would you confirm what your firewall is?     Is it smoothwall?

Can you take a student PC home, attach it to a home network?   If so, does it run.    If it runs, you are most probably dealing with a network issue and perhaps one of the MIT guys will have a recommendaton.

Sorry, at the moment, all I can do is let you know we are trying to come up with other ideas since you guys are certain you installed everything according to procedure.

Please let us know how this progresses.   We want to get ya'll up and running.

Regards,
Steve



didac...@gmail.com

unread,
Jul 21, 2014, 1:20:59 PM7/21/14
to mitappinv...@googlegroups.com
We are very close to a solution now.

Today when I tested (Firefox on OS X) I was testing different proxy settings and I got a 403 forbidden response from localhost:8004, which shouldn't have happened. I dug further and the response was from the squid proxy, so clearly localhost was not bypassing the proxy like it was supposed to.

Before we close this, our IT department have some more changes and tests to do.

Meanwhile, I would like to request some changes to make future issues easier to deal with, because part of our problem was the sheer amount of time wasted by incorrect error messages and "kitchen sink" documentation.

1) The appinventor.mit.edu/test/ page should be more prominently documented. If we had known about it sooner, our IT department would have been able to test without messing around with Google accounts and so on.
2) Neither the test page nor the site should claim that aiStarter is not running simply because they can't communicate with it. Ideally, they should display the actual error. They could even check the server header to see what they are talking to.
3) Running aiStarter when it is already running should fail gracefully and informatively.

Hopefully this will save other installers some time in the future.

Regards

David

SteveJG

unread,
Jul 21, 2014, 3:14:32 PM7/21/14
to mitappinv...@googlegroups.com
Sounds like progress David.   Thank you for the update.   We definitely appreciate your suggestions.

I was in contact with one of the developers earlier this morning and we talked about a 'test' program to check for network/system compatibility.
I am forwarding your note to him.  Your suggestions will be taken seriously.

Please keep us informed and when you solve (and it appears you will, let us know).   You are using Smoothwall?

Thanks,
Steve
Reply all
Reply to author
Forward
0 new messages