Hi,
We had massive problems getting this to work in our environment due to our firewall and proxy server - but with multiple wireshark captures we go it working.
The first issue we has was the App Inventor website stating that the AI Companion was not running (when it was).
This was fixed by adding an exception in our WPAD file shExpMatch (url, "*localhost:8004*") ||
This then allowed the App Inventor website to load the emulator installed locally on the PC.
The next issue was that the App Inventor website was unable to communicate with the AI Companion installed within the Emulator.
We resolved this by adding shExpMatch (url, "*127.0.0.1*") || to our WPAD file.
The fact that the app uses bot localhost and 127.0.0.1 is quite poor - surely it should be coded using the same variables through and through.
All is working now but it was a right nightmare to troubleshoot and personally I found the Google support forums terrible with just generic answers and people just redirecting me to the document stored online which was no help at all.