Web form report: I have failed for days to get the emulat...

654 views
Skip to first unread message
Assigned to halatmi...@gmail.com by me

mitappinv...@appinventor.mit.edu

unread,
Dec 21, 2013, 12:10:53 PM12/21/13
to mitappinv...@googlegroups.com
Date Submitted: Sat Dec 21 2013 11:09:10 GMT-0500 (EST)
Email: sacra...@danecourt.kent.sch.uk

Service: MIT App Inventor (App Inventor 2)

Operating System: Windows 7

Browser: Chrome

Device: emulator

Connection: want to use the emulator only!

Issue:
I have failed for days to get the emulator started! I am frustrated that so
many things can go wrong, without much that I can do fix those... I run the
aiStarter fine. Then I start a new project and try to launch the emulator.
A popup suggests that it is going to start: "Starting the Android
Emulator...". But after a hour or more, there appears no progress at all. I
have restated several times my computer system, but in vain.
Please help!

Comments:


Hal Abelson

unread,
Dec 21, 2013, 2:29:29 PM12/21/13
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu
The first step is to make sure you are running the latest version of the setup tools.   You can use the test page at appinventor.mit.edu/test to check.

If that doesn't help, then try starting the emulator, and look at the console windows for both the emulalor and for aiStater and see if there's a hint to what might be going wrong.

If THAT doesn't help.  Try getting out of App Inventor and start the emulator by hand form  console window.   Connect to commands-for-apprinventor and run the progrmam "run-emulator" (NOT the program"emulator.exe") and see if the emulator starts and if there are any messages in the console window.

mmes...@gmail.com

unread,
Feb 16, 2014, 5:12:39 PM2/16/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu
I'm having a similar problem. (My stats are the same as the original poster.) I've had multiple problems. Here's what has happened, in order:

When I first connected the emulator through App Inventor, it connected, but it kept saying I had no connection to Wi-Fi. So I read through Troubleshooting and it said to re-connect the emulator, so I reset the connection and clicked Connect->Emulator. And then it wouldn't connect to the emulator.

It would run the same line of text over and over in aiStarter, then Windows would give me an error message saying that Windows had to shut it down, that emulator.exe couldn't be found. This error was also reflected in aiStarter. So I searched Troubleshooting and was instructed to close App Inventor, run the command "run-emulator", and see if the emulator starts. It did start, but it still would not connect to Wi-Fi, and no text appeared in the console window whatsoever. So, no hints about what's wrong.

(In between tries - and there have been many - I've restarted my computer 4 times.)

So I tried again, as advised in Troubleshooting, to connect the emulator by opening App Inventor, opening aiStarter, then clicking Connect->Emulator. Now, nothing is happening. No error messages, no forced shutdown, no text running in the console, no emulator, nothing.

What in the world is going on? Please advise.

mmes...@gmail.com

unread,
Feb 16, 2014, 5:22:49 PM2/16/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu, mmes...@gmail.com
I tried checking appinventor.mit.edu/test and it says that aiStarter is not running, even though the application is open. I've tried it multiple times to no avail.

I just downloaded App Inventor 2 today, and I also ran updates before these problems began, so I assume I have the current versions.

Hal Abelson

unread,
Feb 16, 2014, 6:05:08 PM2/16/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu, mmes...@gmail.com
Are you running on Windows?   If so what happens when you restart aiStarter using the button on your desktop?

What do you see in the console window for aiStarter?

It should just be a bunch of http requests.  Do you see any error messages?

And what are you trying to connect to?  If you are using the emulator and you are behind a proxy, see my message from this morning -- currently at the top of the forum.

Let us know if any of this helps.

Enis

unread,
Feb 16, 2014, 6:20:43 PM2/16/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu, mmes...@gmail.com
Frankly, I think you need to completely uninstall and reinstall AI2.  AI Starter should be RUNNING after a reboot...

Please reinstall the setup software:

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.

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

FYI, the AI Starter doesn't run when AI2 runs... it runs separately.  You can't start the AI Starter from within AI2...


Hal Abelson

unread,
Feb 16, 2014, 7:47:44 PM2/16/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu, mmes...@gmail.com
To underline what Enis said, aiStarter should be running after a reboot (or even a logout and log back in).   So log out and log in, and then press the button on the Windows desktop to restart aiStarter.   If it's running (you'll see it in the task bar), go to the AI2 test page.   If you see aiStarter running, and the test says it is not running please let us know. 

