health app not working

Posted on
  • Hi,
    i've had the bangle.js 2 for a couple weeks now. After like 3 days of use I realised the health app wasn't recording my steps and is very inconsistent with the heart and movement recording also. I randomly get in the console following error:

    Uncaught Error: Expecting a function to call, got Number
     at line 16 col 212 in .boot0
    ....now()-59E4);a&&0<a.steps&&m();var f=function(c){return 145*...
                                  ^
    in function called from system
    

    I have listened to, as a test, in another app the step event and it seems to get the event but just this app isn't working. I have even tried to do a factory reset and just installing the health app, to rule out any of my code or playing around having had influence and it still doesn't work.

    Would be glad to get some help, thanks

  • Thanks for the stack trace (in this and the other issue you reported).

    As @user140377 pointed out in https://forum.espruino.com/conversations­/392195/#comment17212081 both your issues seem to be to do with a variable m being overwritten (in this case we can see it's with a number).

    I'd be willing to bet that one of the widgets you've made writes to a (non-local) variable called m, and that's what is causing the issues.

  • Please try without widmp

  • I erased it and for now, im just trying out a bit before going to sleep, it seems to finally be counting :)
    When I did factory reset it also worked for about an hour or so and then stopped. So will be giving more feedback tomorrow after a full day

  • ok, I have pushed a fix to PR #3118

    @Gordon Can we have the linter check those?

  • Thanks for that! All looks good - there is actually a linter automatically run on commits - for instance on yours, https://github.com/espruino/BangleApps/a­ctions/runs/7052443444/job/19197489992 - under Test all apps and widgets nothing is displayed after the sanity check = no problems found :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

health app not working

Posted by Avatar for etznabchen @etznabchen

Actions