• I believe my watch is running bootloader 2v12 and firmware 2v14.

    Earlier today, my watch froze in the messages app and wouldn't respond to me trying to close it with the touch screen. I held down the button for a few seconds, and a loading box appeared. This loading box was the wrong color (black text on a white background even though I use my watch with a dark theme), and never disappeared. I eventually did a full reboot of the watch, and it stays on the light-themed Banglejs logo forever. If I run load() through the console, the loading box appears and never disappears. I noticed that manually trying to load() a file failed, so I called storage.list(). It appears that almost all of the files were deleted from my watch, with only the following remaining:

    • widlock.wid.js
    • widlock.info
    • wid_a_battery_widget.wid.js
    • wid_a_battery_widget.info
    • calendar.img
    • `ea,p $ (\"
    • !AP

    The Javascript and info files appear to be unharmed, calendar.img and `ea,p $ (" appear to be binary files. I'm not sure what is supposed to be in calendar.img, but I feel like `ea,p $ (" probably isn't supposed to be there because the name looks like a random chunk of minified code code. Interestingly, when I try to read !AP, I get undefined, even though the documentation says that this only happens when the file does not exist, and the file does show up in storage.list(). Am I misunderstanding something, or does this sound like a bug? Normally I'd just blame my own code for this and move on, but I've been running the same code on the watch for almost a month straight and a file showing up in storage.list() but not existing when I try to read it sounds like filesystem corruption to me.

    I am aware that all I should need to do to fix this is go to the app loader and reload my apps. However, before I do that I want to recreate the filesystem just in case it's corrupted. Is there any way to do that? And before I do any of that, is there any information I might be able to dig from this that would be helpful?

  • Hi - I'm afraid it looks like the filesystem has got corrupted - which would be a firmware issue. I thought we'd pretty much got this fixed now, but I did hear a report a month or so ago that might have implied that writing to a StorageFile could have caused issues in some cases.

    I'm afraid the solution is to reset the watch. Install Default Apps should do a full erase which would fix any issues. If you want to do it manually with the IDE you could just run Bangle.factoryReset().

    The odd thing is normally the firmware would detect storage corruption when it booted and would automatically reset everything.

    If bootloader is 2v12 I guess the watch was running 2v12 firmware initially, and it's possible that the 2v12 firmware had corrupted something slightly which then led to this issue later on as the Storage got full enough to hit the corrupted area.

    So hopefully it's very unlikely you'll see this again...

    Really, in order to be able to fix an issue like this I need to be able to find a way to reproduce it reliably, but that's proving very difficult...

  • I haven't used StorageFiles anywhere in my own code, but maybe an app I installed used them. And yeah, my watch definitely was running 2v12 at some point, so the theory of old corruption being revealed now makes sense too.

    The odd thing is normally the firmware would detect storage corruption when it booted and would automatically reset everything.

    How long would this typically take, and is there a message during boot when this happens? I don't remember there being a message during boot and I didn't leave it on the logo for that long before attempting to reboot. Is it possible that I interrupted the process? Or is it more likely that it just didn't happen?

    Even if I did interrupt it, there was clearly corruption left behind, so the mechanism isn't perfect.

    And what would it be resetting to? Would it be completely blank and booting to the Bangle logo, or would it look like I had just taken it out of the box?

    So hopefully it's very unlikely you'll see this again...

    That's good. I called storage.eraseAll() just in case before connecting to the app loader and reloading the apps. (I used this as an opportunity to update the firmware and apps.) The watch is now back in service.

  • How long would this typically take, and is there a message during boot when this happens?

    The check happens reasonably fast at boot time, but if an error is found it'll display a message and erasing and writing the JS could take a minute or so.

    It's possible it could have been interrupted but I don't think that could cause the corruption (worst case it'd have failed to write some files that should be there).

    And what would it be resetting to?

    It's exactly as it comes (with that firmware version) so welcome screen, and very basic apps.

    Glad it's sorted now at least - but sorry you hit those corruption issues :(

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

Almost all files suddenly got deleted, file in storage.list() but doesn't exist when I try to read it

Posted by Avatar for user141569 @user141569

Actions