Howto: trash storage...

Posted on
  • I was fiddling with the messages app, and to test things I foolishly dumped this all at once into the IDE left side (i.e. gave it a ton of messages to process and append to messages.json):

    function test(src){GB({"t":"notify","id":src+'-te­st',"src":src,"title":"Test","body":src+­" test message."});}
    ["calendar", "mail", "music", "phone", "sms message"].forEach(test);
    ["facebook", "gmail", "google home", "hangouts", "instagram", "messenger", "outlook mail", "skype", "slack", "telegram", "twitter", "whatsapp", "wordfeud"].forEach(test);
    

    I guess I shouldn't be surprised that Things went Wrong, but somehow it even managed to trash the storage bad enough that it wouldn't boot anymore and I had to reflash the firmware. (using the IDE Storage button definitely listed corrupted file names)
    I'm just wondering if that should be possible? (and if not, I guess this might be a way to reproduce it, haven't tried it again...)

    (After reflashing, the watch detected that my storage was corrupt and properly wiped everything back to factory settings, so that went pretty smooth :-)

  • What firmware version were you using at the time?

    Something like that should definitely not be able to trash the Bangle.js firmware, but it's possible that if there is some issue it could mess up the Storage (but that should be recoverable using the 'reload without loading code' instructions).

    I just tried the code you posted here on an up to date Bangle and it seems to work fine for me

  • What firmware version were you using at the time?

    I'm 90% sure some 2v11 from a while back...

    I just tried the code you posted here on an up to date Bangle and it seems to work fine for me

    Maybe it could have something to do with my earlier testing? I think messages.json already contained a bunch of largeish messages, could Storage loading those, adding more, and then writing back to the same file break things?

    I'll try to remember to document errors a bit more if it ever happens again, instead of just going whoops-reflash.

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

Howto: trash storage...

Posted by Avatar for rigrig @rigrig

Actions