Problem connecting emulator to project

298 views
Skip to first unread message
Assigned to andrew.f...@gmail.com by steve....@gmail.com

alicia bernard

unread,
Mar 21, 2015, 2:02:28 PM3/21/15
to mitappinv...@googlegroups.com

Hi, I would like some help.

I downloaded the aiStarter setup file, it seemed to have been installed fine, then I try to connect the emulator to my project  and a message appears that says i should wait for 1 or 2 minutes and then this comes up: 








 After reading your guide to fixing possible mistakes and testing a few things , I still couldn't figure out what's wrong. This is what appears in the aiStarter window after the connection failure:




















Then  I checked if the run-emulator command runs on its own and it does. It runs and then appears an android phone image. So i assume that the aiStarter  is installed ok. It is my first project and the only thing i did was add one button. How can i solve this problem? 


Thank you for your help :)

SteveJG

unread,
Mar 21, 2015, 2:20:38 PM3/21/15
to mitappinv...@googlegroups.com
Did you install the emulator using the instructions here:  http://appinventor.mit.edu/explore/ai2/setup-emulator.html  ?

Did you you start the emulator    with    Connect >  Emulator    from the AI browser screen?      If you start the emulator that way you should have no problems.   When you installed the emulator, did you follow the instructions asking you to update Companion to version 2.24?    If you did not you can   do the following:     Connect > Hard Reset ; then follow the on screen instructions.

Read the above, try the suggestions. Is the emulator working for you now?

Regards,
Steve

alicia bernard

unread,
Mar 21, 2015, 3:54:35 PM3/21/15
to mitappinv...@googlegroups.com
Hi Steve, 

When installing the emulator it didn't ask me to do anything concerning the companion, other than that I have done everything just like you descriped and it's still the same...i really don't know what else to do ! 

SteveJG

unread,
Mar 21, 2015, 4:57:44 PM3/21/15
to mitappinv...@googlegroups.com
When you installed the emulator, the first time you tried to us it, the emulator should have asked you to update Companion.   You say it did not, then did you do a Hard Reset?    

alicia bernard

unread,
Mar 21, 2015, 5:33:57 PM3/21/15
to mitappinv...@googlegroups.com

I did the Hard Reset but nothing changed.  I also uninstalled and reinstalled it several times, always after rebooting and nothing changed. There was nothing about the Companion.
Please enlighten me, i thought the Companion was irrelevant when you  just want to run your app on emulator on your computer and not on another device. Is the companion  necessary  in all cases? 

Enis

unread,
Mar 21, 2015, 10:38:28 PM3/21/15
to mitappinv...@googlegroups.com
The only place the Companion ISN'T needed is when you send a compiled APK to yourself via email.

The Companion connects App Inventor with the device... be it an emulator, or a physical device.  For example:
  • You Build your APK but send it to the device via the QR barcode.
  • You connect real time in the development environment to the emulator via the Companion on the emulator.
  • You connect the device in development mode by choosing the Companion from the Connect menu, and then scanning using the Companion on the device...

Here are some of the connection issues I know about:

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.

Make sure too that your browser versions are current.  If you're using Chrome, switch to Firefox and try that...

One more thing you should try...

You should MANUALLY uninstall AI2 and then run setup again.  Here's the instructions for that:

Please reinstall the setup software:  FOLLOW THE STEPS BELOW EXACTLY, DO NOT SKIP OR ALTER ANY STEPS:

I suggest you try to reinstall the software and see if it still happens, and then, PLEASE report back here and let us know if it fixed your problem.  Please follow these steps.
  1. Close down everything on your computer and REBOOT.
  2. After the reboot, uninstall the software from the icon in the App Inventor folder... it'll be uninstall.exe.
  3. REBOOT AGAIN.  To be SURE, go to your  Program Files folder and make sure the folder for AppInventor is gone.  If not, please delete it before running the setup software.
  4. Go to the setup link (setup software), and reinstall the App Inventor software.  DO NOT CHANGE THE DEFAULTS THAT ARE PROVIDED BY THE SETUP SOFTWARE SUCH AS FOLDER ETC.  Don't run an older setup file version that you might have saved to the downloads folder, but use the current one from the link above.
  5. After the setup is finished...REBOOT AGAIN
  6. Then, try going to the App Inventor site and try loading the emulator again.

