01-29-2019 10:12 - edited 01-29-2019 10:20
01-29-2019 10:12 - edited 01-29-2019 10:20
I'm unable to communicate with the companion app when running the app from the Ionic and using the simulator as the phone. The error message returned is that the socket is closed.
It appears that the companion app does not start up in the simulator. I don't get any console messages from the companion app.
Under settings, the simulator reports that the companion bridge is connected to the debugger.
Any ideas?
My environment:
Windows 10
CLI sdk 3.0
Simulator version 0.6.4
Ionic OS 3.0 version 27.33.1.30
Thanks,
Rich
Answered! Go to the Best Answer.
01-31-2019 10:34
01-31-2019 10:34
You cannot mix physical and simulated devices. It will let you sideload (because Studio/sdk-cli doesn't know the two devices aren't connected), but it will not work and isn't supported.
01-30-2019 07:58
01-30-2019 07:58
Do you see any activity in the companion at all? add some logging. Is your project on github?
01-30-2019 12:46
01-30-2019 12:46
Hi Jon,
There is no response at all from the companion. The very first line in the companion is to display "companion running" to the console log and to display if the companion was launched by the application. Neither one comes up. I just tested the application using the Ionic and my cell phone instead of the simulator. That worked, the companion was loaded onto the phone and the console displayed the appropriate messages. I tried migrating the app to Fitbit Studio hoping that might be better. It was the same. I'm in the process of simplifying the code to make a base case to test against.
So far the combinations that work are when the phone and companion are both using the simulator or neither one is using the simulator.
I'll let you know how I make out with the simplified code.
Thanks,
Rich
01-30-2019 12:58
01-30-2019 12:58
I've always found the combination of physical watch and simulated companion to be unreliable. When I need to test on a physical watch, I resort to using a physical companion (so to speak).
01-30-2019 13:30
01-30-2019 13:30
Calling it unreliable, in my case, would be giving it way to much credit 🙂 That would imply that it works, at least, sometimes. I'd be interested in hearing from others on their success (or not).
So the question is:
Do you find the companion to be reliable when testing if
(A) the watch is a physical device and the companion is the simulator,
or the reverse,
(B) the watch is the simulator and the companion is the physical device (cell phone)?
01-30-2019 14:17
01-30-2019 14:17
I've had it working occasionally, although I gave up on 'mixed' configurations a while ago.
IIRC, the least unreliable approach was:
CLI will see that the only available device is the phys watch and will switch to that, while hopefully leaving the sim companion connected. Maybe.
01-31-2019 10:34
01-31-2019 10:34
You cannot mix physical and simulated devices. It will let you sideload (because Studio/sdk-cli doesn't know the two devices aren't connected), but it will not work and isn't supported.
01-31-2019 11:56
01-31-2019 11:56
Thanks for the update. It would be nice if that was documented. Can I add to the list of things to do, an edit that would prohibit the Studio and/or cli from trying?