diff --git a/2026/2026-08-17--bonfire-chromium-login.md b/2026/2026-08-17--bonfire-chromium-login.md new file mode 100644 index 0000000..1ed468c --- /dev/null +++ b/2026/2026-08-17--bonfire-chromium-login.md @@ -0,0 +1,28 @@ +# Bonfire — Chromium login stays on homepage (2026-08-17) + +Site: **https://bonfire.hacktivism.ch/** +Canonical: `configs/bonfire/README.md` (section *Login in Chromium*). + +## Symptom + +- **Firefox:** Log in and `/login` work. +- **curl** `https://bonfire.hacktivism.ch/login`: 200, title *Log in*. +- **Chromium** (operator profile, tab on `/`): **Log in** click does nothing; typing `/login` in the address bar still shows *Explore local activities*. Incognito/Firefox not affected. + +Not the `isoc` account (email + username profile exist; login API ok). + +## Checks + +| Check | Result | +|-------|--------| +| Guest `/` HTML | `data-live-socket="false"`; **Log in** is `` | +| `#modal` | `opacity-0 modal-closed`; `modal_invisible` loading stub has **no CSS rule** (Chromium can show a black overlay) | +| Bonfire JS | `navigator.serviceWorker.register("/pwabuilder-sw.js", {scope: "/"})` | +| `/pwabuilder-sw.js` (before kill-switch) | 404; hashed `pwabuilder-sw-*.js` exists under `priv/static/` | +| UI | badge **Federation disabled** while container `FEDERATE=true` | + +## Workaround + +Unregister the worker for `bonfire.hacktivism.ch` in that Chromium profile (`chrome://serviceworker-internals` or DevTools Application), clear site data, hard reload. Then `/login` matches Firefox. + +Host copies (optional, recreate-volatile in the image): `~/koopa-bonfire/data/branding/{pwabuilder-sw.js,hacktivism-login-fix.css,unregister-sw.js}`. diff --git a/configs/bonfire/README.md b/configs/bonfire/README.md index 8ce50a4..fa886a0 100644 --- a/configs/bonfire/README.md +++ b/configs/bonfire/README.md @@ -25,4 +25,26 @@ scripts/bonfire/install-systemd.sh Units: `container-koopa-bonfire-db`, `container-koopa-bonfire`, `gitbot-mirror`. Needs `loginctl enable-linger hernani`. Run `podman-compose up -d` once before first boot. -Public feeds: `public-feeds.md`. \ No newline at end of file +Public feeds: `public-feeds.md`. + +## Login in Chromium (PWA service worker) + +Firefox and `curl` reach https://bonfire.hacktivism.ch/login (200, real form). +**Chromium** (same URL or the yellow **Log in** buttons) can stay on the guest homepage. Not an account/password bug. + +Cause (two layers): + +1. **Service worker** — Bonfire JS registers `/pwabuilder-sw.js` with `scope: "/"`. An old worker in the Chromium profile intercepts navigations (including `/login`) and serves the cached start page. Firefox typically has no worker → login works there. +2. **Guest homepage** — static cache / `data-live-socket="false"` plus LiveView `data-phx-link="redirect"` on **Log in**. Without a live socket the click is swallowed. Guest HTML can also leave an empty `modal_invisible` overlay (black panel in Chromium). + +Workaround (this Chromium profile): + +- `chrome://serviceworker-internals` → **bonfire.hacktivism.ch** → Unregister + or DevTools → Application → Service Workers → Unregister + Clear site data +- hard reload, then open `/login` +- or **Incognito** (no SW) + +Server-side notes (host `~/koopa-bonfire/data/branding/`, not a substitute for unregister): kill-switch `pwabuilder-sw.js`, overlay CSS, login-click JS. Container copies are overwritten on image recreate. + +Daylog: `2026/2026-08-17--bonfire-chromium-login.md`. +UI badge **Federation disabled** can still show while `.env` has `FEDERATE=true` (see `2026/2026-07-10--bonfire-federate.md`). \ No newline at end of file