I have an app that stopped working properly on watchOS 9, although it works perfectly fine on simulators.
It uses WebSocket
on an HTTPS server hosted on DigitalOcean behind an nginx proxy.
The error I receive is "The Internet connection appears to be offline" but that does not make sense as other applications are able to use the internet properly on the device.
Here are logs from Xcode running on device:
2022-09-17 16:22:40.409850-0400 Watch Mirror Watch App[354:11674] Connection 1: received failure notification
2022-09-17 16:22:40.413273-0400 Watch Mirror Watch App[354:11674] Connection 1: failed to connect 1:50, reason -1
2022-09-17 16:22:40.413318-0400 Watch Mirror Watch App[354:11674] Connection 1: encountered error(1:50)
2022-09-17 16:22:40.436009-0400 Watch Mirror Watch App[354:11677] Error getting network data status Error Domain=NSPOSIXErrorDomain Code=19 "Operation not supported by device"
2022-09-17 16:22:40.436497-0400 Watch Mirror Watch App[354:11677] Task <03D663EF-3CD1-4906-9343-C6B9DD112B11>.<1> HTTP load failed, 0/0 bytes (error code: -1009 [1:50])
2022-09-17 16:22:40.449161-0400 Watch Mirror Watch App[354:11678] [] Error while receiving The Internet connection appears to be offline.
2022-09-17 16:22:40.449134-0400 Watch Mirror Watch App[354:11677] Task <03D663EF-3CD1-4906-9343-C6B9DD112B11>.<1> finished with error [-1009] Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={NSErrorFailingURLStringKey=[redacted], NSErrorFailingURLKey=[redacted] NSLocalizedDescription=The Internet connection appears to be offline., _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalWebSocketTask <03D663EF-3CD1-4906-9343-C6B9DD112B11>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalWebSocketTask <03D663EF-3CD1-4906-9343-C6B9DD112B11>.<1>}