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

Simulator Error: "app.install.stream.finalize could not be completed as the RPC stream is closed"

ANSWERED

I found a few posts on this that others have started, but after following all the suggestions and tearing my hair out for days I'm desperate for help. I'm running this on Windows 10 Pro Version 10.0.18363 Build 18363

Steps to Reproduce

  • Open simulator, try to load code from either FitBit Studio or using "fitbit$ bi" command locally
  • Error occurs, if running from the terminal it's as follows:
Device 'Versa Lite Simulator' disconnected
Install failed: RPC call to 'app.install.stream.finalize' could not be completed as the RPC stream is closed
  • Simulator reads "Dang Simulator failed to start"
  • Press "TRY AGAIN", Simulator reads "Here we go Simulator Loading" and spins forever

 

 

..\AppData\Roaming\Fitbit OS Simulator\log.log

  • Always seems to end with roughly the following (can send the whole thing if required)
[2020-02-18 22:39:51.607] [info] shell->app: {"id":45,"jsonrpc":"2.0","result":null}
[2020-02-18 22:39:51.820] [info] appsim exit code: 1 (signal null)

 

package.json

"devDependencies": {
    "@fitbit/sdk": "~4.1.0",
    "@fitbit/sdk-cli": "^1.7.1"
}

 

Things I've Tried

  • Restarting the Simulator (sometimes makes it work briefly)

  • Changing the device in the Simulator (sometimes makes it work briefly)

  • Logging out, logging in

  • Uninstalling, reinstalling Simulator (oddly, the first run after doing this sometimes works)

  • Installing an older version of the Simulator
  • Deleting \AppData\Roaming\Fitbit OS Simulator or \AppData\Local\Programs\@fitbitsimulator or both

  • Disabling my firewall, antivirus, etc

 

Please help! I'm enjoying deving for FitBit but without a working simulator I simply can't.

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Dear @JonFitbit, and anyone else insane enough to be paying attention to this.

 

I finally worked out what the problem was, with zero help from FitBit (I even contacted their support team). The problem must have been in my javascript code and how it interacted with the SDK. My best guess is it cause a memory leak or heap overflow, and so whenever the simulator loaded it crashed with no indication from the log files as to why. It may just been passing log messages back from the Jerry Script Engine with little insight. Once the knackered code was in the simulator, it would crash on starting regardless.

I came to this conclusion when I discovered the example projects on GitHub didn't cause this issue. I eventually managed to painstakingly edit my code enough to stop the simulator crashing.

PROTIP: write a script to uninstall every trace of the simulator, so you can start a new whenever you need. For windows users I used PowerShell:

 

Function FitBit-Clean {
	$orignalPath = cwd
	cd "$env:LOCALAPPDATA\Programs\@fitbitsimulator\"
	& '.\Uninstall Fitbit OS Simulator.exe'
	Remove-Item "$env:LOCALAPPDATA\@fitbitsimulator-updater" -Recurse -Force
	Remove-Item "$env:APPDATA\Fitbit OS Simulator" -Recurse -Force
	cd $orignalPath
}

 

 

tl;dr

I think this highlights how much the simulator needs better logging and messaging. With it I could have saved days.

 

 

View best answer in original post

Best Answer
9 REPLIES 9

Please can you clear the log, reproduce the issue, then post the log file. Thanks!

Best Answer
0 Votes

Certainly! Thank you for any help you can give!

[2020-02-19 21:00:37.300] [info] shell->app: {"id":0,"method":"initialize","params":{"capabilities":{"protocol":{"maxMessageSize":536870912}}},"jsonrpc":"2.0"}
[2020-02-19 21:00:38.263] [info] appsim stdout: [I][21:00:37.726][] Starting breakpad client - reporting to \\.\pipe\Fitbit OS Simulator Crash Service


Congratulations!  Your Higgs has been selected to take part in an exciting

new opportunity called _Appmgr_RemoveAllApps().


This may take a few minutes.  Thank you for your patience.



