Skip to content
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

Hex files with extensions don't load into offline editor #5047

Open
jaustin opened this issue Apr 14, 2023 · 3 comments
Open

Hex files with extensions don't load into offline editor #5047

jaustin opened this issue Apr 14, 2023 · 3 comments

Comments

@jaustin
Copy link
Collaborator

jaustin commented Apr 14, 2023

Describe the bug

When loading hex files that contain (some) extensions, the offline version of MakeCode fails to load the hex file if you are offline.
It works when you're online, but my goal in testing this was finding a route for distributing extensions for offline use.

Weird things to note/that make testing harder:

  • If you've ever used the offline app with the same extension while online, it appears to work once you're offline

This is important feedback from accessory makers at BETT who want to be able to use the offline version of MakeCode with their extensions/accessories at competitions where internet access is limited.

To Reproduce
Steps to reproduce the behavior:

  1. Download the offline editor: makecode.microbit.org/offline
  2. In the ONLINE editor in the browser: create a program with an extension in it. I used Elecfreaks Ringbit Car in the video but It also fails with ble-pxt-hid.
  3. Save this program as a hex file
  4. Turn off internet access
  5. Open the offline app (testing is easier if this is the first time)
  6. Drop the 'extension' hex into the app
  7. It fails to load
  8. Drop a normal/default hex into the app: it succeeds

Expected behavior
The script should load as normal

Screenshots

offline.loading.mp4

Desktop (please complete the following information):

  • OS: macOS 13.2
  • Makecode 8.0.7 in both browser and in the offline app
@jaustin
Copy link
Collaborator Author

jaustin commented Apr 14, 2023

CC @elecfreaks

@abchatra
Copy link
Contributor

@jaustin Can you share the extension hex file? Is it self-contained? Like not referring to other extension in GitHub?

@jaustin
Copy link
Collaborator Author

jaustin commented Apr 27, 2023

I think one of the examples is not self contained, but the other looks like it is...
For the pxt-hid one, it looks like only bundled deps (and still fails):

    "dependencies": {
        "core": "*",
        "bluetooth": "*"
    },

For the Ringbit one, less soo

    "dependencies": {
        "core": "*",
        "neopixel": "github:elecfreaks/pxt-neopixel"
    },

(There is a neopixel extension in the source viewer once I do load it... Was there once some code to patch/switch the neopixel drivers after an update?)

Here are the two example hexes that failed to load offline first time.
microbit-offline-extensions.hex.zip

microbit-microbit-remote-offlinetest.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants