Assert Error when running Networking example from Examples/ on Playdate Sim, MacOS

Running on MacOS 15.5, Playdate SDK version 3.1.0 (latest), using VSCode and Playdate Debug by midouest.

Not entirely sure if this is a bug or just user error, so please help me clarify that :slight_smile:

When running the Examples/Networking, with an external address (not localhost), the http request (GET, POST, etc.) returns an error: "No Device". Without further clarification, I'm not sure what to do to fix this.

I get the issue exclusively on simulator; on-device I'm able to perform a request correctly without issues.

This is the part of the code that causes this issue:

            http_conn = net.http.new("supabase.co", nil, true)
            assert(http_conn, "The user needs to allows this")

            http_conn:setHeadersReadCallback(function()
                print("Received HTTP response with code: " .. http_conn:getResponseStatus())
            end)
            http_conn:setConnectionClosedCallback(connectionClosed)
            http_conn:setRequestCompleteCallback(requestComplete)
            http_conn:setRequestCallback(requestCallback)

            http_conn:setConnectTimeout(2)
            http_conn:setKeepAlive(true)

            -- Send a GET request
            local get_request, get_error = http_conn:get("/")
            assert(get_request, get_error)
            -- Throws on error: main.lua:133: No device

Update... I've gone back to testing things on my game, and I now find that the device returns the No Device error, while the simulator creates the request correctly. :smiling_face_with_tear:

I would appreciate some clarification on what this error means! I always ensure an access point is connected with status "1" before executing the https calls.