Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Companion not starting in simulator

ANSWERED

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

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

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.

View best answer in original post

Best Answer
0 Votes
7 REPLIES 7

Do you see any activity in the companion at all? add some logging. Is your project on github?

Best Answer
0 Votes

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

Best Answer
0 Votes

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).

Peter McLennan
Gondwana Software
Best Answer

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)?

 

Best Answer

I've had it working occasionally, although I gave up on 'mixed' configurations a while ago.

 

IIRC, the least unreliable approach was:

  • let the CLI connect to the sim (watch and companion)
  • start the dev bridge on physical watch
  • tell the CLI to 'connect device'.

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.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

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.

Best Answer
0 Votes

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?

 

Best Answer
0 Votes