Today was not a great day...

Posted on
  • Today was also kind of a long/busy day, but I figured I'd post now while I remember it best:

    1. I managed to soft-brick my Bangle v1. I strongly suspect it has to to with my "great" idea to log all GB messages, which probably resulted in a combination of out-of-memory errors and Storage calls happening at almost the same time.
    2. When I got home, the web IDE didn't list any files left in storage, so I figured I'd reset my watch
    3. "Install default apps" didn't work, because https://banglejs.com/apps/defaultapps_ba­nglejs.json doesn't exist
    4. Manually reinstalled apps, including my beloved barclock
    5. Ran into some errors caused by Layout (a bit fuzzy what went wrong exactly... probably missing polyfills from me forgetting to install the bootloader.)
    6. Tried to update to cutting edge firmware by downloading the zip, ran into an error because of

      function stepDownload(data) {
      if (window && window.location &&
          window.location.protocol=="https:" &&
          data.binary_url.substr(0,5)=="http:") // Uncaught TypeError: Cannot read properties of undefined (reading 'substr')
        data.binary_url = "https:"+data.binary_url.substr(5);
      data.flashFn(data);
      }
      
    7. managed to flash the cutting edge firmware, still errors

    8. uploading the latest bootloader fixed it (I think I probably forgot to upload it, and just tried to load() the clock from the web IDE, getting those errors because it was missing polyfills)

    tl;dr:

    • messing with Storage while out-of-memory probably somehow managed to erase all storage, no idea if it's reproducible
    • "Install default apps" is broken
    • Flashing a local zip file is broken
  • Argh - sorry - I'll fix the default apps thing now.

    You mean flashing a zip via the Web IDE? How exactly did you do this - did you upload a ZIP directly into your browser, or did you just paste the URL in and click flash?

    I imagine the Layout error you hit was because of the bootloader. I've been doing so much development recently it looks like I ran out of Travis build credits (they should replenish today) so the cutting edge firmwares are over a week old right now, and do need the polyfills. But either way some things (like load()) won't work without the bootloader.

  • messing with Storage while out-of-memory probably somehow managed to erase all storage, no idea if it's reproducible

    from what you describe it may be even this case https://github.com/espruino/Espruino/iss­ues/2075
    otherwise there is issue https://github.com/espruino/Espruino/iss­ues/2009

  • flashing a zip via the Web IDE? How exactly did you do this

    I downloaded a ZIP to my PC, then uploaded it into the browser. I got it to work using F12 by setting a breakpoint in the stepDownload function and manually setting data.binary_url = '' in the console. (it was undefined)

    I imagine the Layout error you hit was because of the bootloader.

    Yeah, it was late and I was tired, so it was probably just me forgetting to upload the bootloader.

    messing with Storage while out-of-memory probably somehow managed to erase all storage, no idea if it's reproducible

    from what you describe it may be even this case https://github.com/espruino/Espruino/iss­ues/2075
    otherwise there is issue https://github.com/espruino/Espruino/iss­ues/2009

    I doubt it was the watchdog, as the watch didn't reboot by itself.
    Basically the watch was showing a "Memory" error, I tried long-pressing BTN3 which gave some error I forgot, and holding BTN1+2 got me stuck at the boot screen.
    As for the memory error: I was testing an app which logs all incoming Gadgetbridge messages, and strongly suspect that caused it: it reads the full log into memory every time a new message arrives, and I got a few large ones that day.

  • I downloaded a ZIP to my PC

    Thanks! I've just fixed this one now :)

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

Today was not a great day...

Posted by Avatar for rigrig @rigrig

Actions