At present, the error affects about one in seven customers in Australia. The host is based in Europe.
Thus far, have been unable to reproduce. Have tried the Network Link Conditioner, Charles Proxy throttling and breakpoints, disabling wifi, disconnecting ethernet, and combinations thereof. All whilst connected to ExpressVPN Sydney using Xcode and simulator.
This induced:
-1004 "Could not connect to the server."
-1009 "The Internet connection appears to be offline."
but as yet no -1005.
How does “could not connect” and “internet connection appears to be offline” differ from "network connection was lost”? After all, we are pulling the plug - literally - while the url is awaiting response.
Please, any clues about how to induce a -1005, or the specific conditions in the private CFNetwork code that trigger a -1005, would be much appreciated.
We have one of the team based in Sydney and can ask for his help if need be.
Post
Replies
Boosts
Views
Activity
Apple replied to FB9080056 suggesting reproduce on Xcode 13. Can confirm on beta 4 (13A5201i) as noted by @Claude31 that the defect appears to have been resolved.
Strange. Same validation error but no errors in the log.
Think the unknown host was a red herring. The unexplained validation error persists.
Updated Log - https://developer.apple.com/forums/content/attachment/e6329133-9210-4fef-bef5-f00232d87520
Now believe this is unrelated to JSONDecoder. It is the struct initialisation with nine properties that causes the execution abort.
Problem occurs with Xcode 12.4 (12D4e). Eight properties good, nine properties bad:
import Foundation
public struct Foo: Codable {
public let a01: String
public let a02: String
public let a03: String
public let a04: String
public let a05: String
public let a06: String
public let a07: String
public let a08: String
public let a09: String
}
let foo = Foo(a01: "foo",
a02: "foo",
a03: "foo",
a04: "foo",
a05: "foo",
a06: "foo",
a07: "foo",
a08: "foo",
a09: "foo")
do {
let encoder = JSONEncoder()
let data = try encoder.encode(foo)
if let jsonString = String(data: data, encoding: .utf8) {
print(jsonString)
}
} catch {
print(error)
}
Exception as follows:
CoderBug.xcplaygroundpage: error: Playground execution aborted: error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=EXC_I386_GPFLT).
The process has been left at the point where it was interrupted, use "thread return -x" to return to the state before expression evaluation.
Follow up on the above that I tried option 2. This worked in the sense that the subscription was received every minute according to the timer. This can be see in the Date output below.
However, this did not cause the dataTaskPublisher to re-run. So the bytes shown are from the original request that ran once only.
(2020-12-29 15:05:30 +0000, 61631 bytes) combined
(2020-12-29 15:05:33 +0000, 61631 bytes) combined
(2020-12-29 15:05:36 +0000, 61631 bytes) combined
(2020-12-29 15:05:39 +0000, 61631 bytes) combined
(2020-12-29 15:05:42 +0000, 61631 bytes) combined
Hello Quinn,
I hope you are well.
I have the same problem. In my case the code responds to the authentication challenge. Valid username and password credentials are provided. However Console out shows:
CredStore - performQuery - Error copying matching creds. Error=-25300, query={
class = inet;
"m_Limit" = "m_LimitAll";
ptcl = htps;
"r_Attributes" = 1;
sdmn = "https%3A%2F%2Fmydomain.com";
srvr = “mydomain.com";
sync = syna;
}
It’s worth noting that this is a simple command line Swift utility to retrieve some JSON over https using basic authentication.
I note your answer on https://developer.apple.com/forums/thread/109402
However I’m confused why responding to the authentication challenge is causing some uncalled for Keychain lookup.
Any thoughts on how to resolve this? Apple docs on CredStore and it’s function would also be of interest.
Thanks and Best Wishes