New to School as IT Tech

I am the new Tech guy in town at this school, and have never used the App Inventor program before. I am looking for help/suggestions on why were are having certain problems, as random as they are.

Hi @Trevor_Harlow,

Feel free to ask questions here. As an IT person you will also probably want to look at this document:

Thank you for the document. That will help for some things moving forward. One of the issues I am having on 6 of the tablets however is a “runtime” error when connecting to the program on the computer. I can get a screenshot later if it will help.

@Trevor_Harlow Yes, a screenshot of the error would be much appreciated. There are a number of template apps you can test with if you go to Projects > Import project from repository. All of those projects should work if everything is set up correctly.

Here is one error that we are getting. The tablets will work fine for a day or so, then we will start having errors again. Usually if they reset the connection, and connect again they will work, but today they had to due it several times.

The CS teacher actually just scrapped the App program for his Freshman classes because of the all the “issues” he has had…How do they go from working perfectly fine over the last few days to all of a sudden not working? I will obviously continue to work on the issues with them, but I suspect it is more user error more than anything.

Hi @Trevor_Harlow,

Have you had them try using the Legacy option? Depending on your network configuration and the devices you use, it may be more stable. You may also want to look at using the USB option if connection stability continues to be a problem.

A guess is your student computer network occasionally becomes overloaded? Do the classes share the router with the entire institution?

My experience is, when I get this
connectionerrorstate
I click OK and everything ameliorates itself. I just continue working. Certainly try the Legacy Companion option..my experience is it makes little difference using it. Certainly try; it might work if the issue at hand is not too many students using the system. Does this chaos occur when everyone is busy building and designing but it does not happen often when class is not in session and only a few students are developing?

Regards,
Steve

They have clicked OK when this appears, and usually everything is OK afterwards, but they had to repeatedly click OK on this like the connection wasn’t stable all day. They have also used the legacy connection, but I haven’t noticed much of a difference. Would using the USB connection solve any of these issues? This is only used when the class is full. Last week we had up to 20 students using the app and tablets at one time. Everything worked fine for a few days, then they just start having problems again. It doesn’t really make much sense.

I expect the issue is the school network has difficulty handling 20 users and all the other other school users simultaneously with the existing network Trevor. Since you are the IT guy, monitor system usage and run some tests. For reference, I get the error state = disconnected several times a day without a shared network. I guess the issue that trips the message is MIT's use of WebRTC that 'arbitrarily' changes ports. The network might not be able to handle that while it is loaded with users. However, using Legacy is supposed to use the older system of 'fixed' ports and that isn't working for you guys either.

Evan might have other ideas.

Would USB help? Maybe but not if the issue is an under powered network. Try using a USB
connection on a few tablets and see whether the students using USB have a better experience? I recall a PU saying that he/she didn't get the disconnect message while using USB but I cannot confirm that.

One of the MIT developers said this in January There are many reasons why a connection may break. In the case of WebRTC it can be (non exhaustive list)

** If the connection is routed via the TURN server (devices cannot reach each other any other way), the TURN server may get low on resources and toss connections.*
** If the device goes into “sleep” mode and the wifi layer shuts off. WebRTC connections don’t seem to survive this all the time. I’m not sure why.*
** DHCP lease expires and a new IP address is assigned either to the device or the PC*
** WebRTC decides to re-negotiate the connection (it does that, beyond our control) and the new parameters do not work (ports blocked?)*

At the end of the day it is really hard to debug this unless we can reproduce the problem, and I believe we are dealing with multiple problems that all have the same symptom, it stops working!
and this in September last year There are two modes for the browser to connect to the Companion. The older mode, now labeled “Legacy Mode” requires port 8001 between the PC and the device. (and port 80 access to rendezvous.appinventor.mit.edu).

The default mode, aka non-Legacy mode, uses a newer technology called WebRTC. WebRTC uses UDP and indeed chooses a random port in a large range. Unfortunately we have no control over this. On the phone side the ports are chosen by a WebRTC library that we are loath to modify. And on the browser side, the ports are chosen by the browser where we have no control whatsoever.

For now if you do not want to unblock the UDP ports in question, then you can use legacy mode which only uses TCP over port 8001. HOWEVER at some point we will deprecate legacy mode, though we do not have a schedule established yet.

We will need to deprecate legacy mode in order to support serving MIT App Inventor over https. If you look at your browser’s location bar you will see we are using just http, which the browser vendors are labeling “insecure” (because it is...). However if we serve MIT App Inventor over https, then the browsers will not let legacy mode work. This is why we are moving to the WebRTC solution.

  • Steve