darkwire.io icon indicating copy to clipboard operation
darkwire.io copied to clipboard

i am trying to run darkwire.io on my CentOs machine.

Open cmschandan opened this issue 4 years ago • 6 comments

when i trying to run command yarn start then darkwire.io is running on port :3001 but showing disconnected...

after inspecting the page showing below error in console tab crypto.js:33 Uncaught (in promise) TypeError: Cannot read property 'generateKey' of undefined

can you please share solution on this

cmschandan avatar Feb 13 '21 10:02 cmschandan

what browser are you using?

seripap avatar Feb 14 '21 03:02 seripap

@seripap hi i am using both google chrome and mozilla firefox...

cmschandan avatar Feb 27 '21 04:02 cmschandan

@seripap but i found above issue in google chrome..

cmschandan avatar Feb 27 '21 04:02 cmschandan

I have had the same issue on Edge & Chrome on windows 10. Running the server using docker-compose up on arch linux.

NtLoadDriverEx avatar Oct 18 '21 23:10 NtLoadDriverEx

The error is in crypto.js on line 33 https://github.com/darkwire/darkwire.io/blob/dd4a6cb221e8f8f720e8cc099bd6427ee73eee3c/client/src/utils/crypto.js#L33 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'generateKey') I'm a c++ guy myself not a js developer. If I can get you any more info let me know :)

NtLoadDriverEx avatar Oct 19 '21 00:10 NtLoadDriverEx

Okay seems like i found the issue. running in an http not https context causes this error as window.crypto.subtle === undefined in that context :/ unfortunate.

Related Stackoverflow post: https://stackoverflow.com/questions/46468104/how-to-use-subtlecrypto-in-chrome-window-crypto-subtle-is-undefined https://www.chromium.org/blink/webcrypto crypto.subtle is supposed to be undefined in insecure contexts

NtLoadDriverEx avatar Oct 19 '21 00:10 NtLoadDriverEx