microsoft / microsoft/pxt-microbit

Makecode Offline App website not loading

Open
#6,606 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

offline P2
Dominant language
TypeScript
Stars
804
Forks
721
Avg merge
2d 9h
Merged PRs (30d)
2

Description

Describe the bug
The website https://makecode.microbit.org/offline-app has an infinite loading loop.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://makecode.microbit.org/offline-app
  2. Wait, the spinner is not replaced by the License Terms

Expected behavior
The License Terms and download links should load

Screenshots
Image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser Chrome - Version 141.0.7390.54

Additional context
The console shows Uncaught SyntaxError: Unexpected end of input (at offline-app:578:5) additionally to the usual error messages Uncaught SyntaxError: Unexpected identifier 'pxt' (at offline-app:877:179) and

Uncaught Error: Minified React error #299; visit https://reactjs.org/docs/error-decoder.html?invariant=299 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at n.createRoot (content.js:2:127887)
    at content.js:2:141096
    at content.js:2:141166
    at content.js:2:141169

Here is line 577 of offline-app.html:

h4.wrap('<div class="download-header"></div>'); } // Add recommendation space if it doesn't exist const header = segment.find(".download-header"); if (!header.find(".recommended-text, .recommended-space").length) { header.append('<div class="recommended-space"></div>'); } }); let recommendedButton = null; if (isMac) { if (isAppleSilicon) { recommendedButton = $("#download-macarm64"); } else { recommendedButton = $("#download-mac64"); } } else if (isWindows) { if (false && isWindowsARM) { recommendedButton = $("#download-winarm64"); } else { recommendedButton = $("#download-win64"); } } // Mark the recommended download if (recommendedButton && recommendedButton.length) { const segment = recommendedButton.closest(".ui.segment"); const space = segment.find(".recommended-space"); if (space.length) { space.replaceWith('<div class="recommended-text">Empfohlen</div>'); } } } function updateDownloadLinks(electronVersion) { $("#download-win64").attr("href", "https://makecode.com/api/release/microbit/" + electronVersion + "/win64"); $("#download-winarm64").attr("href", "https://makecode.com/api/release/microbit/" + electronVersion + "/winarm64"); $("#download-mac64").attr("href", "https://makecode.com/api/release/microbit/" + electronVersion + "/mac64"); $("#download-macarm64").attr("href", "https://makecode.com/api/release/microbit/" + electronVersion + "/macarm64"); } function downloadWin64() { window.pxtTickEvent("offlineapp.download", { "target": "microbit", "platform": "win64" }); } function downloadWinArm64() { window.pxtTickEvent("offlineapp.download", { "target": "microbit", "platform": "winarm64" }); } function downloadMac64() { window.pxtTickEvent("offlineapp.download", { "target": "microbit", "platform": "mac64" }); } function downloadMacArm64() { window.pxtTickEvent("offlineapp.download", { "target": "microbit", "platform": "macarm64" }); } $(function () { try { const urlParams = new URLSearchParams(window.location.search); const versionOverride = urlParams.get("version") || urlParams.get("v"); if (versionOverride && /^v\d+\.\d+\.\d+$/i.test(versionOverride)) { updateDownloadLinks(versionOverride); showAgree(); hideLoader(); return; } } catch (e) { console.warn("Could not parse search string", e); } $.getJSON("https://makecode.com/api/config/microbit/targetconfig") .then(function (data) { hideLoader(); if (data && data.electronManifest && data.electronManifest.latest) { updateDownloadLinks(data.electronManifest.latest); showAgree(); } else { showNoDownloads(); } }) .catch(function () { hideLoader(); showNoDownloads(); }) }); window.addEventListener('load', function () { $("#langpicker").remove(); });

It seems if the linebreaks were removed and hence the code is regarded as a comment

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 at the /offline-app page and inspect offline-app.html around line 577, where the reported syntax error appears after line breaks were removed. Reproduce the infinite spinner in Chrome and check the console errors. Done means the License Terms and download links load instead of the spinner.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.