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

FitBit OS Simulator shows "Dang! Simulator Failed to Start. Try again." on command-line deployment

ANSWERED

Tried to wipe everything clean (the app and all traces in ~/Library; I'm using OSX) - but still, when I do 'build' and 'install' in a CLI, I see this:

 

App install complete (full)
Launching app
[10:39:26 PM]       App: App Closed
Device 'Versa 2 Simulator' disconnected

 

And in the simulator I see "Dang! Simulator Failed to Start. Try again."

 

package.json dependencies:

 

    "@fitbit/sdk": "~4.2.1",
    "@fitbit/sdk-cli": "~1.7.3"

 

Also, it works fine when deploying from FitBit Studio in browser - but not from CLI.

 

Anyone else faced similar issue?

 

Thanks!

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

OK I think I found the problem - after answering "the code is the same" I realised that the only thing I could not sync to the Studio was package.json, so I downloaded the code from the Studio and compared the two - the one from Studio worked, while my original did not.

 

After some trial-and-error lines removal, turned out it was in "i18n" section - at some point I saw some warnings about missing description, repository and license info, so I (probably erroneously) decided those should be defined in the i18n section so it looked like this (not working):

"i18n": {
      "en": {
        "name": "Funktional",
        "description": "Functional watchface",
        "repository": "https://github.com/hydralien/FitBit-Funktional-Watchface",
        "license": "MIT"
      }
    }

 

Curiously enough, if I remove the "repository" value, it works - so this is OK (even though it might still do nothing):

 

"i18n": {
      "en": {
        "name": "Funktional",
        "description": "Functional watchface",
        "repository": "",
        "license": "MIT"
      }
    }

 

View best answer in original post

Best Answer
0 Votes
3 REPLIES 3

Is it exactly the same project which is failing, or does it have a different ID? Are there any other differences in the project which works? Is it particularly large?

Best Answer
0 Votes

Yes, exactly same project and exactly same code (copied from IDE - pasted into FitBit Studio editor). It's relatively simple watchface, so I wouldn't expect it to be heavy (if judging from the app.fba size in build/ directory, it's 23K). Note that install phase goes well, but it dies on launch attempt.

 

Here's what I see in the simulator log when trying to launch the locally built app:

[2021-01-20 11:18:16.455] [info] shell->app: {"id":6,"method":"app.start","params":{"app":{"uuid":"9347ae68-6ec4-478e-9549-e4e9bc24c886","buildID":"0E98B3687159B6DE","name":"Funktional"}},"jsonrpc":"2.0"}
[2021-01-20 11:18:16.466] [info] app->shell: {"jsonrpc":"2.0","result":null,"id":6}
[2021-01-20 11:18:16.472] [error] appsim stderr: 2021-01-20 11:18:16.471 app[85577:37131264] ASSERT_Log: Type: 16 func_addr: 0x09429460 lr: 0x00000000, file: ../../products/common/src/fb_apps/switcher/switcher_clock.c, line: 347, func: VerifyClockId, expr: app_id == app_data->running_clock_id
2021-01-20 11:18:16.471 app[85577:37131264] data:
2021-01-20 11:18:16.471 app[85577:37131264] 1

[2021-01-20 11:18:16.473] [info] app->shell: {"jsonrpc":"2.0","method":"app.status","params":{"app":{"uuid":"000013ff-0000-4000-8000-000000f17b17","buildID":"0000000000000000","name":"RunJS","isBuiltin":true},"status":"stopped"}}
[2021-01-20 11:18:16.476] [info] app->shell: {"jsonrpc":"2.0","method":"display.status","params":{"on":true,"aodActive":false,"stayOn":false,"brightness":0.4}}
[2021-01-20 11:18:16.481] [error] appsim stderr: 2021-01-20 11:18:16.471 app[85577:37131264] 0
2021-01-20 11:18:16.471 app[85577:37131264] 0
2021-01-20 11:18:16.471 app[85577:37131264] 0
2021-01-20 11:18:16.472 app[85577:37131264] ASSERT_Log: Type: 16 func_addr: 0x09429320 lr: 0x00000000, file: ../../products/common/src/fb_apps/switcher/switcher_clock.c, line: 385, func: Switcher_ClockLaunched, expr: FBAPPID_INVALID == app_data->running_clock_id
2021-01-20 11:18:16.472 app[85577:37131264] data:
2021-01-20 11:18:16.472 app[85577:37131264] 1
2021-01-20 11:18:16.472 app[85577:37131264] 0
2021-01-20 11:18:16.472 app[85577:37131264] 0
2021-01-20 11:18:16.472 app[85577:37131264] 0
2021-01-20 11:18:16.481 app[85577:37131452] Calling FB_Assert_Fatal:

[2021-01-20 11:18:16.485] [error] appsim stderr: 2021-01-20 11:18:16.481 app[85577:37131452]   file: ../../products/common/src/fb_apps/runjs/runjs_manifest.c
2021-01-20 11:18:16.481 app[85577:37131452]   line: 268
2021-01-20 11:18:16.481 app[85577:37131452]   func: (null)
2021-01-20 11:18:16.481 app[85577:37131452]   msg : (null)
2021-01-20 11:18:16.481 app[85577:37131452]   LR  : 0x00000000

[2021-01-20 11:18:16.487] [info] appsim stdout: [D][11:18:04.229][] settings_scheduler_Initialize
[D][11:18:04.229][] settings_scheduler_HandleTimeChange
[D][11:18:04.229][] Schedule: setting 45 enabled 0 start 82800 end 25200
[D][11:18:04.229][] Schedule: setting 36 enabled 1 start 25200 end 82800
[D][11:18:04.229][] Next expiration after 42116 seconds
[D][11:18:04.229][] AOD setting NOT CHANGED (locked by user)
[D][11:18:04.233][] Popupmgr: precached popup "Notif-Center" context cleared.
[D][11:18:04.316][] Popupmgr: precached popup "Notif-Center" context cleared.
[D][11:18:04.317][] Launcher: Process creation of app_id 111 took 0ms. Status:0.
[D][11:18:04.317][] Sending app launch notification for app_id 111
[D][11:18:04.317][] Switcher_Clock: Launch of clock_id 111 succeeded. attempt 1
[E][11:18:04.320][] Error opening annotation log
[I][11:18:04.321][] JS Application Compatibility Version: 1.0.0
[D][11:18:04.330][] App informed of window resume
[D][11:18:04.330][] Switcher_Clock: Clock_id 111 launched
[D][11:18:04.489][] App informed of window resume
Snapshot found: /mnt/cache/index.js.snapshot
./index.js:3:1> Default JS app started
Snapshot loaded and executed (total time: 4 ms)
[D][11:18:04.493][] Switcher_Clock: Clock_id 111 foregrounded
[D][11:18:04.493][] Switcher_UpdateClockInstallView: Clock now running!
[E][11:18:04.493][] Sending while the simulator control channel is disconnected
[D][11:18:07.355][] Simulator control websocket client connected
[I][11:18:07.360][] Launcher: Relaunch foreground app (app_id 111) with animation 0'

[A][11:18:07.378][] Connecting to "wss://027-v3-api-soa.fitbit.com:443/dbridge/"
[D][11:18:07.386][] Launcher: Process creation of app_id 111 took 0ms. Status:0.
[D][11:18:07.386][] Sending app launch notification for app_id 111
[D][11:18:07.386][] Switcher_Clock: Clock_id 111 terminated, was_killed:0.
[D][11:18:07.386][] Switcher_Clock: Clock_id 111 launched
[E][11:18:07.395][] Error opening annotation log
[I][11:18:07.395][] JS Application Compatibility Version: 1.0.0
[D][11:18:07.412][] settings_scheduler_HandleSettingsChange
[D][11:18:07.412][] settings_scheduler_HandleSettingsChange
[D][11:18:07.412][] settings_scheduler_HandleSettingsChange
[D][11:18:07.583][] App informed of window resume
Snapshot found: /mnt/cache/index.js.snapshot
./index.js:3:1> Default JS app started
Snapshot loaded and executed (total time: 1 ms)
[D][11:18:07.584][] Switcher_Clock: Clock_id 111 foregrounded
[D][11:18:07.936][] Developer bridge websocket connected
[D][11:18:16.471][] Launcher: Process creation of app_id 1 took 0ms. Status:0.
[D][11:18:16.471][] Sending app launch notification for app_id 1
[D][11:18:16.471][] Switcher_Clock: Clock_id 111 terminated, was_killed:0.
[D][11:18:16.471][] Switcher_Clock: Clock_id 1 launched
[D][11:18:16.472][] Switcher_Clock: Next clock changed from 111 to 1

[2021-01-20 11:18:16.589] [info] appsim exit code: null (signal SIGABRT)

 

 To compare, when launching the app from Studio, the log looks like this:

 

[2021-01-20 11:20:38.644] [info] shell->app: {"id":10,"method":"app.start","params":{"app":{"uuid":"9347ae68-6ec4-478e-9549-e4e9bc24c886","buildID":"0E8D1B579AE51BC2","name":"Funktional"}},"jsonrpc":"2.0"}
[2021-01-20 11:20:38.648] [info] app->shell: {"jsonrpc":"2.0","result":null,"id":10}
[2021-01-20 11:20:38.679] [info] app->shell: {"jsonrpc":"2.0","method":"sensor.stop","params":{"sensor":"hrm","options":{}},"id":1}
[2021-01-20 11:20:38.681] [info] shell->app: {"id":1,"jsonrpc":"2.0","result":null}
[2021-01-20 11:20:38.683] [info] app->shell: {"jsonrpc":"2.0","method":"app.status","params":{"app":{"uuid":"9347ae68-6ec4-478e-9549-e4e9bc24c886","buildID":"0E8D1B579AE51BC2","name":"Funktional","isBuiltin":false},"status":"stopped"}}
[2021-01-20 11:20:38.685] [info] app->shell: {"jsonrpc":"2.0","method":"display.status","params":{"on":true,"aodActive":false,"stayOn":false,"brightness":0.4}}
[2021-01-20 11:20:38.686] [error] appsim stderr: 2021-01-20 11:20:38.679 app[85682:37132623] ASSERT_Log: Type: 16 func_addr: 0x09238460 lr: 0x00000000, file: ../../products/common/src/fb_apps/switcher/switcher_clock.c, line: 347, func: VerifyClockId, expr: app_id == app_data->running_clock_id
2021-01-20 11:20:38.679 app[85682:37132623] data:
2021-01-20 11:20:38.679 app[85682:37132623] 1
2021-01-20 11:20:38.679 app[85682:37132623] 0
2021-01-20 11:20:38.680 app[85682:37132623] 0
2021-01-20 11:20:38.680 app[85682:37132623] 0
2021-01-20 11:20:38.680 app[85682:37132623] ASSERT_Log: Type: 16 func_addr: 0x09238320 lr: 0x00000000, file: ../../products/common/src/fb_apps/switcher/switcher_clock.c, line: 385, func: Switcher_ClockLaunched, expr: FBAPPID_INVALID == app_data->running_clock_id
2021-01-20 11:20:38.680 app[85682:37132623] data:
2021-01-20 11:20:38.680 app[85682:37132623] 1
2021-01-20 11:20:38.680 app[85682:37132623] 0
2021-01-20 11:20:38.680 app[85682:37132623] 0
2021-01-20 11:20:38.680 app[85682:37132623] 0

[2021-01-20 11:20:38.756] [info] app->shell: {"jsonrpc":"2.0","method":"sensor.start","params":{"sensor":"hrm","options":{}},"id":2}
[2021-01-20 11:20:38.757] [info] shell->app: {"id":11,"method":"sensor.update","params":{"sensor":"hrm","readings":[{"heartRate":60,"timestamp":1611138038757}]},"jsonrpc":"2.0"}
[2021-01-20 11:20:38.758] [info] shell->app: {"id":2,"jsonrpc":"2.0","result":null}
[2021-01-20 11:20:38.758] [info] app->shell: {"jsonrpc":"2.0","method":"app.status","params":{"app":{"uuid":"9347ae68-6ec4-478e-9549-e4e9bc24c886","buildID":"0E8D1B579AE51BC2","name":"Funktional","isBuiltin":false},"status":"started"}}
[2021-01-20 11:20:38.759] [info] app->shell: {"jsonrpc":"2.0","result":null,"id":11}
[2021-01-20 11:20:38.759] [warn] No bundles for UUID:9347ae68-6ec4-478e-9549-e4e9bc24c886 BuildID:0E8D1B579AE51BC2

 

Best Answer
0 Votes

OK I think I found the problem - after answering "the code is the same" I realised that the only thing I could not sync to the Studio was package.json, so I downloaded the code from the Studio and compared the two - the one from Studio worked, while my original did not.

 

After some trial-and-error lines removal, turned out it was in "i18n" section - at some point I saw some warnings about missing description, repository and license info, so I (probably erroneously) decided those should be defined in the i18n section so it looked like this (not working):

"i18n": {
      "en": {
        "name": "Funktional",
        "description": "Functional watchface",
        "repository": "https://github.com/hydralien/FitBit-Funktional-Watchface",
        "license": "MIT"
      }
    }

 

Curiously enough, if I remove the "repository" value, it works - so this is OK (even though it might still do nothing):

 

"i18n": {
      "en": {
        "name": "Funktional",
        "description": "Functional watchface",
        "repository": "",
        "license": "MIT"
      }
    }

 

Best Answer
0 Votes