App Inventor 2 Connectivity Issues with emulator.

853 views
Skip to first unread message
Assigned to andrew.f...@gmail.com by josmas...@gmail.com

mvallejo

unread,
Oct 15, 2014, 10:56:36 PM10/15/14
to

So when I try to connect to the emulator on app inventor2 a box comes up and says Connecting... this may take a minute or 2. The emulator phone is already up and is functioning but the application never shows up. I wait around 5 minutes nothing happens, 5 more minutes still nothing so I just cancel. I already tried rebooting before installation, rebooting after installation, turning ad blocker off. I also tried everything in the tutorials, and the trouble shooting sections. I am running the most updated version of chrome, most updated version of MacOSX, and most updated version of App Inventor. If anyone knows what could possibly be wrong I would really appreciate the help because this really has me stumped.
Edit: I also forgot to mention that sometimes I will get a box that says "Companion starting, waiting n seconds to ensure all is running and then after the countdown "Verifying that the Companion started..." box will flash very quickly and then back to the "Companion started.." countdown. Eventually after a few minutes this loop ends and i get a error box that says "Connection Failure: App Inventor is unable to connect to the Android emulator"
Also Im not sure if this is relevant but when I go through the emulator and click on the MIT A12 Companion app that is on the homepage at the bottom it says "Your IP Address is:Error: No Wifi Connection version 2.11ai2. This was strange to me because I am in fact connected to Wifi.

SteveJG

unread,
Oct 16, 2014, 8:55:34 AM10/16/14
to mitappinv...@googlegroups.com
Could you please tell us a little about your project that will not load in the emulator?   Is this a project that loaded previously and will not load now?

Most probably, if the project loaded previously one of the following applies to your code:

1)  You have coding errors in your blocks.  In the Blocks editor, look in the lower left for the yellow and red triangle icons.    If the red icon has a value larger than 0, you have a serious coding error.  Find the block in your code that has a red triangle and fix it.   Red triangles always inhibit creating an apk and may prevent the emulator loading.     Yellow triangles are more forgiving, however, sometimes, these need to be fixed because they trip an internal warning and you do not get a compile, so fix the yellow triangles too.

2) Your source file (the aia file) is larger than the 5Mb limit allowed in AI2.    You can program apps larger than 5Mb in the browser, but the project will not compile or run.  In this case you need to reduce the size of your image and/or sound files.   Most image files can be made quite small by resizing them using a photo manipulation program on your PC to less than 50Kb each.

3)  You might have more than 10 Screens in your app.  AI2 becomes unstable when using more than ten screens.

4) You might have used a too large image as icon. Use a size of 48x48 px or 96x96px instead.

5) Do you have a current version of Chrome?  Be aware, version 36..... had issues with AI2 nearly identical to what you describe in your post.  Check to see if you are using Chrome Version 38.0.2125.104 m  or another version perhaps?


6) You are using a school network.  In a classroom environment   or just using a network in a dorm or in a social area?    The network might be blocking port 8004 if this is not a network established for a class. Some institutions do not allow apps like AI2 to run and a firewall blocks certain activities.

6a) If you are in a class, are others experiencing difficulty with the emulator?

7) You got an error message related to the Companion version.  Most Companion issues can be corrected by (in the AI2 browser)    Connect > Hard Reset ; then following the instructions that may appear.  If you do not get instructions, AI2 thinks you have the correct tools; if not you will see a pop-up.   Follow the instructions exactly regarding the emulator, then close your browser, reset your PC and try again.

Regards,
Steve



mvallejo

unread,
Oct 16, 2014, 10:44:42 AM10/16/14
to mitappinv...@googlegroups.com
The emulator has never worked for any project.

1. I am using the meow kitty application that was in the tutorial and followed it exactly so there is no error in the code. 

2.The source file is not larger than 5Mb because Im using the meow kitty application used in the tutorial

3. I don't have more than 10 screens

4. The image isn't too large

5. I am running Version 38.0.2125.104 but I also tried connecting to the emulator with version 33.0 firefox and had the same exact issues.

6. a) Most others in my class have the emulator running fine.

7. I tried using the hard reset. No instructions came up so I just restarted my computer and tried again and still the same issues.

