You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, i'm trying to setup a websocket using mlua and tungstenite for a lua package, but i get this error when connecting:
[2023-05-21T15:15:23ZDEBUG tungstenite::client]Trying to contact wss://gateway.discord.gg/?v=10&encoding=json at 162.159.136.234:443...
thread '<unnamed>' panicked at 'Can't connect:Tls(Native(Ssl(Error{code:ErrorCode(1),cause:Some(Ssl(ErrorStack([])))},X509VerifyResult{code:20,error:"unable to get local issuer certificate"})))', src/workers/ws.rs:75:47
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[string "bundle:/init.lua"]:70: attempt to concatenate local 'err'(a userdata value)
stack traceback:[string "bundle:/init.lua"]:70:in function 'fn'[string "bundle:deps/require.lua"]:310:in function <[string "bundle:deps/require.lua"]:266>
But, the weird thing is that, when i run the code on my computer, without executing in lua, it works perfectly.
Does someone know how to get rid of this certificate problem ?
Activity
khvzak commentedon May 21, 2023
Do you have code to reproduce?
lynn2910 commentedon May 21, 2023
I uploaded the code to a repositery:
https://github.com/Sedorikku1949/discolua
As this will be a package to manage a discord bot, a token is required to be put in the test directory (explained in test/README.md)
khvzak commentedon May 21, 2023
this is what I got when running it:
seems all works?