Skip to content

macOS workflow artifact: https.request returns code 0 #32

Closed
@Endaris

Description

@Endaris

Note: This is conjecture. I do not own a Mac but I have invested a lot of work over the past couple days and I have very strong indications that the compiled library in the workflow artifacts is faulty.
This is a problem because I'm not aware of any alternative compile instructions besides the workflow.

Repro:
main.lua:

local https = require("https")
assert(https)

function love.load(args)
  local url = "https://api.github.com/repos/love2d/love/releases?per_page=10&page=1"
  local status, body, headers = https.request(url, {method = "GET", headers = { ["user-agent"] = love.filesystem.getIdentity()}})
  result = "https request returned with status " .. status .. " and body length " .. (body and body:len() or "none")
  print(result)
end

function love.draw()
  if result then
    love.graphics.print(result, 0, 0)
  end
end

Use love 11.5 and the respective https library from the latest workflow. On linux and windows it just works being placed next to main.lua, on mac you apparently have to get creative, I have no idea how to make it find the lib.
On Windows/Linux this will yield status 200 with a body length of 263484.
On Mac it immediately returns status code 0 and supposedly no / an empty body.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions