espruino / BangleApps

Bangle.js App Loader (and Apps)
https://banglejs.com/apps
MIT License
498 stars 1.17k forks source link

Bad color value formatting on battery and bluetooth widgets #768

Closed smartlitchi closed 3 years ago

smartlitchi commented 3 years ago

After updating Battery Level Widget to v0.07 and Bluetooth Widget to v0.05, they were unable to load because of this error : Uncaught Error: If Color is a String, it must be of the form '#rrggbb'.

gfwilliams commented 3 years ago

Hi. Thanks for this, but which Espruino firmware are you on?

I believe you're probably on a pretty old firmware - the app loader should really have warned you. Did it not?

On recent firmwares that new form of color value is totally fine.

gfwilliams commented 3 years ago

Just checked - that was stupid, sorry. The app loader only warns if you're below version 2v08, but the #rgb thing came in in 2v09 which has been around for a few months now.

I've just updated the app loader so it'll warn folks to update.

Thanks for letting me know and for the PR, but I think in this case it's worth just updating the Bangle.js firmware to the latest version (as the #rgb form is used in a whole bunch of apps now)

gfwilliams commented 3 years ago

'Fixed' with https://github.com/espruino/BangleApps/commit/6670d517243934e809fe462c342fcc4885bdf7d6

Changelog here: https://www.espruino.com/ChangeLog

So loads of improvements

smartlitchi commented 3 years ago

Yes I was on 2v08 (just received the watch today) so it explains the issue. Thanks for pointing me to the solution. After updating the firmware, everything worked just fine