Skip to first unread message
Assigned to andrew.f...@gmail.com by aget...@gmail.com

Petr

unread,
Jan 1, 2017, 10:00:52 AM1/1/17
to mitappinv...@googlegroups.com
Hallo.
I have a problem with connection to my new phone (Honor 7 Lite(NEM-L21)) by WiFi and USB.
Other device work fine (phones HTC Desire X, HTC Desire 620 (some old samsung) and NEXUS tablet.

The problem looks like that.
The Companion v 2.39  try connect and than (I think, how load blocs white screen on the device) collapse the companion program in device. The application don´t start. (emulator work fine, compiled app on the device work too fine).
On the desktop PC are W10 and same problem I´ve on the laptop W7.

Connection test - indicate connection:
MIT App Inventor 2 Connection Test

Is aiStarter running?
YES, aiStarter v2.3.0 running!
Is your phone connected via USB?
YES, your phone is connected via USB!

Both (PC and phone) has connection to the randezvous server.

So, between load blocs and until companion program collapse is possible conection by FF browser (http://10.10.10.121:8001/) but with message:{"status" : "BAD", "message" : "Security Error: Invalid Source Location 10.10.10.120"}
IP: 10.10.10.120 is desktop PC with AI2
Ping to device work.

The AI2 show message : Companion Connection Error: See Connection Help

The problem looks like compatibylity problem with Android 6 in phone...

Or exist some solution for it?

Thanks Petr

Windows 10 (x64), Windows 7 (x64), FireFox 50.1.0, Android 6.0.

Evan Patton

unread,
Jan 8, 2017, 7:31:14 PM1/8/17
to MIT App Inventor Forum
Hi Petr,

The Security Error is due to the fact that the companion is expecting to receive commands via the USB rather than HTTP if it is connected by USB. Try disconnecting the USB cable, restarting the companion app. and connecting using the QR code/6 character code that appears when you go to Connect > Companion.

Evan

Petr

unread,
Jan 11, 2017, 4:50:15 PM1/11/17
to MIT App Inventor Forum
Hallo Evan.
Thank for feedback. I´ve some news now.
Today my microSD in the phone died! So, my son can modify some app.
I´m try connect the phone by companion and all works correct (USB, WiFi, ....)
Today I don´t have any free microSD for the test (I´m so busy in job), but all looks like the problem is the microSD conected as internal storage in the Android 6.
I´m hope that I´ll test it after weekend and share the result.
So, I make test by you. (But I´m make test with conection by WiFi/ QR code - resull was error, but no by WiFi/ character code)

Thanks Petr

Kurt

unread,
Jan 15, 2017, 4:56:55 AM1/15/17
to MIT App Inventor Forum
I've had a similar issue on a Huawei P9 Lite with Android 6.0. Scenario:

- Open AI2 Companion;
- Scan QR-code from AI website and connect with code;
- Connection seems fine, but the app 'minimizes' when the screen is loaded and the App Inventor website shows an error message.

While the app was connecting I browsed to http://192.168.1.101:8001/ (the ip-address of the phone), which showed an error message:

- INTERNAL ERRROR: serveFile(): given homeDir is not a directory.

Because Petr mentioned an SD-card: this made me realize that the AI2 Companion app was installed on the SD-card of the phone. I uninstalld AI2 Companion and re-installed it on the internal storage of the phone: all works fine now.

Not sure if it's relates to android version 6.0 - But at least it looks like there could be a bug that does not allow to run the AI2 companion app when installed on an SD-card.

Petr

unread,
Jan 16, 2017, 3:40:42 PM1/16/17
to MIT App Inventor Forum
Hallo.

The issue with SD card, maped like the internal storage, make the problem with Companion.
If I install the Campanion to the internal phone storage, all work fine.
But how then switch SD cart like intermal storage then Companion doesn´t work (start and then collapse).
This looks like bug.

Thanks for reaction.

davide marcante

unread,
Jan 17, 2017, 6:44:42 PM1/17/17
to MIT App Inventor Forum
hallo.
i have Huawei P9 Lite and i've same problems of Petr.

when try connect PC and phone, AI Companion collapses and on PC appears "Connection error".

With Samsung J5 all is OK!

thanks.

Huawei P9 Lite, Android 6, Windows 8.1, Chrome


Abraham Getzler

unread,
Jan 17, 2017, 8:35:22 PM1/17/17
to MIT App Inventor Forum

davide marcante

unread,
Jan 19, 2017, 10:09:33 AM1/19/17
to MIT App Inventor Forum
the focus is on the SD card.
In my P9 lite, without root privilege, i can install apps only in the internal memory.
But problem is with "default storage location".
If i set  "
Settings > Advanced settings > 
Memory & storage > 
Default location > Internal storage", wi-fi and AI Companion work correctly   
If i set  "
Settings > Advanced settings > 
Memory & storage > 
Default location > SD card" 
, wi-fi and AI Companion don't work.
I'm sorry for my bad english. 

Abraham Getzler

unread,
Jan 19, 2017, 1:02:18 PM1/19/17
to MIT App Inventor Forum
I have assigned this thread to the last person at MIT known to me to have worked on the Companion and Emulator.
I will also mention it in the Bugs section of my FAQ, not to be confused with MIT's official bug list.

ABG

Reply all
Reply to author
Forward
0 new messages