Unhandled Rejection - Cannot read property 'generateKey'
See original GitHub issueHi,
When i start a live collaboration i receive the Error web page : Can you help me and explain me how i can generate the key on my server ?
Regards,
Unhandled Rejection (TypeError): Cannot read property ‘generateKey’ of undefined
generateEncryptionKey src/excalidraw/src/data/index.ts:86 83 | } 84 | 85 | async function generateEncryptionKey() {
86 | const key = await window.crypto.subtle.generateKey( 87 | { 88 | name: “AES-GCM”, 89 | length: 128, View compiled
generateCollaborationLink src/excalidraw/src/data/index.ts:112 109 | 110 | export async function generateCollaborationLink() { 111 | const id = await generateRandomID();
112 | const key = await generateEncryptionKey(); 113 | return
${window.location.origin}${window.location.pathname}#room=${id},${key}
; 114 | } 115 | View compiled async App.openPortal src/excalidraw/src/components/App.tsx:759 756 | }; 757 | 758 | openPortal = async () => { 759 | window.history.pushState( | ^ 760 | {}, 761 | “Excalidraw”, 762 | await generateCollaborationLink(), View compiled This screen is visible only in development. It will not appear if the app crashes in production.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
@MartinP7r sorry, I must have missed your reply.
Yes, you should update your
.env
or wherever you supply ENV variables.The JSON server repo is here: https://github.com/excalidraw/excalidraw-json
Also note that we’ll be soon releasing a new npm package under
@excalidraw/excalidraw
where it’ll be easy to implement your own backend(s). We should eventually get around to writing up how to do that, but before then you can to read the source of code of this repo since we’ve already factored out the backend logic from the core, and are using the same API to implement the backends for excalidraw.comCheers.
@dwelle thanks a lot for letting me know!