There is a network error introduced since build 3535 (tested up to the latest 3545) in a desktop Mac app.
Same code works in 3531 and in the simulator (including 3545).
Network error: A server with the specified hostname could not be found.
Code used include:
network.request(URL, "GET", netListener)
and
local luasecHTTPS = require "plugin\_luasec\_https" luasecHTTPS.request(URL)
In the 3535 release notes: “macOS/Simulator: adding hack to ignore certificate type”
Could this be certificate related?
vlads
October 31, 2019, 6:47pm
2
Can you please give full code which is not working? And is 3545 specifically broke it, or between 35 and 45?
vlads
October 31, 2019, 6:58pm
3
Only thing I can think about is that we switched to building Corona with Xcode 11 in latest build, was 8.2 before that. I don’t think it’s actual code change.
This error started from 3535 to the latest 3545.
Please download this test project: https://www.dropbox.com/s/vdoayg7ij9illr0/NetTest.7z?dl=1
It’s just the standard sample network.request() code. Build a Mac app to test.
vlads
November 1, 2019, 1:21pm
5
Thanks. I noticed that it only happens when application is signed. If you select ‘None’ in provisioning profile, everything seems to work fine
vlads
November 1, 2019, 4:26pm
7
Yes. I found that this is new macOS Sandbox restriction for signed apps. Now you should tell that you’re connecting to 3rd party apps. This is done with entitlement. Add this to your build.settings
macOS = { entitlements = { ["com.apple.security.network.client"] = true, }, },
Works great now! Thanks for the fix!