You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.
In the iOS app, I use @capacitor-community/http to connect to an IoT device (in my case it's GoPro9). When I first connect to GoPro's WiFi Access Point and try to do get a request it was failing silently then I found out the problem was Local Network was disabled for my app (Settings -> MyApp -> Local Network).
When I do http request to GoPro and disable Local Network for my app, the native call ends up here
lettask= urlSession.dataTask(with: urlRequest){(data, response, error)in
urlSession.invalidateAndCancel()
if error !=nil{<--- My call ends up here
return<--- But because of this return I can't catch on ionic side
}lettype=ResponseType(rawValue: responseType)??.default
call.resolve(self.buildResponse(data, response as!HTTPURLResponse, responseType: type))}
the error value is this
2022-02-28 16:10:54.342760+0800 App[1496:224988] Task <A4C6F12F-13CF-458C-9A21-D69F8DF46E36>.<2> finished with error [-1020] Error Domain=NSURLErrorDomain Code=-1020 "A data connection is not currently allowed." UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x2819fe6a0 {Error Domain=kCFErrorDomainCFNetwork Code=-1020 "(null)" UserInfo={_NSURLErrorNWPathKey=unsatisfied (Local network prohibited), interface: en0, ipv4, _kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <A4C6F12F-13CF-458C-9A21-D69F8DF46E36>.<2>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <A4C6F12F-13CF-458C-9A21-D69F8DF46E36>.<2>"
), NSLocalizedDescription=A data connection is not currently allowed., NSErrorFailingURLStringKey=http://10.5.5.9:8080/gopro/media/list, NSErrorFailingURLKey=http://10.5.5.9:8080/gopro/media/list, _kCFStreamErrorDomainKey=1}
2022-02-28 16:10:54.342898+0800 App[1496:224988] [NSURLSession sharedSession] may not be invalidated
ERROR MESSAGE: {"message":"Error","code":"REQUEST","errorMessage":"Error"}
The text was updated successfully, but these errors were encountered:
In the iOS app, I use @capacitor-community/http to connect to an IoT device (in my case it's GoPro9). When I first connect to GoPro's WiFi Access Point and try to do get a request it was failing silently then I found out the problem was Local Network was disabled for my app (Settings -> MyApp -> Local Network).
When I do http request to GoPro and disable Local Network for my app, the native call ends up here
the error value is this
The text was updated successfully, but these errors were encountered: