Skip to content

Certificate problem #276

@lynn2910

Description

@lynn2910

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:23Z DEBUG 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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions