element-hq / element-hq/element-web
Failure to load/"Unable to restore session" error on Safari 15
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
Not being an Apple user myself, I can't reproduce this, but we have had some reports from users on Safari 15 of "Unable to restore session" errors.
Safari 15 is not one of our [supported browsers](https://github.com/element-hq/element-web?tab=readme-ov-file#supported-environments) but we should fail more gracefully.
It appears that, before [Element R](https://github.com/vector-im/element-web/issues/21972), you would get an application which mostly worked, but still didn't support encryption (rageshakes showed: `Failed to load Olm`). This is now worse, because failure to instantiate the crypto stack means that the application doesn't load at all (see also https://github.com/element-hq/element-web/issues/27424).
[Context: the cause of the failure is our use of a `script-src: "wasm-unsafe-eval"` content security policy, which is [unsupported on Safari 15](https://caniuse.com/?search=wasm-unsafe-eval) This is is required for any WASM to be loaded (see [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src#unsafe_webassembly_execution). In theory you can also use `script-src: "unsafe-eval"`, but this is dangerous).]
Contributor guide
Assessment
This issue has not been assessed yet.