Skip to content
Snippets Groups Projects
Unverified Commit 537c0bf4 authored by Jed Fox's avatar Jed Fox Committed by GitHub
Browse files

Add a warning when SharedArrayBuffer is not available (#600)

* Update index.js

* Switch to hard error when SharedArrayBuffer is unavailable

* Remove “Server misconfiguration alert!”
parent b7763937
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,14 @@ self.addEventListener('message', e => {
let version = msg.version;
let hash = msg.hash;
if (!self.SharedArrayBuffer) {
self.postMessage({
type: 'app-init-failure',
SharedArrayBufferMissing: true
});
return;
}
// eslint-disable-next-line
importScripts(`${process.env.PUBLIC_URL}/kcab/kcab.worker.${hash}.js`);
......
......@@ -27,6 +27,20 @@ class FatalError extends React.Component {
private browsing.
</Text>
);
} else if (error.SharedArrayBufferMissing) {
// SharedArrayBuffer isn't available
msg = (
<Text>
Actual requires access to <code>SharedArrayBuffer</code> in order to
function properly. If youre seeing this error, either your browser
does not support <code>SharedArrayBuffer</code>, or your server is not
sending the appropriate headers, or you are not using HTTPS. See{' '}
<a href="https://actualbudget.github.io/docs/Troubleshooting/SharedArrayBuffer">
our troubleshooting documentation
</a>{' '}
for more information.
</Text>
);
} else {
// This indicates the backend failed to initialize. Show the
// user something at least so they aren't looking at a blank
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment