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.
I just downloaded App Inventor 2 today, and I also ran updates before these problems began, so I assume I have the current versions.
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...
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.
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!
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.
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.
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.
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.