microsoft / microsoft/pxt

"Upload" doesn't work with `make staticpkg`

Open
#5,359 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

staticpkg
Dominant language
TypeScript
Stars
2.3k
Forks
641
Avg merge
12h 4m
Merged PRs (30d)
57

Description

Bug Template

Describe the bug
One method to distribute MakeCode is to build it into a package with make staticpkg. This renders everything to static html and javascript. However, the "Upload" button doesn't work, and reports "Compilation failed, please check your code for errors." even when using the default program.

To Reproduce
Steps to reproduce the behavior:

  1. Clone pxt-chibitronics -- for our purposes I'm using one with custom C++ code at https://github.com/xobs/pxt-chibitronics/tree/rainbow-tape
  2. Run make staticpkg
  3. Serve the result with cd built\packaged; python -m http.server
  4. Go to localhost:8000 and attempt to upload a program

Expected behavior
The program should build and upload.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Firefox
  • Version 3.3.4

Additional context
The output from staticpkg attempts to make calls to many pages that don't exist. For example, it does a POST to http://localhost:8000/compile/extension, which results in a 501 error. It also attempts to access http://localhost:8000/clientconfig which doesn't exist.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running make staticpkg, serving built/packaged with python -m http.server, and reproducing the Upload failure. Trace the generated requests to /compile/extension and /clientconfig; done means the default program builds and uploads from the static package without requests to missing pages.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.