jeffmer / WatchApps

Support to run Bangle/Espruino Apps on P8, ROCK and Magic3 Smart Watches
MIT License
19 stars 10 forks source link

Default Alarm (v0.10) gets frozen #2

Closed dapgo closed 2 years ago

dapgo commented 2 years ago

I have installed Alarm but after opening it get stuck on "Loading" and error console:

Uncaught SyntaxError: Got '=' expected EOF at line 5 col 215 in alarm.app.js ...t]=function(){editAlarm(idx);};});=menu['< Back']=()=>{load();};return E.s... ^ in function "showMainMenu" called from line 7 col 14 in alarm.app.js showMainMenu();

After trying to remove from Apploader, I get the green snackbar confirmation but the app is not removed.

If i remove manually, i can reinstall but the issue persists.

Installed apps

[{"id":"boot","version":"0.01"}, {"id":"main","version":"0.04"}, {"id":"launch","version":"0.03"}, {"id":"setting","version":"0.03"}, {"id":"multiclock","version":"0.07"}, {"id":"calc","version":"0.01"}, {"id":"widbat","version":"0.06"}, {"id":"alarm","version":"0.10"}, {"id":"pairs","version":"0.01"}, {"id":"blackjack","version":"0.02"}, "P8","2v10.364"]

jeffmer commented 2 years ago

Hi, I have fixed the bugs in alarm app and you should now update to version 0.101. Updating works, however, deleting apps does not seem to work so I will leave this issue open:-(

jeffmer commented 2 years ago

I have now fixed the app deletion problem - it needed a newer version of the core module. Hopefully this has not broken anything else so I will close this issue for now. Many thanks for raising this.

dapgo commented 2 years ago

I have an alarm set :)

After updating i was able to open Alarm and set an alarm BUT when i clicked BACK it got frozen in "Loading" and unresponsive to long press, So I have to reset() +long press to go back to launcher.

BTW after the reset, the console produced a : Uncaught Error: Function "loadWidgets" not found! at line 23 col 8 in launch.js Bangle.loadWidgets(); ^

jeffmer commented 2 years ago

Are you sure you have selected a default clock in settings? You can check to see if it is set in settings.json. Also can you check that you have a .bootcde file.

dapgo commented 2 years ago

In "select clock" there is "MultiClock" selected. In .json there is [{"on":true,"hr":7.76666666666,"last":8,"rp":false,"as":true}]

bootcde.txt ¬clockApp=(require("Storage").readJSON("setting.json",1) {}).clock; £(clockApp)clockApp=require("Storage").read(clockApp); £(!clockApp){clockApp=require("Storage").list(/.info$/).map(file¢{®app=require("Storage").readJSON(file,1);£(appžapp.typeŠ"clock"){«app;}}).filter(x¢x).sort((a,b)¢a.sortorder-b.sortorder)[0];£(clockApp)clockApp=require("Storage").read(clockApp.src);} £(!clockApp)clockApp=E.showMessage("No Clock Found");setWatch(()=>{Bangle.showLauncher();}, BTN1, {repeat:false,edge:"falling"});; eval(clockApp); ¾clockApp;

BTW yesterday, this morning the alarm buzzed an hour earlier, then I checked the watch and also an hour less. I will keep undermonitoring watchtime+alarm

jeffmer commented 2 years ago

Try reloading boot without tokenisation - then look at .bootcde. If you type load() into the WebIde REPL the watch should run the selected clock. Your watch does not seem to be doing this so something is corrupt.

It may be that since the App Loader was not deleting apps properly, you may have old versions lurking on your watch. You could do require(‘Storage’).eraseAll() to be safe and then reload everything.

dapgo commented 2 years ago

1) remove boot, 2) install boot (pretokenise apps disabled) error installing - brown snackbar "Upload failed, Unexpected response Uncaught ReferenceError: "p" is not defined" 3) install boot (pretokenise apps disabled) load(); =undefined Uncaught Error: Function "loadWidgets" not found! at line 17 col 8 in multiclock.app.js Bangle.loadWidgets();

However, I removed boot again, install, brown snackbar, install, btn1, load() opens the watch. BUT pressing button1, freezes on "Loading"

jeffmer commented 2 years ago

That error is expected - the loader expects a show message routine so the first install is an error and the second should be fine. Loading is displayed by the screen driver and if it sticks there it means that it has not found a clock or launcher. LoadWidgets is loaded with the main app so check you have widgets.js. Also check you have uptodate firmware - 10.364. Did you erase everything and reload?

dapgo commented 2 years ago

Having firmware - 10.364 and the new alarm 0.101 Every time that modify alarm settings, after clicking "<BACK" the watch gets stuck in "Loading". Luckily this time long press works and allows to load the launcher.

jeffmer commented 2 years ago

Hi, I have finally been able to reproduce the fault you are are getting.It seems to be corruption of the on chip flash memory which I have been loading boot and main into. if you delete boot and main with the latest version of the app loader and reload boot (twice) and main, it should fix the problem - at least it did for me. They now get loaded into the external flash chip.