Completion Percentage:  1%
Completion Percentage:  2%
Completion Percentage:  3%
Completion Percentage:  4%
Completion Percentage:  5%
Completion Percentage:  6%
Completion Percentage:  7%
Completion Percentage:  8%
Completion Percentage:  9%
Completion Percentage:  10%
Completion Percentage:  11%
Completion Percentage:  12%
Completion Percentage:  13%
Completion Percentage:  14%
Completion Percentage:  15%
Completion Percentage:  16%
Completion Percentage:  17%
Completion Percentage:  18%
Completion Percentage:  19%
Completion Percentage:  20%
Completion Percentage:  21%
Completion Percentage:  22%
Completion Percentage:  23%
Completion Percentage:  24%
Completion Percentage:  25%
Completion Percentage:  26%
Completion Percentage:  27%
Completion Percentage:  28%
Completion Percentage:  29%
Completion Percentage:  30%
Completion Percentage:  31%
Completion Percentage:  32%
Completion Percentage:  33%
Completion Percentage:  34%
Completion Percentage:  35%
Completion Percentage:  36%
Completion Percentage:  37%
Completion Percentage:  38%
Completion Percentage:  39%
Completion Percentage:  40%
Completion Percentage:  41%
Completion Percentage:  42%
Completion Percentage:  43%
Completion Percentage:  44%
Completion Percentage:  45%
Completion Percentage:  46%
Completion Percentage:  47%
Completion Percentage:  48%
Completion Percentage:  49%
Completion Percentage:  50%
Completion Percentage:  51%
Completion Percentage:  52%
Completion Percentage:  53%
Completion Percentage:  54%
Completion Percentage:  55%
Completion Percentage:  56%
Completion Percentage:  57%
Completion Percentage:  58%
Completion Percentage:  59%
Completion Percentage:  60%
Completion Percentage:  61%
Completion Percentage:  62%
Completion Percentage:  63%
Completion Percentage:  64%
Completion Percentage:  65%
Completion Percentage:  66%
Completion Percentage:  67%
Completion Percentage:  68%
Completion Percentage:  69%
Completion Percentage:  70%
Completion Percentage:  71%
Completion Percentage:  72%
Completion Percentage:  73%
Completion Percentage:  74%
Completion Percentage:  75%
Completion Percentage:  76%
Completion Percentage:  77%
Completion Percentage:  78%
Completion Percentage:  79%
Completion Percentage:  80%
Completion Percentage:  81%
Completion Percentage:  82%
Completion Percentage:  83%
Completion Percentage:  84%
Completion Percentage:  85%
Completion Percentage:  86%
Completion Percentage:  87%
Completion Percentage:  88%
Completion Percentage:  89%
Completion Percentage:  90%
Completion Percentage:  91%
Completion Percentage:  92%
Completion Percentage:  93%
Completion Percentage:  94%
Completion Percentage:  95%
Completion Percentage:  96%
Completion Percentage:  97%
Completion Percentage:  98%
Completion Percentage:  99%
Completion Percentage:  100%
Completion Percentage:  101% (Higgs always gives 111%)
Completion Percentage:  102% (Higgs always gives 111%)
Completion Percentage:  103% (Higgs always gives 111%)
Completion Percentage:  104% (Higgs always gives 111%)
Completion Percentage:  105% (Higgs always gives 111%)
Completion Percentage:  106% (Higgs always gives 111%)
Completion Percentage:  107% (Higgs always gives 111%)
Completion Percentage:  108% (Higgs always gives 111%)
Completion Percentage:  109% (Higgs always gives 111%)
Completion Percentage:  110% (Higgs always gives 111%)
Completion Percentage:  111% (Higgs always gives 111%)
                                                           
_Appmgr_RemoveAllApps() is complete.

[E][21:00:37.957][] Fb_UserAlarms_Read: KV entry for alarm info not found!

[E][21:00:37.957][] Fb_UserAlarms_Read: Any Alarms have been purged.

[D][21:00:37.959][] Scheduler starting dispatch time: 1582146037959

[I][21:00:38.262][] Restarting alarms

[I][21:00:38.262][] No upcoming alarms. Disabling alar
[2020-02-19 21:00:38.265] [info] appsim stdout: m

[A][21:00:38.265][] Houston, this is Ionic!!

[A][21:00:38.265][] Press ? anytime for help

[A][21:00:38.265][] Version: 255.1.1207 (Jan 20 2020 11:51:20): d2b0f0bc9f

[A][21:00:38.265][] GNU_BUILD_ID: 

