upload issue: HALPlugIn::DeviceGetCurrentTime: got an error from the plug-in routine, Error: 1937010544 (stop)
im trying to upload an image, after that directly, i upload a video, first time mostly it works, but second time it doesnt, i get the following errors:
145167 HALC_ProxyIOContext.cpp:1328 HALC_ProxyIOContext::IOWorkLoop: skipping cycle due to overload
nw_connection_add_timestamp_locked_on_nw_queue [C25] Hit maximum timestamp count, will start dropping events
nw_read_request_report [C25] Receive failed with error "Operation timed out"
this is my tus code:
final class ThreeSpeakVideoUploadManager {
var tusClient: TUSClient?
...
init() {
setupTUSClient()
}
private func setupTUSClient() {
let endpoint = URL(string: "https:cxz/abc")!
let sessionIdentifier = "XXXXX"
do {
tusClient = try TUSClient(server: endpoint, sessionIdentifier: sessionIdentifier, sessionConfiguration: .background(withIdentifier: sessionIdentifier), chunkSize: 100*1024 )
tusClient?.delegate = self
tusClient?.start()
} catch {
print("Failed to initialize TUSClient: \(error.localizedDescription)")
}
}
and this is my upload function:
func uploadVideoOrImage(videoURL: URL, uploadType: UploadType) {
let url = videoURL
self.uploadType = uploadType
// tusClient?.stopAndCancelAll()
if uploadType == .image {
hasSentImageURL = false
} else {
hasSentVideoURL = false
}
guard let tusClient = tusClient else {
print("TUSClient is not initialized")
return
}
do {
try tusClient.uploadFileAt(filePath: videoURL)
} catch let error {
print("Upload failed to start: \(error.localizedDescription)")
}
}
Hi @AliJ91 could you possibly use a proxy tool like Charles or Proxyman to record a trace of the network calls that are being made so we can investigate those?
Based on the provided code alone I don't see anything that would stand out as a cause for trouble.
Also, could you tell me a bit more about what this line in the log is?
HALC_ProxyIOContext.cpp:1328 HALC_ProxyIOContext::IOWorkLoop: skipping cycle due to overload
Or rather, could you explain what HALC_ProxyIOContext is since that's not something that's coming from with TUSKit
Well thats the 1 million dollar question, the log is related to audio/media upload issues on iOS, i dont know whats causing it. first time all goes well, when i try to upload the second time, i get this error above. ill try to record a trance of the network calls and get back to you
Hi @AliJ91 have you managed to get some logs / have you been able to resolve this?
@donnywals hello, sorry for the late reply, yes i fixed it by doing this: sessionConfiguration: .default. hopefully no side effects appear. app is in production now, we will find out soon... thanks for following up