Files
m8chat-app2/web/index.html
help4bis fd7b64a89b fix: disable Olm on web — /keys/upload 400 crashed client init
The web session generates new Olm keys for an existing device ID.
Synapse rejects the upload (400 — keys mismatch) which crashes the
entire client init. Result: no sync, no room history, no calls.

Proper E2EE requires persistent Olm account storage (IndexedDB) so
the same device ID always sends the same keys. Deferred to Phase 3.

Without Olm loaded, the Matrix SDK gracefully skips encryption init.
Unencrypted rooms work fully. E2EE rooms show 'Encrypted message'.

Also unregisters stale service workers that served cached old JS
(caused calls to use the old GET URL instead of POST /sfu/get).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 15:56:46 +10:00

61 lines
2.2 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<!--
If you are serving your web app in a path other than the root, change the
href value below to reflect the base path you are serving from.
The path provided below has to start and end with a slash "/" in order for
it to work correctly.
For more details:
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
This is a placeholder for base href that will be replaced by the value of
the `--base-href` argument provided to `flutter build`.
-->
<base href="$FLUTTER_BASE_HREF">
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="A new Flutter project.">
<!-- iOS meta tags & icons -->
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="m8chat_app">
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<!-- Favicon -->
<link rel="icon" type="image/png" href="favicon.png"/>
<title>M8Chat</title>
<link rel="manifest" href="manifest.json">
</head>
<body>
<!--
Olm WASM must fully initialise before Flutter boots — the Matrix SDK calls
Olm.init() synchronously at startup and crashes if the global isn't ready.
Strategy: load olm.js synchronously, await Olm.init(), THEN inject
flutter_bootstrap.js dynamically so Flutter never starts before Olm.
-->
<script>
// Unregister any stale service worker from previous builds — cached old JS
// causes calls and features to use outdated code silently.
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations().then(function(registrations) {
for (var r of registrations) { r.unregister(); }
});
}
</script>
<!--
Olm (E2EE) disabled for Phase 1 web builds. The Matrix SDK gracefully
skips encryption when Olm is not loaded — unencrypted rooms work fine.
E2EE requires persistent Olm account storage (IndexedDB) to avoid
device key conflicts on /keys/upload (400). Deferred to Phase 3.
The olm.js and olm.wasm files remain deployed for future use.
-->
<script src="flutter_bootstrap.js" async></script>
</body>
</html>