Thanks for taking the time to try to help me. If you want any screens I can provide them for you. Just let me know what you need.

SteveJG

unread,
Oct 16, 2014, 12:08:12 PM10/16/14
to mitappinv...@googlegroups.com
 Thank you for all the information.    I am glad you think there are no coding errors in your version of Hello Kitty.  There might not be any problems with the code, but I note that most times the emulator does not load is because of a coding issue.

Since your fellow students have the emulator running fine I expect one of the following:

1)  Despite your precautions, there may be a coding error.  We can test this very easily if you want to.   Just start a new Project..you might call it "MyButton".  On the designer screen, just put a Button on the designer screen. Nothing else; this is a very simple project.  Now, try to connect to the emulator with the MyButton project.  Does the simple proj run in the emulator?     If it runs, there is probably a problem with your Hello Kitty code...sorry.    If it does not run, this is another issue.  You said the emulator has never run for any project.  I do not know what you tried, so please try the simple MyButton

2)  Are you using a school computer to run your projects or do you use a personal laptop?    If you are using a school Mac, it is possible the school's IT department did not load the aiStarter software properly.   You can show my note here to your instructor.  I suggest your teacher allow you to log into your project from one of the PCs that are working for other students.   If you are allowed to log in from a different PC, what happens?   It would be good to know what happens both with your Hello Kitty and MyButton?    If your projects run, on another PC this is an issue with the PC you are assigned.  (or possibly your personal Mac).

Sorry you are having issues.  Working with you and your instructor, we probably can get you running with the emulator.

Regards,
Steve

mvallejo

unread,
Oct 16, 2014, 12:48:14 PM10/16/14
to mitappinv...@googlegroups.com
thanks again for taking the time to continue to help

1. I tried the simple button application like you suggested and I am still having the same issues.

2. I am using a personal macbook pro early 2011 running maverick version 10.9.5. I'm not sure if any of these brings up an issue with AI2. I just tried the application on a PC and it worked fine so Im guessing some setting or application is interfering with AI2 on my mac but I cant figure out what it is. Is there a list of applications that are known to cause interference with the AI2 and the emulator?

SteveJG

unread,
Oct 16, 2014, 2:14:38 PM10/16/14
to mitappinv...@googlegroups.com
No official list.   Your Mac should work fine.

Some ad blockers interfere.
AVG, Eset and Advast have issues, mostly fixed by changing their Link settings.

Do you have Bluestacks? This is an application to allows users to run Android apk files on their computers.  Bluestacks interferes badly with AI2.  You need to disable Bluestacks to run AI2.

