-
• #2
Thats's odd - it isn't expected... You could check the Chrome Dev console when you upload to see if the file you expect is being downloaded by Chrome.
I know that GitHub does very aggressive cacheing. You could try Ctrl+click on the page reload button which might help?
-
• #3
Yeah, "very aggressive cacheing" seem to be one of the keys to this behaviour.
But, let's say I wanted to avoid going through GitHub to upload my bundle, as it's cumbersome and fiddly, is there a way to accomplish that? That way I'd be able to do my edits and experiment with the entire bundle, locally, before having to deal with Github as the go-between.
Thanks for a super fun and versatile product! You've re-sparked my interest in coding for a watch since the days of the Pebble era.
-
• #4
But, let's say I wanted to avoid going through GitHub to upload my bundle
You could host the app loader locally? I don't know what OS you're on, but if you can install a webserver (it doesn't even have to be HTTP) then you can just use the app loader direct from your PC. That's how I develop.
You can also use a command-line app that uses Node.js: https://github.com/espruino/BangleApps/blob/master/bin/apploader.js
But especially on Windows this is a pain, as Node.js doesn't appear to have great Bluetooth LE support on Windows.
-
• #5
You can also use a command-line app that uses Node.js: https://github.com/espruino/BangleApps/blob/master/bin/apploader.js
Ooh, I was just thinking it would be nice to have that, without even realizing it already exists, nice!
FWIW: if you've got
npm
installed anyway, you can (after doingnpm install
) usenpm run local
to start a webserver onlocalhost
-
• #6
You're absolutely right. I've managed to put up a dockerised environment that works on both winows (through WSL 2) and Ubuntu 20.04 and this has improved my situation immensely, especially with the fact that I don't get stuck in cache-hell of Github.
Now, the apploader.js I haven't got to work yet. I can get it to detect my watch but as soon as I try to install anything I run into issues in the shape of
$ node apploader.js install about 12:ab:34:cd:56:es ... App storage contains a 'supports' field, but no device ID found App storage contains a 'supports' field, but no device ID found /home/node/app/core/lib/heatshrink.js:37 ... abort(App storage contains a 'supports' field, but no device ID found). Build with -s ASSERTIONS=1 for more info.
-
• #7
Just tried here and same problem - I made a few changes, try now and see if it's better.
I had to hard-code the device to Bangle.js 2 but I guess that will suit most people, and changing it if you have a v1 is very easy
-
• #8
That worked out much better! Thanks for this, really appreciate you spending your time on it!
I've been working on a clock face app. It's been going well before but now I've run into an issue that I can't seem to get around.
Following these steps
Looking at the output from interacting with the app, the code hasn't been updated. E.g. the app from first install echoes console.log() output. After installing the clock face update, the console.log() is still being output, even when I have removed them from the code.
The only way to make the code changes "stick" is either
Is this to be expected? It's certainly very cumbersome to me to hve to reset the BangleJS 2 just to make sure that my latest code updates are working correctly.
Firmware version 2v15