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

Simulator won't install the companion app

I've been developing away merrily for weeks using Eclipse, the simulator and the command line tools, until this morning. Suddenly the install has stopped working for the simulator companion. The app itself installs and runs on the simulator, but the phone simulator doesn't start. I tried stopping and starting the simulator, Eclipse, and the Windows PC, but it still doesn't work. Here's what I see on the command line:

 

fitbit$ install
No app package specified. Reloading ./build/app.fba.
Loaded appID:1d9dc99b-d779-4f21-868d-3a28dc22a031 buildID:0x014940a9d394adea
App requires a phone, connecting...
App is already installed
Sideloading companion: starting...
Phone 'Simulator' disconnected
Install failed: RPC stream closed
fitbit$

 

Any ideas?

Best Answer
0 Votes
3 REPLIES 3

More info - sometimes I see this longer error message:

 

fitbit$ install
No app package specified. Reloading ./build/app.fba.
Loaded appID:1d9dc99b-d779-4f21-868d-3a28dc22a031 buildID:0x014940a9d394adea
App requires a device, connecting...
Auto-connecting only known device: Versa Simulator
App requires a phone, connecting...
App is already installed
Sideloading companion: starting...
Install failed: io.write timed out
Phone 'Simulator' disconnected
fitbit$ (node:8580) UnhandledPromiseRejectionWarning: Error: RPC stream closed
    at C:\Users\semrick\Watch Apps\MyWatchFace\node_modules\@fitbit\jsonrpc-ts\lib\peer.js:142:20
    at Map.forEach (<anonymous>)
    at Peer.onend (C:\Users\semrick\Watch Apps\MyWatchFace\node_modules\@fitbit\jsonrpc-ts\lib\peer.js:140:30)
    at Peer.<anonymous> (C:\Users\semrick\Watch Apps\MyWatchFace\node_modules\@fitbit\jsonrpc-ts\lib\peer.js:135:57)
    at Object.onceWrapper (events.js:273:13)
    at Peer.emit (events.js:187:15)
    at finishMaybe (_stream_writable.js:641:14)
    at endWritable (_stream_writable.js:649:3)
    at Peer.Writable.end (_stream_writable.js:589:5)
    at ParseJSON.onend (_stream_readable.js:628:10)
(node:8580) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch bloc
k, or by rejecting a promise which was not handled with .catch(). (rejection id: 13)
fitbit$

Best Answer
0 Votes

Still more information - maybe solved:

 

I tried testing on the watch and phone instead of the simulator. I noticed at least one error that was happening on the watch that didn't happen in the simulator. I had an "id" attribute on a <section> node in the index.gui. It caused an error on the watch, but not on the simulator. I found and fixed a few other bugs that weren't apparent in the simulator. My latest version did install on both the watch and companion, so maybe it's fixed.

Best Answer
0 Votes

Nope not solved. Still won't install the companion in the simulator. It does work on a phone and watch, however. If I try the install over and over, eventually after many tries it does install. Then it may work for awhile on the first try. Then it will stop working again. This really slows down development! I don't think it's a problem with the code anymore, since it runs on the real phone.

 

Update: the last few days it has been working consistently again. No rhyme or reason to this.

Best Answer
0 Votes