[I][21:00:38.265][] Simulator control server starting on 127.0.0.1:63981



mfgtst $ 
[2020-02-19 21:00:39.305] [info] app->shell: {"jsonrpc":"2.0","result":{"displayDimensions":{"w":348,"h":250},"capabilities":{"protocol":{"maxMessageSize":524288},"display":{"imageFormat":"ARGB8888","variableBrightness":true,"onOff":true},"gps":true,"barometer":true,"accelerometer":true,"gyroscope":true,"orientation":true,"hrm":true,"bodypresence":true}},"id":0}
[2020-02-19 21:00:39.308] [info] shell->app: {"id":1,"method":"devbridge.connect","params":{"authorization":"<redacted>","uri":"wss://027-v3-api-soa.fitbit.com:443/dbridge/"},"jsonrpc":"2.0"}
[2020-02-19 21:00:39.309] [info] Connecting to developer relay
[2020-02-19 21:00:39.314] [info] shell->app: {"id":2,"method":"apps.status","jsonrpc":"2.0"}
[2020-02-19 21:00:39.314] [info] shell->app: {"id":3,"method":"power.update","params":{"chargeLevel":1,"chargerState":"disconnected"},"jsonrpc":"2.0"}
[2020-02-19 21:00:39.316] [info] shell->app: {"id":4,"method":"usersettings.update","params":{"units":{"distance":"metric","speed":"metric","volume":"metric","temperature":"C","height":"metric","bodyWeight":"metric","weight":"metric"},"locale":{"language":"en-US"},"device":{"airplaneModeEnabled":false,"vibrationEnabled":true},"exercise":{"poolLength":25},"preferences":{"clockDisplay":"24h","firstDayOfWeek":1}},"jsonrpc":"2.0"}
[2020-02-19 21:00:39.316] [info] shell->app: {"id":5,"method":"primarygoal.update","params":{"primaryGoal":"steps"},"jsonrpc":"2.0"}
[2020-02-19 21:00:39.318] [info] app->shell: {"jsonrpc":"2.0","method":"devbridge.status","params":{"status":"disconnected"}}
[2020-02-19 21:00:39.319] [info] app->shell: {"jsonrpc":"2.0","method":"display.status","params":{"on":true,"aodActive":false,"stayOn":false,"brightness":"auto"}}
[2020-02-19 21:00:39.436] [info] app->shell: {"jsonrpc":"2.0","result":null,"id":1}
[2020-02-19 21:00:39.438] [info] app->shell: {"jsonrpc":"2.0","method":"devbridge.status","params":{"status":"connecting"}}
[2020-02-19 21:00:39.439] [info] app->shell: {"jsonrpc":"2.0","method":"devbridge.status","params":{"status":"connecting"}}
[2020-02-19 21:00:39.486] [error] appsim stderr: [2020/02/19 21:00:38:2656] NOTICE: libuv support not compiled in
[2020/02/19 21:00:38:2776] NOTICE: Creating Vhost 'default' port -1, 1 protocols, IPv6 off
[2020/02/19 21:00:38:2836] NOTICE: created client ssl context for default
[2020/02/19 21:00:38:2836] NOTICE: Creating Vhost 'default' port 63981, 1 protocols, IPv6 off
[2020/02/19 21:00:39:3185] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4241] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4261] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4281] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4291] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4321] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4361] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4371] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4381] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4401] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4411] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4431] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4441] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4451] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4471] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4491] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4501] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4521] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4531] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4541] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4551] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4560] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4571] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4580] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4690] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4810] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4820] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4820] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4830] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4840] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4840] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4850] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4850] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4860
[2020-02-19 21:00:39.519] [error] appsim stderr: ] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4860] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4870] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4870] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4880] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4880] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4890] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4890] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4890] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4900] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4900] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4910] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4910] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:4910] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5029] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5034] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5034] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5034] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5044] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5044] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5044] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5054] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5054] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5054] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5064] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5064] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5064] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5064] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5074] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5074] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5074] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5084] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5084] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5084] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5084] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5094] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5204] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa
[2020-02-19 21:00:39.585] [error] appsim stderr: .fitbit.com
[2020/02/19 21:00:39:5314] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5423] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5423] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5433] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5433] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5433] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5433] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5443] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5443] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5443] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5453] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5453] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5453] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5453] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5463] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5463] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5463] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5473] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5473] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5473] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5483] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5483] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5483] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5584] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5694] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5803] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5813] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5823] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5823] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5833] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5833] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5833] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5843] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5843] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5843] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5843] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5853] NOTICE: lws_cl
[2020-02-19 21:00:39.657] [error] appsim stderr: ient_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5853] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5853] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5863] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5863] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5863] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5873] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5873] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5873] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5883] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5883] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:5984] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6093] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6194] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6194] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6194] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6203] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6203] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6203] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6213] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6213] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6213] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6223] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6223] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6233] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6233] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6233] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6243] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6243] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6243] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6253] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6253] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6253] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6263] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6263] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6363] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com
[2020/02/19 21:00:39:6465] NOTICE: lws_client_connect_2: 0ae16830: address 027-v3-api-soa.fitbit.com

