-
-
Notifications
You must be signed in to change notification settings - Fork 753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regression: calling builtin js libs fails with "Uncaught SyntaxError" since b8634fd8e0040c09946e5b6e0eb0bf4b6587acec #2578
Comments
You're sure you've tested on an actual device? Because I've been using firmwares with this change in on a device on my wrist for ages now without issues. Just tried again with Are these builds you're doing yourself? What platform are you building on? The minified JS files in I've had of issues with Git changing line endings between windows/unix, but not other things... But it might not be a huge surprise if a platform is trying to interpret the binary file as UTF8 for some reason. Maybe check the MD5sum of the file? this is what it is at current git head 1aed934
|
Yup 👍 I've had to use dfu to reflash my watch after building from current master, because it would only show that error and I couldn't get into the recovery menu.
I'm doing these builds myself in a container based on
where I then run: cd /espruino
source scripts/provision.sh BANGLEJS2
make clean && BOARD=BANGLEJS2 DFU_UPDATE_BUILD=1 RELEASE=1 make with the only addition of an ssh server and rsync for using that container from CLion. An emulator built from b8634fd using that container errors out on source scripts/provision.sh EMSCRIPTEN2
make clean && BOARD=EMSCRIPTEN2 RELEASE=1 make And using an emulator built from current master, the Web IDE shows "Unable to retrieve board information. Connection Error?" and "Connected to Emulator (No response from board)". The MD5sum of setUI matches, so ideally git is not to blame: echo '2be6d6d2bba8f9559327b212e7a47f14 libs/js/banglejs/Bangle_setUI_Q3.min.js' | md5sum -c
libs/js/banglejs/Bangle_setUI_Q3.min.js: OK I guess I must've messed something up with the build process then 🤷 Just tried the firmware from https://www.espruino.com/binaries/travis/master/espruino_2v24.196_banglejs2.zip and everything 'just works' for me now too. Sorry for bothering you with this 😅 Still want to build my own firmwares though... |
Switching my container image from
Not sure why I thought I needed python2 anyways. But now the emulator doesn't work with the Web IDE since ad27875; the IDE only shows "Unable to retrieve board information. Connection Error?" and "Connected to Emulator (No response from board)". Progress, I guess 🤷 |
Thanks for the updates! That's good to know - so I guess it was installing Python2 that did it?
Thanks for letting me know and tracking it down! I imagine the thing that's causing the problem is the addition of EV_CUSTOM to the enum (it seems like the emulator hard-codes the value for EV_USB). I've just pushed a change which moved EV_CUSTOM to after the serial devices and that should fix it! |
Thanks for the fix! Can confirm that as of ffd7270 the emulator works again :) About building for the Bangle.js 2: I will probably never be allowed near
The proper solution would probably be to switch to the non-abandoned new version of
So what fixed the builtin js libraries for me was switching from debian buster to debian bookworm, and only using python3. Now I can create working binaries :) |
Thanks for the update - yes, I hit the nrfutil issue too, but I was able to just install that version of Python on my system. That script to force the install is really handy though. Personally, I wonder whether I shouldn't just include a working nrfutil in the Espruino repo (it's not like we need the bit of it that uses pc_ble_driver_py) so we can ensure it stays working? Because even if we manage to hack something up this time, it's only a matter of time before Python updates and breaks something else. I had to do that for ... as an aside, I just don't know what language developers are thinking? C compilers will still compile code written 50 years ago but somehow Python seems to think everyone should rewrite their code every 6 months. Who introduces breaking changes between versions 3.10 and 3.11?? |
That'd be really neat! I'm not a Python-person, so kind of totally out of the loop there, but maybe if you iterate fast (and don't want to end up like C++), you've just got to break backwards-compatibility every once in a while, to do away with the stuff that turned out to be suboptimal? |
On both Bangle.js 2 and the Bangle.js 2 emulator, calling builtin js libs like
Bangle.setUI()
doesn't work anymore.The following code:
only results in:
but at least Bangle.loadWidgets()` is affected as well.
I bisected the issue, and it looks like b8634fd is the first bad commit.
No idea how to fix that though 😅
To reproduce, try a firmware / the emulator built from b8634fd that doesn't work, and compare it with the firmware / emulator from 617e1a2 which should be working.
The text was updated successfully, but these errors were encountered: