Skip to content
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

coro-http: Error verifying peer: unable to get local issuer certificate #242

Open
Uppernate opened this issue Sep 17, 2018 · 1 comment
Open

Comments

@Uppernate
Copy link

So a site that I HTTP GET information from has updated their SSL certificates because of a "Chrome distrust" issue. Now I get the error that is in the title and an immediate crash for "cannot resume dead coroutine"

Full error log:

command:verify Error:
D:/Discord Bots/ClickBot/deps/coro-http.lua:74: Error verifying peer: unable to get local issuer certificate
Uncaught Error: D:/Discord Bots/ClickBot/deps/secure-socket/biowrap.lua:56: cannot resume dead coroutine
stack traceback:
[C]: in function 'handshakeComplete'
D:/Discord Bots/ClickBot/deps/secure-socket/biowrap.lua:56: in function <D:/Discord Bots/ClickBot/deps/secure-socket/biowrap.lua:49>
[C]: in function 'run'
[string "bundle:init.lua"]:52: in function <[string "bundle:init.lua"]:47>
[C]: in function 'xpcall'
[string "bundle:init.lua"]:47: in function 'fn'
[string "bundle:deps/require.lua"]:310: in function <[string "bundle:deps/require.lua"]:266>

Code snippet, fairly simple GET request:

local http = require("coro-http")
...
function verify(...)
local full = "this is where the url would be made with user's parameters"
local request, data = http.request("GET", full)
end

Site in question is https://community.clickteam.com/forum.php

@Bilal2453
Copy link
Contributor

Bilal2453 commented Feb 12, 2021

This is pretty late sorry for that, but if you are still interested here it is:

As you might have knew, coro-http is suppose to be called inside a coroutine (hence the coro in the name), since it WILL try to yield in specific cases.

Therefor your code should've been looked something like

local http = require("coro-http")

coroutine.wrap(function()
  local request, data = http.request("GET", url)
end)()

or something along these lines. You could read more about coroutines for more information about that.

If you are no longer interested or this solves your issue you could close this 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants