Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Frontend loads mqtt.js from the unpkg CDN (unversioned, no SRI); the UI fails to initialise on disconnected or air-gapped sites

Open Beginner friendly
#59 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript
Domain
frontend

Research direction

Start with src/frontend/public/index.html and src/frontend/package.json, then inspect the frontend Docker build to see how its assets are served. Bundle the existing MQTT browser client locally and update the script reference; verify the app no longer requests mqtt.js from unpkg and that its UI initializes. The optional missing-client guard and CI check are separate additions.

Written by the indexing model from the issue text.

Description

Summary

src/frontend/public/index.html loads the MQTT browser client from a public CDN at runtime:

<script src="https://unpkg.com/mqtt/dist/mqtt.min.js"></script>

This conflicts with the goal of running the same app in disconnected and sovereign environments:

  • Disconnected or egress-restricted sites: if the browser can't reach unpkg, mqtt is undefined. The inline initialisation then throws at mqtt.connect(...) before the order and chat handlers, data loading and timers are set up, so most of the UI is non-functional. Orders are published from the browser to orders/new over MQTT, so placing orders depends on this script too.
  • Supply chain and reproducibility: with no version pinned and no Subresource Integrity, every page load gets whatever the latest mqtt release is.

Suggested fix

mqtt is already a dependency of the frontend (src/frontend/package.json, ^5.15.0). Serve its browser bundle from the frontend container instead of the CDN. For example, copy node_modules/mqtt/dist/mqtt.min.js to public/vendor/mqtt.min.js during the Docker build, and reference /vendor/mqtt.min.js from index.html.

Optionally, guard initialisation so that a missing MQTT client degrades to "live updates unavailable" instead of stopping the page, and add a CI check for absolute https:// script/style URLs in public/.

Dominant language
Rust
Stars
5
Forks
3
Avg merge
2d 7h
Merged PRs (30d)
9

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from microsoft/adaptive-apps

All issues in microsoft/adaptive-apps

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.