Can't install widgets anymore

Posted on
  • After a firmware update of my Bangle js I lost all my applications, so installed all the default apps with the app loader.
    This worked and the watch is booting again.

    After that I want to install my widgets but none of them is working anymore and gave me an error WIDGETS not defined.
    When try to install the widgets the watch will not boot anymore after.
    After reboot the screen say loading and a red dot is flashing on top

    Uncaught ReferenceError: "WIDGETS" is not defined
    at line 24 col 17 in .bootcde
    WIDGETS["date"]={

                ^
    

    in function called from line 29 col 4 in .bootcde
    })()

  • Have you tried a different Widget? Maybe the one you try is buggy.

  • Yes tried, many of them, tried my own widgets by the WEB IDE , but also tried to add by the app loader. Also some apps like clocks are preventing the watch from booting.

  • I don't see you mention to have tried a factory reset from the settings. Try that one or two times if you haven't.

  • I think my firmware upgrade has reset everything. In settings there is no option Factory reset

  • You don't have 'Settings'»'Utils'»'Factory Reset'?

  • Also, have you tried reuploading the firmware update? Or tried uploading the firmware you had previous to 2v15?

    EDIT: Or maybe, uninstall bootloader and install it again.

  • Only reset settings, maybe that's the factory reset?

  • Tried all nothing seems to help, default apps works 100% but adding an app or widget let me not boot again.

  • Try 'reset settings' then. It's not the same but maybe it can help.

  • I would put my money on settings->utils->"rewrite settings". If in doubt try both..

  • Did rewrite and reset but no solution, when try to upload a Widget I see this.

    Uncaught ReferenceError: "WIDGETS" is not defined
    at line 1 col 276
    Gave this error on every line with the word WIDGETS in it

  • Try this:

    1. Open the web ide
    2. Press yellow connect icon in upper left corner.
    3. Choose 'Web Bluetooth'
    4. Chose 'Bangle.js ...' in the pop up.
    5. Press third icon from the top in the middle bar to see the files in device storage.
    6. Click the eye-icon on .bootcde to view it.
    7. Click 'Save' to download a backup, name will be 'bootcde.txt'.
    8. Click 'Decode JS' to make the code readable.
    9. Click 'Copy to Editor'
    10. Exit 'Device Storage' pop-up.
    11. Click small downward arrow on the fourth icon in the middle bar.
    12. Choose 'Storage' to select a file from storage
    13. Select '.bootcde'
    14. Inspect it to see if you can figure out how to fix you problem. If you do then stop following along and be happy! :)
    15. Delete all code.
    16. Copy and paste the following code to that same field in which you just deleted all code (it's from my Bangle.js 2 '.bootcde'-file):

      var clockApp=(require("Storage").readJSON("s­etting.json",1)||{}).clock;
      if(clockApp)clockApp=require("Storage").­read(clockApp);
      if(!clockApp){clockApp=require("Storage"­).list(/\.info$/).map(file =>{const app=require("Storage").readJSON(file,1);­if(app && app.type =="clock"){return app;}}).filter(x => x).sort((a,b)=> a.sortorder-b.sortorder)[0];if(clockApp)­clockApp=require("Storage").read(clockAp­p.src);}
      if(!clockApp)clockApp=`E.showMessage("No­ Clock Found");setWatch(()=>{Bangle.showLaunche­r();}, global.BTN2||BTN, {repeat:false,edge:"falling"});`;
      eval(clockApp);
      delete clockApp;
      
    17. Press the fourth button (not the little arrow) in the middle bar to upload the code.

    18. Hopefully the bangle boots and everything is fine, that's what happens for me in any case. :) If not try manually rebooting.

    19. Stop following along if the bangle works.

    20. If it still doesn't work I suggest you restore the code from the backup 'bootcde.txt' to your '.bootcde'-file (you'll have to connect the bangle again, se point 2.). In which case your back on square one. Sorry it didn't work :(

    EDIT: Consider sharing the code from your 'bootcde.txt' backup with a comment here as well in case that would help in figuring out if something should be fixed somewhere apart from on your bangle.

  • Hi! Any update on this? Are more people having this problem?

    Did you actually have a similar issue @Ganblejs and did you figure out the code that was causing the error?

    This error looks a bit odd to me:

    Uncaught ReferenceError: "WIDGETS" is not defined
    at line 24 col 17 in .bootcde
    WIDGETS["date"]={
    

    I don't see the code WIDGETS["date"] anywhere in https://github.com/espruino/BangleApps. Is date one of your own widgets?

    It seems that you may have copied it in using the Web IDE while it was set to upload to Flash, which overwrote the bootloader?

    The Bangle.js development docs (http://www.espruino.com/Bangle.js+Develo­pment) mention:

    Note: If you've used Espruino before, make sure the Upload button (middle of the screen) shows RAM underneath it. Otherwise by writing to Flash you can remove the watch's built-in menu (you can just re-add it by removing and installing bootloader using https://banglejs.com/apps)

  • The code WIDGETS["date"] come from the app HRM. This widget is a bit modified to sent Heartrate over BLE to my EspruinoHub. This widget has functioned for more then a year. But after loosing all the apps and widgets i can not install it anymore

  • The code WIDGETS["date"] come from the app HRM. This widget is a bit modified

    The code appears to be in the file .bootcde now - this file is not written/updated by Bangle.js apps the only way it really could have got there is if you'd got the Web IDE set to upload to 'flash' rather than your modified HRM app.

  • No, I've not had this problem myself. Just looked at the code on my watch and saw that it didn't match what @user133055 was describing.

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

Can't install widgets anymore

Posted by Avatar for user133055 @user133055

Actions