Error message: "You must be connected to a Companion to update it"

238 views
Skip to first unread message
Assigned to ewpa...@gmail.com by me

Yossi Yaron

unread,
Dec 28, 2017, 11:02:35 AM12/28/17
to MIT App Inventor Forum
Hi,
I'm using MIT App Inventor on a Windows 10 64 bit PC.
All was running well until about 2 weeks ago. It may be due to the major Windows 10 Fall update which took place about that time but I'm not sure.
When connecting to the emulator, it claims that the version of MIT AI2 companion on the emulator is out of date (although it isn't - it was 2.44), and clicked OK I got the following Error Message: "You must be connected to a Companion to update it" (although companion was running on the emulator).
I did a hard reset, and tried again - same thing.
I un-installed and re-installed the emulator (MIT_App_Inventor_Tools_2.3.0_win_setup.exe) - same thing.
The log messages on the aiStarter window seem to be OK.
Any idea why this started happening and how to fix it?
Thanks
Yossi Yaron

Evan Patton

unread,
Dec 28, 2017, 11:42:16 AM12/28/17
to MIT App Inventor Forum
Hi Yossi,

I was able to replicate this issue. Sorry for the inconvenience. You can manually update the emulator following these steps:

1. Go to Help > Companion Information.
2. Click on the link to download the companion APK file.
3. Close the Companion information dialog.
4. Connect to the emulator and wait until the dialog prompting you to update appears
5. Open a command prompt by pressing the Windows key and then typing "cmd" into the search box and pressing enter.
6. Enter the following commands, line by line:
cd Downloads
"C:\Program Files (x86)\AppInventor\commands-for-appinventor\adb.exe" install -r MITAI2Companion.apk
7. After the last command completes, go to the Connect menu and Reset Connection.
8. Go to Connect > Emulator. It may take a while the first time while the installation finishes, but once it is completed you will be running version 2.45 of the companion.

We presently will work on a fix, but this should get you started in the meantime.

Regards,
Evan

SteveJG

unread,
Dec 28, 2017, 12:38:08 PM12/28/17
to MIT App Inventor Forum
Hmm... still some issues Evan.

Here is what actually happens: 


On Win10 Fall Creators ... use the Search Windows, type command and the user will see a in the MENU  Command Prompt .  Select that to get the 
Black window then carefully type 
 
cd downloads 

the directory changes

then type that very long command provided by Evan very carefully and hope you receive a Successful.  If you don't, look at what I typed and be aware of spaces.  The old Dos command prompt is VERY fussy.

Win10 is very protective, so anything that goes into the downloads folder is automatically restricted to read only.   You have to change the permissions.  

Then do what Evan recommends....restart the emulator

What is installed however is NOT recognized as version 145 of the Companion...what installs is 2.44test7   so when you rerun, App Inventor complains and you get 
the white prompt.   Answer Not Now  and 145 runs as 144test7 apparently.


Are you an experienced PC user?   If not, I recommend NOT following this work around but rather waiting until MIT fixes this.

Regards,
Steve



Regards,
Steve

Evan Patton

unread,
Dec 28, 2017, 1:18:13 PM12/28/17
to MIT App Inventor Forum
Hi Steve,

You may need to adjust the path you use for the companion app. You may have downloaded one of the versions from the test server, in which case you will have multiple MITAI2Companion files, like named MITAI2Companion.apk, MITAI2Companion-1.apk, ... Try cleaning up any MITAI2Companion.apk files in your downloads and try the process again. For most users, they won't have old copies of the companion lying around their download folders.

The read-only error is coming from the emulator. It's okay that it is read only because the emulator trying to clean up the copy of the APK used to install the companion and failing because it is read-only. After this point the companion should be the correct version. 

Evan

Yossi Yaron

unread,
Dec 28, 2017, 2:22:37 PM12/28/17
to MIT App Inventor Forum
Hi,
I am a computer sciences teacher, and currently I manage an Pilot project for online teaching, in which I have 9 online classes, all on MIT App Inventor, taught by 4 teachers (including myself) and about 150 students, mostly working from their homes (on their own computers).
This means that I need a very simple solution, because I can understand and implement these workarounds, but most of my students won't be able to follow such instructions.
I will have to wait for an official fix. Any idea when one will be available?
Thank you 
Yossi Yaron

Yossi Yaron

unread,
Dec 28, 2017, 2:24:41 PM12/28/17
to MIT App Inventor Forum
P.S. Nevertheless, thank you very much for the quick response (especially in a holiday season) and for the detailed instructions.

Evan Patton

unread,
Dec 28, 2017, 2:30:56 PM12/28/17
to MIT App Inventor Forum
We are aiming to publish an updated version of the emulator package in the next day or two to help fix this problem. It will require reinstalling the setup package from our website and doing a hard reset. I will follow up more as we're actively pursuing this.

Evan

SteveJG

unread,
Dec 28, 2017, 4:20:12 PM12/28/17
to MIT App Inventor Forum
@Evan ...thanks..the process did install an older Companion.   145 installed just fine using the temporary 'fix' after eliminating another Companion copy in the downloads.

--Steve

Evan Patton

unread,
Dec 28, 2017, 4:30:47 PM12/28/17
to MIT App Inventor Forum
Hi Yossi,

We have a release candidate for version 2.4 of the setup tools. This contains the latest companion and should correct your upgrade problems. Please download the installer from this link and let me know if it helps resolve your problem. If we have enough positive confirmation that this addresses the problem we will release it on our website.

Regards,
Evan

Yossi Yaron

unread,
Dec 28, 2017, 5:10:04 PM12/28/17
to MIT App Inventor Forum
Thanks again for the super-fast response.
However... sorry to disappoint you guys but the fix does not work on my machine.
I uninsalled, rebooted, installed the fix and ran app inventor. 
When I connected to the emulator but it got stuck for several minutes trying to send the assets to the companion (enclosed please find a screen capture). After 5 minutes I dismissed thee progress dialog and re-connected. Now I got the same error message that started this thread...
I re-booted the computer again. Did not help.
Thanks & happy holidays
Yossi
emulator.jpg

Evan Patton

unread,
Dec 28, 2017, 5:18:12 PM12/28/17
to MIT App Inventor Forum
Hi Yossi,

You may need to do a Hard Reset once you've installed the new tools. If not, you may end up with an old copy of the emulator package.

Regards,
Evan

Yossi Yaron

unread,
Dec 29, 2017, 12:07:41 AM12/29/17
to MIT App Inventor Forum
Hi Evan,
I did do a hard reset. It didn't help - the same thing happened.
I did see that the version number was indeed 2.45 and not 2.44 (see the screen capture).
Thanks
Yossi
emulator2.jpg

Evan Patton

unread,
Dec 29, 2017, 3:39:56 PM12/29/17
to MIT App Inventor Forum
Hi Yossi,

This is very strange. Version 2.45 is on the acceptable companions list, so you should not be prompted for an upgrade. Can you check your Task Manager to confirm that there aren't any other invisible copies of the emulator running? Does it continue to do this after a machine reboot?

Evan

Yossi Yaron

unread,
Dec 29, 2017, 4:20:27 PM12/29/17
to MIT App Inventor Forum
Hi Evan,
I restarted and tried again. It does not work (the blocks get stuck during transfer to the emulator, as seen in my previous screen captures).
As far as I can see there are no additional adb / emulator / aiStarter. I'm attaching a screen capture, and the task list (from the DOS command tasklist).
If there is any diagnostic tool I can run and send you the results, please let me know.

Another point worth mentioning - I also have GenyMotion installed, and I have an Oracle VM with a bridged adapter (so the GenyMotion can have a different IP address than the computer and this way I can run the MIT AI2 Companion on it). I never had any problems with that so far, and it still is running very well, but maybe there is an issue with the virtual network adapter it installed? I did see the original problem I reported (with 2.44) on students' computers without GenyMotion, but maybe this has something to do with the problem in 2.45). 
Yossi
tasklist.txt
task manager.gif

Evan Patton

unread,
Dec 29, 2017, 4:49:08 PM12/29/17
to MIT App Inventor Forum
We are also working on an alternate solution that will allow upgrading using the existing mechanism in App Inventor. If testing goes well we should be releasing it in the next few days. In the meantime, you should be able to dismiss the upgrade dialog by clicking "Not Now" as you already have the right version.

Regards,
Evan

Yossi Yaron

unread,
Dec 30, 2017, 10:32:20 AM12/30/17
to MIT App Inventor Forum
Hi Evan
Unfortunately the option "not now" does not exist any more, so effectively the emulator is not functional and there is no way around it...
I'm attaching a complete step-by-step log with screen captures to clarify the situation. The computer was restarted before running this sequence.
Thank you
Yossi Yaron

App Inventor Log.docx

Evan Patton

unread,
Dec 30, 2017, 10:54:28 AM12/30/17
to MIT App Inventor Forum
Thanks for the information. That shouldn't be the case. I'll work to debug it.

Regards,
Evan
Reply all
Reply to author
Forward
0 new messages