AI companion connects to AI Classic, AI2 companion fails to connect to AI2

326 views
Skip to first unread message

moi-meme

unread,
Mar 12, 2014, 12:24:38 PM3/12/14
to mitappinv...@googlegroups.com
Is it to be expected that if the old Ai companion app can connect to AI Classic over a given WLAN, then the new AI2 companion app will / should be able to connect to AI2 in the browser over the same network ?
And if that is not the case, i. e. the connection fails with AI2 although using the same network, phone, browser, and OS, is it legitmate to think that there is a bug somewhere ?
And what can I do in order to contribute to solving the problem ?  Thanks for your help ... to Jeff Schiller especially ?

Enis

unread,
Mar 21, 2014, 10:31:59 PM3/21/14
to mitappinv...@googlegroups.com
moi-meme...

Did you get your issue resolved???

moi-meme

unread,
Mar 22, 2014, 4:45:32 AM3/22/14
to mitappinv...@googlegroups.com

Good morning, Enis,

Before answering your most recent enquiry, please allow me to return to our previous exchange, concerning another problem that I had.  On 19 March you kindly wrote:

"I don't know the answer to that, but I'll pass this along to someone who will definitely know.  It's possible that if you're working with AI2 and AI Classic projects at the same time, it may cause problems.  But honestly, I don't know... We'll get an answer for you in a few hours..."

I have since then not received any further information on that topic, although it still of course does interest me ... and perhaps other users.  Could you please try and follow that point up ?

As to my connection problem: No, this issue has not been resolved.  Jeff Schiller is probably the only person who can deal with it, and he has not responded.  As far as I can telll from the information in the tcpdumps, the problem is one of authentication: if I run my home wifi network with WPA/WPA2 security (as usual), then AI2 never gets past the authentication phase of setting up the connection (whereas AI Classic works fine): it tries repeatedly for about 2 to 3 minutes and then gives up: "connection failed".  If I run the wifi network open with no security (which I would much prefer not to do), then AI2 connects immediately without any problem.  I am not expert enough to know exactly why AI2 behaves as it does.  I wish I were.

When migrating from AI Classic to AI2, it would be very helpful if AI2 (with the AI2 Companion) worked under the same conditions as AI Classic did.

Thanks for your interest and your help.

Enis

unread,
Mar 22, 2014, 5:55:02 AM3/22/14
to mitappinv...@googlegroups.com
I'll only address the previous issue now as I can't answer the other.  Jeff has been swamped in the past few days, but he's the best person to help you with the connection issues.  I was fairly sure I had responded to that previous item, but...  The AI Classic and AI2 servers are completely different servers.  There is no reason for the Classic names to be affecting the AI2 projects with the same names.  Something else is happening there for you...

FYI, on the second item... the reason the companions behave differently is that they're working completely differently as well.  In Classic, it was Java based... that's why you have to accept the runtime license before the blocks editor runs. IN AI2, that step was eliminated, so the way the blocks are passed to the companion is completely a different process.

We'll still have to wait for Jeff to get back into this...

Enis

unread,
Mar 28, 2014, 11:06:13 PM3/28/14
to mitappinv...@googlegroups.com
Moi-meme:

Did your emulator issue ever get resolved???

jeffrey.schiller

unread,
Mar 29, 2014, 12:10:25 AM3/29/14
to mitappinv...@googlegroups.com
Sorry for the slow response. AI (Classic) and AI2 use different ports to communicate. In AI (Classic) the blocks editor runs as a separate (Java) program. AI2 the blocks editor is in the browser. So your browser needs to be able to connect to your device. For AI2 to work, your browser needs to be able to talk to your device on port 8001. Make sure you don't have a firewall somewhere in between that is blocking the connection.

Presumably you are using "Connect Companion". This displays a QR code (and also display the code). When you enter the code (or scan the QR Code), does the dialog box on the computer go away? If so, but things still don't work, it means that your PC is having problems talking to the device. If the dialog box does *not* go away, it means either the PC or the Phone is having trouble connecting to the "Rendezvous" server. This server, run out of Google's infrastructure  (located at rendezvous.appinventor.mit.edu) "introduces" your device and PC. Note: This same server *is* used by AI Classic.

-Jeff


On Wednesday, March 12, 2014 12:24:38 PM UTC-4, moi-meme wrote:

moi-meme

unread,
Mar 29, 2014, 3:36:18 AM3/29/14
to mitappinv...@googlegroups.com
Good morning, Jeff,

Thank you for taking precious time to look into my problem.

As far as I can telll from the information in the tcpdumps, the problem is one of authentication: if I run my home wifi network with WPA/WPA2 security (as usual), then AI2 never gets past the authentication phase of setting up the connection (whereas AI Classic works fine): it tries repeatedly for about 2 to 3 minutes and then gives up: "connection failure".  If I run the wifi network open with no security (which I would much prefer not to do), then AI2 connects immediately without any problem.


"does the dialog box on the computer go away?"
No, it does not go away,

"... it means either the PC or the Phone is having trouble connecting to the "Rendezvous" server. "

Both my notebook and my Phone can connect to the Rendezvous server by simply entering its URL in a browser.  (The Rendezvous server leaves cookies on my notebook.)  But in that case the AI2 Companion is not involved.  When I run plain Android apps (built with the Java SDK not AI) on my phone, they can talk to a server running on my notebook without problems.  And, as stated above, even AI2 Companion runs perfectly, if my home network is not secured.  But doing that regularly is no option for me.

Enis

unread,
Apr 5, 2014, 4:18:30 PM4/5/14
to mitappinv...@googlegroups.com
Marking as Complete... Jeff is working on this for next release...

Rob Higbie

