-
Notifications
You must be signed in to change notification settings - Fork 699
Open
Description
Describe the bug
The website https://makecode.microbit.org/offline-app has an infinite loading loop.
To Reproduce
Steps to reproduce the behavior:
- Go to https://makecode.microbit.org/offline-app
- Wait, the spinner is not replaced by the License Terms
Expected behavior
The License Terms and download links should load
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