If you ever used Eclipse or Android Studio, there may be issues that exist if you used one of the special emulator screens.  Does the emulator that shows on your screen display 5554:<build>  in the upper left hand corner?   You might have 5556 or something similar.   In that case, you have a different version of the emulator than the emulator that is loaded with AI2 (AI2 uses Google's basic emulator for screens that are 320 x 480)..

You might try using Firefox, even though you have the most up to date Chrome.

Any of these?

Also you might try this:  MIT App Inventor 2 Connection Test    which shows if the aiStarter is actually working.  It will tell us/you if aiStarter is working properly, if not then  when all else fails, you can/should delete the aiStarter stuff and reload

To reinstall:


Hope something above is familiar and turning it off works.

Regards,
Steve

 

mvallejo

unread,
Oct 16, 2014, 2:34:10 PM10/16/14
to
I disabled my adblocker and don't have AVG, Eset, Advast, bluestack, android studio or eclipse. 

Yes my emulator that comes up does show 5554: <build> at the top

Firefox also doesnt work.

I tried reinstalling and that also didn't work but what I did notice was that there are 2 AIStarters running in the background. Is that an issue? and if so how do I kill one of them?

screenshot of the aistarters processes 2 processes of AIstarter

SteveJG

unread,
Oct 16, 2014, 3:07:35 PM10/16/14
to mitappinv...@googlegroups.com
Yes, two copies of aiStarter is an issue I believe.

I do not know on a Mac how to shut one down.    In Windows on a similar screen, either a right or left click on aiStarter and then have an option to terminate the process.    I would close both,  then consider a complete delete/reinstall.

I would hope a Mac user would get in the discussion.... 

mvallejo

unread,
Oct 16, 2014, 3:14:09 PM10/16/14
to
There is an option to quit the prcoess/ force quit the process but when I try to quit it still remains open and I cannot completely delete while it is running.

SteveJG

unread,
Oct 16, 2014, 3:15:30 PM10/16/14
to mitappinv...@googlegroups.com
Completly shutting down your mac and restarting probably will close both.   On a Windows box, that would work.    Try restarting.

mvallejo

unread,
Oct 16, 2014, 3:25:21 PM10/16/14
to mitappinv...@googlegroups.com
Shuttting down didn't close either of them for me.

SteveJG

unread,
Oct 16, 2014, 3:34:13 PM10/16/14
to mitappinv...@googlegroups.com
What did you do?   Shut down and then restarted the AI2 browser?

I am going to contact one of the MIT Technical staff and ask him to help.... It might take a while to get a response.

Regards,
Steve

mvallejo

unread,
Oct 16, 2014, 3:35:43 PM10/16/14
to mitappinv...@googlegroups.com
I shut down my computer and looked in my activity monitor and they were both still there.

SteveJG

unread,
Oct 16, 2014, 3:42:40 PM10/16/14
to mitappinv...@googlegroups.com
I am not sure how that is supposed to work on Mac's.    On windows, aiStarter loads automatically,even without eliciting the browser and the AI2 web site.  However, we do not get two starters.    I have kicked this up to one of best technical guys.    Let us see what he recommends.

mvallejo

unread,
Oct 16, 2014, 3:44:29 PM10/16/14
to mitappinv...@googlegroups.com
Thanks for spending so much time to help me. How long do you think it would take him to look at this though?

Jos

unread,
Oct 16, 2014, 3:55:20 PM10/16/14
to mitappinv...@googlegroups.com
Having two processes running is not the issue. I am not certain why two are needed, but I can also see two in my machine and the emulator works fine.
The issue has to be somewhere else. Do you have a firewall in your machine? Macs have their own firewall enabled by default, but if you are using some other one, that can be the issue.

mvallejo

unread,
Oct 16, 2014, 4:09:14 PM10/16/14
to mitappinv...@googlegroups.com
I do not have a firewall enabled.

Jos

unread,
Oct 16, 2014, 4:29:37 PM10/16/14
to mitappinv...@googlegroups.com
If there's no firewall, to be honest, I have no idea what might be happening; You mention using a personal computer, but are you on the school network? Is the same happening if you are on a different network?

mvallejo

unread,
Oct 16, 2014, 4:32:36 PM10/16/14
to mitappinv...@googlegroups.com
What does school network mean exactly? I thought being on the school network meant being connected to the school's wifi.

Jos

unread,
Oct 16, 2014, 4:37:14 PM10/16/14
to mitappinv...@googlegroups.com
Yes, that's what it means. Does it happen only when you are on the school wifi or on any wifi? Just trying to rule out that there's nothing on the particular network you are using that might be interfering.

mvallejo

unread,
Oct 16, 2014, 4:40:58 PM10/16/14
to mitappinv...@googlegroups.com
I have never tried it with any other network because that is the only network I have available. Although I did try it on a windows pc on the same network and it worked fine.

Jos

unread,
Oct 16, 2014, 4:54:16 PM10/16/14
to mitappinv...@googlegroups.com
I am out of ideas here; I'll assign this thread to the person that wrote the installer, he might be able to help at some point.

SteveJG

unread,
Oct 16, 2014, 6:01:23 PM10/16/14
to mitappinv...@googlegroups.com
A reply might take a while.   If this were my Mac, I would delete the aiStarter stuff and reload
http://appinventor.mit.edu/explore/ai2/update-setup-software.html    .... be sure to use the Mac instructions.

To reinstall follow the instructions here:

Good luck.  Sorry I was not able to help you solve the issue, but re-installing might.

Regards,
Steve



mvallejo

unread,
Oct 16, 2014, 6:15:46 PM10/16/14
to mitappinv...@googlegroups.com
@SteveJG 
Thanks for trying to help and I did delete try reinstalling but it I still get the same issue.
Reply all
Reply to author
Forward
0 new messages