Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make app work without olm #579

Open
bwindels opened this issue Nov 8, 2021 · 0 comments
Open

Make app work without olm #579

bwindels opened this issue Nov 8, 2021 · 0 comments
Labels
bug Something isn't working maintenance

Comments

@bwindels
Copy link
Contributor

bwindels commented Nov 8, 2021

Currently, the two awaits of the olmPromise don't handle the error that it can throw when the olm file is not found (if we want to distribute a copy of hydrogen without olm, for example for legal reasons). We could probably await the olm promise once at the beginning of starting with login or an existing session and handle the error there, and if olm is not present, don't look for dehydrated devices, ... might need some checks if olm is present deeper down the stack as this scenario has been taken into account but not really tested.

@bwindels bwindels added bug Something isn't working maintenance labels Nov 8, 2021
MadLittleMods added a commit that referenced this issue Feb 24, 2022
…hrowing and stopping all JavaScript

Related to #579

```
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'deriveBits')
	at new Crypto
	at new Platform
	at mountHydrogen
```
MadLittleMods added a commit that referenced this issue Feb 25, 2022
…hrowing and stopping all JavaScript

Relevant error if you crypto is used in a non-secure context like a local LAN IP `http://192.168.1.151:3050/`
```
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'deriveBits')
	at new Crypto
	at new Platform
	at mountHydrogen
```

For my use-case with https://github.com/matrix-org/matrix-public-archive, I don't need crypto/encryption at all.

Docs:

 - https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts
 - https://developer.mozilla.org/en-US/docs/Web/API/Crypto/subtle
    - "Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers."

---

Related to #579
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working maintenance
Projects
None yet
Development

No branches or pull requests

1 participant