pxt-arcade: Unable to host MakeCode Arcade tutorial in GitHub with assets.json file

Describe the bug I am trying to create some new tutorials for Code Ninjas and am following the steps and guidance I have followed before when bringing additional assets into a tutorial using the assets.json file in the tutorial, however I cannot seem to get it to work this time! Previously I had this same issue but it was because my assets.json file was corrupted. I have recreated the file 3 separate times and it works in the MakeCode tutorial editor, but not in GitHub. When I remove the assetsjson ... from the tutorial, it works, but as soon as I put it back, it stops loading!

I’m wondering if there’s something I’m missing in a different file? Or if there’s a limit to how large this file can be? Also, I am doing these tutorials in Python, not blocks (the previous ones I did were in blocks).

To Reproduce Steps to reproduce the behavior:

  1. Go to my repo: https://github.com/Code-Ninjas-Home-Office/arctic-code-quest to check out the code in day1.md (with assets) and day2.md and day3.md (without)
  2. Try loading https://arcade.makecode.com/#tutorial:https://github.com/Code-Ninjas-Home-Office/arctic-code-quest/day1 to see the error
  3. Try loading https://arcade.makecode.com/#tutorial:https://github.com/Code-Ninjas-Home-Office/arctic-code-quest/day2 to see that it works!

Expected behavior I’d like the tutorials to load correctly, with the additional assets I’m adding to them 😃

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser Chrome
  • Version 119

Thanks!! @kiki-lee @riknoll @abchatra @jwunderl

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 24 (10 by maintainers)

Most upvoted comments

I don’t think so, especially since the tutorials are always markdown…but I’m not sure. Maybe the .js file broke it in some other way? Like maybe it was too large? What errors were you getting in the console when you tried to open it?

I may need to tag @riknoll in for this one 😃

Okay, I think I’ve figured out what’s happening. When I make a repo with both day1 and day1-a, then even day1-a won’t open because day1 is too big (and since it’s listed in the pxt.json, it has to get loaded, even if you’re not using it. )

When I create a repo with only the day1-a file, it loads: https://arcade.makecode.com/#tutorial:https://github.com/kiki-lee/ski-2/day

When I go into the repo with the day1 and day1-a files and remove day1.md from the pxt.json, it loads.

So, theoretically, you should be able to use whatever method you like of getting your files down below 128k (use image packs or delete assets), then remove the files that are too large from your pxt.json.

Let me know how that works!

It may not be because it’s too big, after all. I do know that extensions can’t be bigger than 128k, but when I upload day1 to our test site (which is hosted on Github) it still works: https://arcade.makecode.com/#tutorial:/test/tutorials/day1

I also tried doing an extension version https://arcade.makecode.com/#tutorial:/test/tutorials/day1-a

Would you try uploading this to your repo and see if it works? https://raw.githubusercontent.com/microsoft/pxt-arcade/master/docs/test/tutorials/day1-a.md

Alright, my next guess is that the file is too big. There’s a 128K limit, so it might not be getting served. Let me see if image packs take care of the issue.

Yep, all me! Actually, it was probably a caching issue. You probably fixed it after the first change, but the web kept pulling the old version in your browser.

Sometimes it helps to either use an incognito window (or sometimes I need to use a whole different web program altogether.)

Happy coding!

Very odd…it seems to be working for me. Can you take a look at this and let me know if anything is behaving in a way that you don’t expect?

https://arcade.makecode.com/#tutorial:67370-48606-36411-02295

Hi, Bill! I’m trying to take a look, but it looks like both are working right now and there’s not an assetjson in either. Can you point me to a file for one of the tutorials that’s giving you a problem?

Here’s what I was trying to review: https://raw.githubusercontent.com/Code-Ninjas-Home-Office/arctic-code-quest/master/day1.md