[2020-02-19 21:00:40.469] [info] Connected to developer relay
[2020-02-19 21:00:41.370] [error] Simulator hosts failed to start: RPCStreamClosed: RPC call to 'apps.status' could not be completed as the RPC stream is closed

 

Best Answer

Hey @JonFitbit,


Do you have any ideas now you've been able to see the log file? What might be the problem if the simulator is closing the RPC stream? I don't think there's anything I've changed on my computer that might mean the connection is being killed like this?

Best Answer
0 Votes

Dear @JonFitbit, and anyone else insane enough to be paying attention to this.

 

I finally worked out what the problem was, with zero help from FitBit (I even contacted their support team). The problem must have been in my javascript code and how it interacted with the SDK. My best guess is it cause a memory leak or heap overflow, and so whenever the simulator loaded it crashed with no indication from the log files as to why. It may just been passing log messages back from the Jerry Script Engine with little insight. Once the knackered code was in the simulator, it would crash on starting regardless.

I came to this conclusion when I discovered the example projects on GitHub didn't cause this issue. I eventually managed to painstakingly edit my code enough to stop the simulator crashing.

PROTIP: write a script to uninstall every trace of the simulator, so you can start a new whenever you need. For windows users I used PowerShell:

 

Function FitBit-Clean {
	$orignalPath = cwd
	cd "$env:LOCALAPPDATA\Programs\@fitbitsimulator\"
	& '.\Uninstall Fitbit OS Simulator.exe'
	Remove-Item "$env:LOCALAPPDATA\@fitbitsimulator-updater" -Recurse -Force
	Remove-Item "$env:APPDATA\Fitbit OS Simulator" -Recurse -Force
	cd $orignalPath
}

 

 

tl;dr

I think this highlights how much the simulator needs better logging and messaging. With it I could have saved days.

 

 

Best Answer

Although not perfect, I think I found a process in 0.8.2 that works a bit.

 

In the simulator turn off the display [in power settings]

 

wait

 

Go back to Apps and uninstall the watch face

 

wait

 

Then retry installing from Studio

 

Seems to work sometimes without the error.

 

If the uninstall fails, which it does often be patient and repeat the process but waiting longer between the steps.

Author | ch, passion for improvement.

Best Answer

I've been getting the same error on the Mac Fitbit OS Simulator 0.8.2

 

FWIW, I get some success if I delete everything in /Users/[username]/Library/Application Support/Fitbit OS Simulator 

... then restart the simulator.

Best Answer
0 Votes

Some weeks ago the problem just went away.

 

I presume there was some sort of connection improvement at the server end.

 

Fitbit keep improving things, impressive.

Author | ch, passion for improvement.

Best Answer
0 Votes

Thanks for the feedback. We've actually improved the logging and error handling in the upcoming release. A single crashing app won't be able to take down the entire app. Glad you managed to fix your issue.

Best Answer
0 Votes

In case you have this error:

"Install failed: RPC call to 'app.install.stream.finalize' could not be completed as the RPC stream is closed"

 

1st option: Try changing the appUUID in the package.json, and rebuilding the app.

 

2nd option: Try to delete the ~/Library/Application Support/Fitbit OS Simulator directory (on MacOS).

Restart the simulator, which is waiting for an clockface to be installed.

Roll back on an old version of your code (that was functioning) before building and installing again.

Best Answer
0 Votes