Trouble with “try in emulator” button in App Loader #6136
Replies: 1 comment
-
Posted at 2023-07-24 by @gfwilliams Hi, sorry about this. So the Web IDE right-hand side says something like After a few seconds that should be replaced with the contents of I've just pushed some changes so if you go to https://www.espruino.com/ide/ and then click refresh, then try clicking the emulator button again in the app loader it should be fine. Posted at 2023-07-24 by tev Thanks! Yes, that's what was happening. I did a force-reload on both browsers and now it's working. Is there a simpler way to get apps into the emulator which don't have an emulator button in the loader? Unfortunately, one of the first apps I wanted to tinker with seemed to turn out being one of the more complex ones out there (unbeknownst to me at first). It took a while, but I eventually worked out how to manually load each of the app's files into storage with the proper name prefixes, but then it used a module and I had to figure out exactly where that should be stored. To be fair, that turned out being in the documentation somewhere, but for some reason I had some trouble finding the correct info with Google, so it was a little frustrating. In the end, I got it working, though to reload the app I had to use a manual command in the debugger window as it gets stuck on a “Loading…” screen with no error messages if it tries to reload itself—haven't worked that part out just yet. Maybe something to do with the emulator defaulting to not having any of the usual apps installed that the physical Bangle.js ships with? Anyway, it makes me wonder if I'm missing something more obvious, as this workflow seems a bit more clumsy and long-winded than I was expecting. On the upside, I think in the process I'm starting to get a better context of how the Bangle.js system and apps are structured, so that should help. :) Posted at 2023-07-25 by @gfwilliams
If you click the little GitHub icon next to an app in https://banglejs.com/apps/ it'll bring you to the GitHub page where that app's files are, and you can then open that file and copy/paste in the IDE. However sometimes if an app isn't in the emulator it's because it's a multi-file application or depends on some other application. While it should be possible to load those into the emulator from the App Loader that's not something that's been done yet. Since you have a Bangle, I'd say try developing on the Bangle itself - it's a lot easier and there are a lot of safeguards to stop you 'bricking' it :) In that case:
Posted at 2023-07-25 by tev I see. Since most apps don't have that many files, I guess it's not that bad yet. I have noticed in many cases it does seem simpler to just directly modify an app file on the physical Bangle's storage, especially when I just want to do some longer-term testing of a small tweak in a larger app (and that change may involve a library file that's not meant to be run directly from RAM anyway). It would indeed be nice if the IDE remembered the source of the file I selected so that it could be written back to its source without having to manually locate and reselect the destination in the list. That would also reduce the chance of accidentally overwriting the wrong file on the device by clicking the wrong name. It would also be more ideal to have the buttons like “Copy to code editor” accessible immediately without having to scroll all the way to the bottom of the file first to reach them. Update: By the way, I worked out getting my own personal App Loader fork on Github and testing and pushing experimental changes to apps to my watch from there. It looks like I can do the same with the IDE too if I ever want to tinker with the code. Anyway, just posted my first small PR for BangleApps. :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2023-07-21 by tev
Hi all,
Just got a Bangle.js 2, been spending some time playing around with some apps, and looking forward to eventually seeing what kind of hacking I can do on it. :)
But right now, I cannot for the life of me figure out how to test apps in the emulator. The only docs I can find seem to make it sound as simple as clicking the emulator button for that app in the App Loader, but… evidently not. I click the button, my browser opens the Espruino IDE with an emulator window, but I can't get anything to happen. The emulator window just shows a splash screen, I click and drag every conceivable button and part of the UI but cannot get anything to happen no matter which app I try to test.
I can paste some little tutorial examples into the IDE and those run, but how on Earth do you load an app from the App Loader, view the code, and run that? All I get is a tab with a comment that says “Loading from ”, but no code and no response.
Tried this on both Firefox and Chromium on Ubuntu 20.04 and had the same results. I suppose I could try to install Chrome and test that if I had to, but all the other features (including App Loader connection and transferring apps to my real watch) seem to work fine in Chromium.
Anyone know what I'm missing? I've been up and down Google and every Espruino and tutorial I can find and nothing seems to explain how to actually get the “try in emulator” thing working in any kind of detail.
Beta Was this translation helpful? Give feedback.
All reactions