Skip to Content
0
Feb 01, 2023 at 11:39 AM

"Error happened during log upload."

218 Views Last edit Feb 01, 2023 at 11:44 AM 3 rev

When I try to upload logs to BTP I am getting the following error AppDelegate.swift.uploadLogs() - 393 - Error happened during log upload. (Error: LogUploaderError: Network error. StatusCode: 0, Error: The network connection was lost.), Response: )

I have not made any changes in the code from what the SDK for ios provided. I'm producing correct logging messages, but there is a network error when trying to upload them to BTP. The onboarding session is complete. I have tried to find updated documentation, but cant find anything.

The error happens here:

private func uploadLogs() {
guard let session = sessionManager.onboardingSession else {
// Onboarding not yet performed
return
}
// Upload logs after onboarding
SAPcpmsLogUploader.uploadLogs(session) { error in
if let error = error {
self.logger.error("Error happened during log upload.", error: error)
return
}
self.logger.info("Logs have been uploaded successfully.")
}
}

Any help is much appreciated. Thanks in advance.