unread,
Jul 13, 2014, 8:08:18 PM7/13/14
to mitappinv...@googlegroups.com
Jeff, when I enter or scan the QR code, the dialog box on the computer goes away, but the tablet doesn't connect, even with Windows Firewall off.  Any suggestions?  [Windows 8 PC running AI2 nb135a, connecting to Samsung Galaxy Tab 3 7.0, Android version 4.1.2 running MIT AI2 Companion 2.20ai2zx1]

SteveJG

unread,
Jul 13, 2014, 8:20:32 PM7/13/14
to mitappinv...@googlegroups.com
A cornucopia of quick fixes to network connection and emulator connection issues.

Users having ablock plug ins have reported disabling the plugin allows AI2 to communicate properly.
Users having AVG found that it blocked AI2 communications...using the Advanced setting fixed their issues; the save with some other virus checkers.
A quick fix that works sometimes if AI2 'sees' other than the latest version of Companion:    Project > Hard Reset
New users of AI2 report that if they do not have a Project loaded,  Connect > Emulator   causes the emulator to continually try to load.  The solution,
load a project from one of the tutorials shown here:   

Beginner Tutorials: For those new to App Inventor!  http://appinventor.mit.edu/explore/ai2/beginner-videos.html

New users frequently do not upload AI2 Companion from Google Play.  You MUST have the latest version of Companion loaded and installed on your Android device.

load a project from one of the tutorials shown here:   

Beginner Tutorials: For those new to App Inventor!  http://appinventor.mit.edu/explore/ai2/beginner-videos.html

And if the quick fixes do not work..

1) Try re-installing Companion.


Also, you should not turn your firewall off.   AI2 works through it just fine (I have similar PC and tablet with no issues)

Consider some of the things above...perhaps they will get you working.

Regards,
Steve

SteveJG

unread,
Jul 14, 2014, 7:26:56 AM7/14/14
to mitappinv...@googlegroups.com
Rob responded by email:

I appreciate your quick reply.  I went through your quick fixes but still do not connect.  I don't quite understand what you mean by ablock plugin.  Extensions?  (I'm using Chrome.)  Hard Reset didn't help.  I do have a project loaded.  I got Companion from Google Play and it is current.  Uninstall/reinstall of Companion didn't help either.  (My firewall is back on.)


@ Rob,

A big hint on the AI2 forum.  You will get a more rapid response if you do NOT post emails.  There are many people monitoring the forum.   If you reply here, others may have suggestions that will solve your issue, others can learn from your comments and others know your issue is being considered etc.

Regarding adblock,   adblock is a plugin for FireFox that prevents pop-ups.   Some users having your issue reported AI2 works correctly when it is turned off and does not work with adblock engaged.

Your post here would have been better addressed by you posting a new thread...do so brings more attention to it by the moderators..no harm done.  You said " Jeff, when I enter or scan the QR code, the dialog box on the computer goes away, but the tablet doesn't connect, even with Windows Firewall off.  Any suggestions?  [Windows 8 PC running AI2 nb135a, connecting to Samsung Galaxy Tab 3 7.0, Android version 4.1.2 running MIT AI2 Companion 2.20ai2zx1]"    ... That configuration should work with no issues.

Are you logged in as administrator?
Have you previously loaded an emulator using Eclipse or Android Studio?    If you have multiple copies, Win 8 might be confused.

How exactly are you trying to connect?
Using WIFI?
Using the emulator ... you need to install addtional AI2 software on your PC.
Using USB ... a can of worms, but doable.   It requires loading additional drivers so your Android USB can talk to the PC (without them, the Android acts as a secondary drive when plugged in.

You may have to uninstall anything you installed related to AI2.
Sign in as administrator.

Re-install by following the instructions here:     http://appinventor.mit.edu/explore/ai2/setup.html 
You should try the WIFI method.  Your previous note indicates that is what you were un-successfully attempting.
On my Tab II 7", I can not use the QR code...I have to type in the  characters   (yeah, the instructions say digits, instructions written my un-grammatical developers)
You have to activate Companion on your tablet.  Type the six characters into the box in Companion.  Do not type an Enter after the six characters, just press the orange button and wait.  The project you have loaded should load.     Did it?

If this does not work, you could try the second method and use the emulator.

I do not know why you are having issues, Your comments indicate you have everything installed. Chrome is fine.  Firefox also works for many.  Explorer does not presently work with AI2.

Please try again.    Let us know, by posting in the forum, if anything is now working.    I am pretty sure, we here get everyone up and running on AI2 eventually.

Good luck.

Regards,
Steve





Rob Higbie

unread,
Jul 14, 2014, 8:22:22 PM7/14/14
to mitappinv...@googlegroups.com
Sorry about replying by email instead of posting online.  I guess I thought it would be posted as well.  Not a problem, I certainly understand the desire to share with the community!

Since I'm not using Firefox, I'll disregard the adblock issue.

I was not previously logged in as administrator, but did so after reading your post without any improvement.

I am connecting by WIFI, and successfully "live tested" with this configuration earlier this year.

I may just have to use the emulator, or try Firefox.  If I figure it out I'll let you know.

Rob Higbie

unread,
Jul 15, 2014, 9:34:19 PM7/15/14
to
Got it!  It was my WIFI.  I forgot I had change the "guest" wireless network.  Once my PC and tablet were both on the same wireless network, it worked.

What still gets me was that even though both devices were not on the same network, the "Connect to Companion" dialog box on the PC would disappear right after I scanned the QR code.  Every time.  Just like it does when it connects.  Except the Companion never loaded my app on the tablet.

SteveJG

unread,
Jul 16, 2014, 7:44:13 AM7/16/14
to mitappinv...@googlegroups.com
Thanks for letting us know Rob.   You have given us another question to ask users, 'Are the Android and the PC on the same network"  ... and they must be.

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