You'll have to update the Companion once more.  It should happen automatically, but if it doesn't, shut down the emulator.  Do a Hard reset from the Connect menu.  Click on Connect, then emulator.  The emulator will send up a message that it's out of date... Choose OK to continue... FOLLOW THE PROMPTS EXACTLY! ;)!

That should fix your issue, but make SURE you come back here and reply back so we know it worked, or didn't work.


alicia bernard

unread,
Mar 22, 2015, 10:36:22 AM3/22/15
to mitappinv...@googlegroups.com
Hi Enis, 


I did everything you said in the exact order and nothing changed...i even tried another browser and still nothing. 

Also no matter what i do, nothing ever appears concernig the companion.  Do i have to do something extra about the companion? All i have been doing do far was installing the setup pack and nothing ever came up about the companion when i tried to connect the emualtor.

After doing everything you said, when trying to connect the emulator, I keep getting this error i can't interpete:

 

Guillaume Combot

unread,
Mar 22, 2015, 2:14:54 PM3/22/15
to mitappinv...@googlegroups.com
I have the same problem and somehow I arrived to that http://goo.gl/vQoHtH when I click on the emulator app, but then nothing happens

SteveJG

unread,
Mar 22, 2015, 5:04:11 PM3/22/15
to mitappinv...@googlegroups.com
@ Alica,   when you used the Installer for the emulator; did you have the PC set to install as Admin?

Regards,
Steve

alicia bernard

unread,
Mar 23, 2015, 2:02:38 AM3/23/15
to mitappinv...@googlegroups.com
yes i opened and run the .exe file as an administrator

Enora Nedelec

unread,
Mar 23, 2015, 5:18:09 AM3/23/15
to mitappinv...@googlegroups.com
I also have the same issue than Alicia and Guillaume:
I run aiStarter.exe as administrator, then go to http://ai2.appinventor.mit.edu, connect to the emulator. The emulator starts, the black screen with android is displayed and after a couple of seconds I get the home screen.
Then every couple of seconds, a line "127.0.0.1 - date/hour/ "GET/echeck/..." is added in aiStarter.exe, and on http://ai2.appinventor.mit.edu the message asking me to wait a minute or two while it's starting emulator remains. I have waited for something to happen at this point for 30 minutes, but nothing changes.  (cf print screen: http://i.imgur.com/pGs3UVE.png)

If I understood it well, the companion should be automatically launched and then I should be asked if I when to update it. But this never happens, it is as if emulator get stuck just before companion get launched, or app inventor never recognize that emulator has started:

Shortly after that, App Inventor should recognize that the emulator has started and start the companion in the emulator, and then load the blocks for your app (source)


I have checked the port on which aiStarter.exe is listenning: it's port 8004 for me and no other programs is listening on it, the connection is allowed for aiStarter.exe and it's not restricted (as per Resource Monitor). 

I have to use the emulator as I don't own an android smartphone.

Guillaume Combot

unread,
Mar 23, 2015, 6:35:37 AM3/23/15
to mitappinv...@googlegroups.com
problem solved here: http://stackoverflow.com/questions/29207717/ai2-mit-emulator-dont-launch-companion/29207991#29207991 (you just need to kill the adb.exe while the emulator is working, wait few second, it will debug the things).
Message has been deleted

alicia bernard

unread,
Mar 23, 2015, 9:18:36 AM3/23/15
to mitappinv...@googlegroups.com
I tried doing that but that proccess doesn't appear! The ones that appear are:


SteveJG

unread,
Mar 23, 2015, 9:41:21 AM3/23/15
to mitappinv...@googlegroups.com
@ alicia    Look here:

...then open the commands-for-Appinventor folder  



regards,
Steve

Guillaume Combot

unread,
Mar 23, 2015, 10:50:50 AM3/23/15
to mitappinv...@googlegroups.com
did you try to start it as admin? (right click on the .exe "run it as administrator)
I would disable firewall + UAC, uninstall the MIT_App_Inventor_Tools_2.3, reboot, reinstall (as admin), reboot, start it again (as admin).
It would takes 10 min maxi. 

I have updated my question here, you could try that:

Guillaume Combot

unread,
Mar 23, 2015, 10:51:49 AM3/23/15
to mitappinv...@googlegroups.com
@Steve you might like sharex (for print screen, open source)
Reply all
Reply to author
Forward
0 new messages