If aiStarter is running and the test says it is running, can you then launch the emulator?   Is everything OK then?

Please let us know.  We want to help you.

mmes...@gmail.com

unread,
Feb 16, 2014, 9:38:28 PM2/16/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu, mmes...@gmail.com

Thanks for your suggestions, guys! To answer Hal's question, yes, I'm running Windows, and no, I'm not behind a proxy. Just a simple home Wifi connection. I've also disabled all browser extensions.

I rebooted, uninstalled, rebooted, and re-installed AI2 Setup without changing any settings (I hadn't changed any settings the first time), and rebooted again. I tried this sequence twice, after Hal's suggestion.

First Re-install:

The emulator connected and auto-updated, but wouldn't connect to Wifi (although I could browse Google via the emulator), so I couldn't get into the AI2 Companion app. In trying to reload the app and change any Wifi settings from within the emulator, I received the error message:

"[Errno 10053] An established connection was aborted by the software in your host machine."

I reset the connection and tried to reconnect the emulator, but it wouldn't connect. I received the error message:

"ERROR: The process "emulator.exe" not found.
Problem stopping emulator : status 128"

This happened repeatedly, after rebooting. aiStarter would run at startup, but would stop working entirely after the emulator failed to connect and I reset the connection.

So, I uninstalled and re-installed again, as directed.


Second re-install:

aiStarter ran. Emulator started, connected and auto-updated. Still no Wifi connection, so I kept getting kicked out of the AI2 Companion app.

I reset the connection and tried reconnecting the emulator, at which point Windows brought up an error message saying "Emulator.exe has stopped working". So I closed the window and clicked the Cancel button on AI2. (This has happened with the previous two installs, as well.) No error messages appear in the console, just the same line of text repeatedly, ending in:

"GET /echeck/ HTTP/1.1" 200 38


Rebooted and tried again. At restart, aiStarter is working. But, same problem when connecting: Emulator.exe has stopped working; the same line of code repeats in the console with no error messages.

After clicking Reset Connection, the console reads:

"GET /ping/ HTTP/1.1" 200 38
"GET /utest/ HTTP/11" 200 38
Killed adb
ERROR: The process "emulator.exe" not found.
Problem stopping emulator : status 128
"GET /reset/ HTTP/1.1" 200 38

Multiple re-tries, no change. The emulator will not connect.

If I close aiStarter and reopen it, then retest, it shows aiStarter is not running even when I'm looking right at the console. No lines of text run on the console at this point, just the opening "Platform = Windows...... hit Ctrl-C to quit." When I type Ctrl-C, it shows:

Killed adb
ERROR: The process "emulator.exe" not found.
Problem stopping emulator : status 128

and then closes.

Hal Abelson

unread,
Feb 16, 2014, 11:06:03 PM2/16/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu, mmes...@gmail.com, Jeff Schiller, Andrew F McKinney
You must be very frustrated.   Thanks for trying so carefully.   You sent a lot of good information, but I can't tell from that what might be wrong.   First, some more information:

What browser are you running?  Do you get the same problem both on Chrome and Firefox?

Are you running on an administrator account.  If not, can you do that?

I know you've done this several times already, but please reinstall the setup software again, making sure to reboot before you uninstall.

Try to start the emulator by hand.  open a command window in the  AppInventor\commands-for-appinventor directory (where the software was installed) and do
start-emulator from the console.   Does the emulator start?  Are there any error messages in the terminal?

You already wrote that you are not behind a proxy.  Are you sure?  Take a look at

http://www.wincert.net/tips/networking/2509-how-to-find-out-which-proxy-server-i-am-using

and see if you can run that command, and if it indeed says there is no proxy server.

if none of this works, we may have to get on the phone with you and do some real-time debugging.

By the way, do you have another computer there you could try and see if you get the same problem?

mmes...@gmail.com

unread,
Feb 18, 2014, 12:45:28 AM2/18/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu, mmes...@gmail.com, Jeff Schiller, Andrew F McKinney
Thanks for your continued attention!

To answer your questions, I have tried on Chrome and Firefox throughout this process, and both are the latest versions. I am the administrator. I double-checked as directed to make sure I am indeed not behind a proxy.

Today, before restarting and uninstalling as was suggested, I thought I'd give it another shot just to see what would happen. I hadn't rebooted since I posted yesterday, I had only put the computer to sleep. The emulator connected with Firefox (but not with Chrome) and the Wifi issue was not present - AI2 Companion started just fine and I could see Screen1 on the emulator. I was so jazzed! But...

To make sure it was not just a fluke, I rebooted and tried connecting again. It would not connect with Firefox or Chrome. I rebooted and tried again - no connection. Emulator.exe repeatedly stopped working.

I reinstalled as instructed, making sure to reboot before uninstalling, before reinstalling, and after reinstalling. AI2 still does not connect to emulator after auto-update (complete with non-functioning Wifi) with Firefox or Chrome. Emulator.exe stops working before the emulator ever appears (as has been the case all along).

To answer your question about trying on other computers, my fiance also tried on his computer (identical machine to mine, no proxy, same wifi connection, no extensions, he's the administrator, and using Chrome and Firefox latest versions), and he is having the same problem. The emulator connected just fine the first time after installation and did the auto-update (although his did connect with Wifi and AI2 Companion, unlike mine), but when he changed the speed of a ball, the emulator crashed, and after that he wasn't able to connect the emulator at all. From there, his journey looked the same as mine. He re-installed four times (with 3 reboots each) and didn't get anywhere with it either.

I'd like to try opening the emulator by hand using a command window and doing start-emulator, as you suggested, but I am confused - how do I open a command window in the AppInventor\commands-for-appinventor directory?

Thanks!

Enis

unread,
Feb 18, 2014, 1:50:03 AM2/18/14
to
Hi... a couple of things...

When the emulator crashes, go to the Connect menu and click on Reset Connection.  That should restart the communications between the AI starter and the Emulator.

By command window, Hal means open a command prompt window (DOS type).  Change to the AppInventor folder and then the commands-for-appinventor folder which is located under AppInventor (under Program Files (x86). You can find the command prompt under All Programs, Accessories, Command Prompt.

Sounds like you're making some progress...  When you say the Emulator stopped working, please describe that... do you get any error messages?  Does the emulator just sit there doing nothing?  Does it close on its own?

Normally, this isn't a hit-and-miss sort of thing... either it conencts, and then it should always connect, or it doesn't.  At least you've seen a connection.  As far as his emulator crashing after changing the speed of the ball, that could be something programatically related to his blocks... hard to tell...

I'll check in in a while again and see how you did...

Hal Abelson

unread,
Feb 18, 2014, 1:58:05 AM2/18/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu, mmes...@gmail.com, Jeff Schiller, Andrew F McKinney
Look here for informaiton about how to open a commend window in a given folder.
Please do this and let us know if start-emulator (or it might be called run-emulator) works.

How powerful is your machine, by the way?  How much memory? Not that the ball speed cash could be a programming error, as Enis suggests.

mmes...@gmail.com

unread,
Feb 18, 2014, 4:08:47 AM2/18/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu, mmes...@gmail.com, Jeff Schiller, Andrew F McKinney
We're both running Intel Pentium CPU B950 @ 2.10GHz, 4.0GB installed RAM. He's got 28GB free space, I have 157GB free.

I have tried Reset Connection so many times and it hasn't seemed to fix anything.

When I say the emulator stops working, what I mean is: After resetting the connection (or, in the case of a fresh reboot, after opening aiStarter), I click Connect->Emulator. A dialog box appears which reads: "Starting the Android Emulator", as the console puts out the same line of text every second, ending in



"GET /echeck/ HTTP/1.1" 200 38

Then Windows brings up a dialog box which reads: "emulator.exe has stopped working. Windows is checking for a solution to the problem.... A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available." My only option is the Close Program button.

The GET...38 text displays each second until I click the green Cancel button on the "Starting the Android Emulator" dialog box.

Then no new text appears in the console until I hit Reset Connection, at which point it displays:

Killed adb
ERROR: The process "emulator.exe" not found.
Problem stopping emulator: status 128

127.0.0.1......"GET /reset/ HTTP/1.1" 200 38

During the above process, the emulator itself never appears.

I tried run-emulator in the command prompt and it did run the emulator, although the emulator said I had no connection to Wifi. No error messages appeared in the console.

I agree, it's possible it was my fiance's programming that caused the emulator to crash, but I don't think it's likely since he'd barely started building anything.

Either way, it happened again, today. He finally got the emulator to connect, on Chrome. This is after his 5th reinstallation. The emulator connected and auto-updated, and his Wifi was connected (unlike mine), so he started building with a clean slate - just a picture in a canvas. He decreased the canvas size by a few pixels, and a few seconds later, the emulator closed on its own. The emulator would not reconnect, even after Reset Connection and Connect->Emulator repeatedly, plus a few reboots. This doesn't sound to me like his programming is causing the emulator to crash, and it doesn't explain why he can't reconnect either.

I've watched him do what I've been doing, and his computer is responding in exactly the way I've described at the beginning of this post (the emulator doesn't open, we just receive word that it's not working properly and Windows has to close the program).

To clarify: on his computer, once the emulator crashed (with the original installation), it would not reconnect, and the program had to be uninstalled and reinstalled. In 4 of the 5 reinstallations, the emulator connected and auto-updated, but then would stop working for one of two reasons: wouldn't connect to Wifi (which resulted in a Reset and Connect, leading to no connection whatsoever), or would grey-out and stop responding (leading to shutdown via Task Manager). 1 of 5 reinstallations led to a connection to emulator with Wifi, AI2 Companion, and ability to see app on emulator - but the emulator closed itself soon after, with no error messages appearing in the console, and would not reconnect.

On my computer, I was - with one exception - never able to get the emulator to connect to Wifi. With each installation, as it happened with his computer, it connected and auto-updated just fine, but then required Resetting to hope for Wifi connection (cuz it's useless without access to AI2 Companion), at which time it would simply be shut down in the process of trying to run (emulator.exe stopped working, says Windows). The one and only time I got the emulator to work correctly with Wifi connection and ability to see my app in the emulator, it worked fine, but I wanted to reproduce the result, so I rebooted and was unable to reconnect to the emulator again, even after reinstallation.

Enis

unread,
Feb 18, 2014, 5:04:00 AM2/18/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu, mmes...@gmail.com, Jeff Schiller, Andrew F McKinney
First of all, hang in there... We can't tell you how much we appreciate your very precise and helpful feedback.  The powerhouse programmers will be back in a few hours, and one way or another, we're going to find out what's happening on your end (or ours lol).

You've been extremely patient and responsive, and we'll find a way to have you programming pronto!

Check back in just a few hours and we'll see what the next step is...

mmes...@gmail.com

unread,
Feb 18, 2014, 12:54:00 PM2/18/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu, mmes...@gmail.com, Jeff Schiller, Andrew F McKinney
Thanks everyone! We really appreciate your help! :)

Hal Abelson

unread,
Feb 18, 2014, 2:59:29 PM2/18/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu, mmes...@gmail.com, Jeff Schiller, Andrew F McKinney
This is getting more and more mysterious.   When you start the emulator by hand, this as almost nothing to do with App Inventor -- it's the Google emulator program running on your machine, and if your machine is killing the emulator.exe process, it probably doing it for reasons unrelated to App Inventor.

The only thins I've ever seen that cause this are (1) not enough memory on the machine; or (2) some kind of permissions problem.

But since you say it's happening to your fiance, too, that makes both of these seem unlikely.

Let me suggest the following steps:

- search the web for "emulator.exe has stopped" and see if any of the ideas there give a clue.
- try it all again, and (yet again) reloading the setup software
- try connecting, but only if you have a completely new empty project, so we can be sure there's nothing in the project that is causeing this (it's unlikely, anyway)

By the way, are you able to use the MIT AI Compation with a real phone?

Let us know if you have any luck.

mmes...@gmail.com

unread,
Feb 18, 2014, 4:48:31 PM2/18/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu, mmes...@gmail.com, Jeff Schiller, Andrew F McKinney
In running the emulator by hand, the emulator does start. It just doesn't connect to Wifi. But it appears and runs and doesn't shut itself down. I can click around in the apps. It works.

It's only when trying to connect it via App Inventor that the emulator doesn't start and the process is shut down by Windows.

Unfortunately, we don't have any Android devices.

I did some Google searching. I haven't yet found any solution that would apply to this exact problem, with an emulator and no device.

With a slightly different problem which sounds the most similar to mine, at least 10 people have had success getting emulator.exe to run properly by reducing the RAM allocation to their Android Virtual Device to 512 MB. They did this by editing the Device settings, but I don't see a way to do this. I'm not finding anything Android-related listed in the Device Manager. Note that they're using the Android SDK and AVD Manager from within Eclipse. Here's the url: http://droidsquad.blogspot.com/2011/04/android-virtual-device-avd-stopped.html

I'll try what you suggested, starting a new empty project and then reinstalling.

mmes...@gmail.com

unread,
Feb 18, 2014, 5:20:13 PM2/18/14
to mitappinv...@googlegroups.com, mitappinv...@appinventor.mit.edu, mmes...@gmail.com, Jeff Schiller, Andrew F McKinney
I just reinstalled with an empty project, and it still isn't working.

This time, it didn't auto-update. It tried to - it gave me the choice to update or choose Not Now, so I clicked OK, and then it flashed an error message in the emulator on the grey AI2 Companion screen, under "...Waiting to get blocks." But it disappeared immediately after appearing and I didn't get a chance to read it. It stayed on the grey screen but nothing happened, so I went back to the home screen and opened AI2 Companion again and it crashed, so I opened it again. This time, it stayed on the Enter Code / Scan QR code screen, and read on the bottom that there was no Wifi connection. The difference here is that it usually brings up a big black window that says 'no connection to Wifi exists', with OK and Exit buttons, and this time no window appeared.

So I hit Reset Connection and tried connecting the emulator again, and got the same old problem - aiStarter immediately says

ERROR: The process emulator.exe not found.
Problem stopping emulator: status 128

and then Windows so kindly informs me that emulator.exe stopped working and has to close. Tried it first with Chrome, then Firefox. Same thing.

Enis

unread,
Feb 18, 2014, 9:02:30 PM2/18/14
to
A few more things... The version of the Companion that you have asks if you want to auto-update.  Have you tried saying no to that?  That was put in recently due to some proxy problems.  It should work even if you say no, so please try that.

You mentioned that you were starting the companion.  You shouldn't be starting the companion manually.  That actually causes a problem with this version of the Companion.  Here's something directly from the developer.  I asked why WiFi would enter into your situation.  Here's most of his answer:

We use the same Companion binary for both devices and the emulator. When launched via the launcher (the normal way to launch Android Apps on a device) the newest Companion (version 2.15ai2zx1) checks for a Wi-Fi connection and exits if it doesn't find one. It won't find one in the emulator.

It's normally invoked directly via an "adb" command on a connected PC. This is how it is supposed to be launched in the emulator. When invoked via this intent, the Companion doesn't care about Wi-Fi and works as expected.

So people should *not* manually start (from the launcher) the Companion within the emulator. This was not a problem in versions before 2.15ai2zx1 because it would work fine even if started. This *is* a problem with version 2.15ai2zx1, and people should not do this. In a future (hopefully soon) release, I will make the Companion smart about being run in the emulator and not have it do the Wi-Fi check.

Not to be redundant, but boot your computer, and go to the AI2 site.  As long as the AI Starter fires up when your machine boots, it should be running already.  Bring up your project, click on the Connect menu link at the top, choose emulator.  Don't try to run anything on the emulator like the companion.  The system should do that automatically.  See if that works for you.

mmes...@gmail.com

unread,
Feb 18, 2014, 9:44:42 PM2/18/14
to mitappinv...@googlegroups.com
I understand, thanks for that. (So you know, the reason I was opening the Companion after auto-update is because it would end on the home screen and do nothing. It didn't open the companion or show my app or anything, it just sat there, every time, on the home screen.)

I did as you recommended, rebooting and trying again. aiStarter fired up on reboot, but the emulator would not connect on Chrome or Firefox. I tried rebooting again, same problem.

So I reinstalled again and this time, chose the "Not Now" button when asked to auto-update. This time, I had success - but it was short lived. Without me doing anything after hitting "Not Now", it immediately brought up my app on the emulator (still just an empty Screen1).

I had to make sure it would work like this again, so I rebooted. aiStarter opened on reboot, but the emulator would not connect. Emulator.exe stopped working and closed before the emulator itself ever appeared. Tried Reset Connection and Connect->Emulator, and emulator.exe stopped working once again. Tried on both Chrome and Firefox, same thing each time.

Enis

unread,
Feb 18, 2014, 10:00:02 PM2/18/14
to mitappinv...@googlegroups.com, mmes...@gmail.com
Any unusual software running on start-up on your machine?  If you're using Anti-Virus, which one?  Are you running SP1 of Windows 7?

mmes...@gmail.com

unread,
Feb 20, 2014, 3:09:47 AM2/20/14
to mitappinv...@googlegroups.com, mmes...@gmail.com
I'm running SP1 of Windows 7. For anti-virus, I have Advanced System Care and Spybot Search & Destroy. Nothing unusual running on start-up.

Hal Abelson

unread,
Feb 23, 2014, 3:22:21 PM2/23/14
to mitappinv...@googlegroups.com, mmes...@gmail.com
Please send me individual mail if you are still having trouble --h...@mit.edu.
Reply all
Reply to author
Forward
0 new messages