Open srijanraj opened 6 years ago
@srijanraj What's the port number you are binding to? As far as I know, if you are binding to port numbers which are below 1024 or a certain number, say you're binding port 80, it will usually require root permission to do so. I guess that's why you are seeing Operation Not Permitted
error. If it's the case, I would suggest to use port numbers like 8080 or any number you like that's higher than 1024
@fangpenlin
I set port 8880 and I got the same issue, when I create severer from main app target it's okay, but when I try start server from uitests target for macOS app (for iOS it works) then I got same issue:
Embassy.OSError.ioError(number: 1, message: "Operation not permitted")
Additionally my entitlements are set:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
</dict>
</plist>
var address = sockaddr_in6()
if !os(Linux)
This part of the code is throwing the error. Error number 1 and error description "Operation Not Permitted". I am new to swift and trying to implement mock server on the ongoing project. Can someone have answer for this?