-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Failed to upload image! crypto.subtle is undefined #6049
Comments
I got the same Problem. I asked it in the Q&A Section because i was not sure if it's a bug. |
It's because you are not serving self-host AFFiNE Cloud under HTTPS (Secure Context). |
Will this become possible? As we run our entire intranet of services with only IPs and HTTP using VPNs. Pretty much no service have an issue with the lack of HTTPS. Seems like it should be possible to disable the crypto related operations and make it work on http. Wouldn't this also be an issue in development, which usually runs on localhost HTTP? |
No, it won't. |
Sad to hear that it won't be possible. Running over HTTP is pretty common among self-hosters and will alienate many potential users. |
We are considering shipping the self-host version with self-signed CA support in the future. For other self-host applications, most logics are served by the server, the web page is only served as an input interface. |
I think we only used sha256, which is not difficult to implement with js, if the browser does not provide encryption API, we can use pure js to implement it. |
I tried to enable https:AFFINE_SERVER_HTTPS=true but got the following error when accessing it with https.: How can I set it to https? |
The The https traffic needs to be provided by reverse proxy server such as If you have a domain, you can refer to this document from caddy to configure out-of-the-box https support: https://caddyserver.com/docs/automatic-https Another way to enable https is to use tailscale, which can help you connect to your server privately under any network. For how to enable https, please refer here: https://tailscale.com/kb/1153/enabling-https |
Ok the hint with https (secure context) was the solution in my case. |
I tried to use pure js to implement sha256, which should allow affine to run normally in the http. |
Thank you for effort |
What happened?
When I upload an image, it cannot be displayed and the following prompt pops up, which disappears shortly.The prompt is as follows:
Failed to upload image! crypto.subtle is undefined
Distribution version
Linux
What browsers are you seeing the problem on if you're using web version?
Firefox
Are you self-hosting?
Relevant log output
Anything else?
No response
The text was updated successfully, but these errors were encountered: