15

I don't know if anyone else is getting these messages, but I get these messages in the logs when the app goes into the background, then comes back:

[] nw_read_request_report [C3] Receive failed with error "Software caused connection abort"

Followed by:

Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service

This is coming after many other bad logs, like:

My project has Firebase, which could be a source of all the web-related logs.

What could be causing it? Is it a bug?


Update

I removed errors from bullet no.1, written in my answer here.

Community
  • 1
  • 1
George
  • 25,988
  • 10
  • 79
  • 133

4 Answers4

3

I have the same issue with Facebook SDK login. Resolve it adding the following code in SceneDelegate.swift

import FBSDKCoreKit

func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
  if let openURLContext = URLContexts.first {
    ApplicationDelegate.shared.application(UIApplication.shared, open: 
    openURLContext.url, sourceApplication: 
    openURLContext.options.sourceApplication, annotation: 
    openURLContext.options.annotation)
  }    
}
2

This is somewhat related, and hope it helps someone. My situation was that the openURL extra function provided in the SceneDelegate was not being called after returning from Facebook Authentication.

The solution was using

.onOpenURL { (url) in
                ApplicationDelegate.shared.application(
                    UIApplication.shared,
                    open: url,
                    sourceApplication: nil,
                    annotation: [UIApplication.OpenURLOptionsKey.annotation]
                )
            }

On a view in the Scene instance, like so:

var body: some Scene {
    WindowGroup {
        LoadingView()
            .onOpenURL { (url) in
                ApplicationDelegate.shared.application(
                    UIApplication.shared,
                    open: url,
                    sourceApplication: nil,
                    annotation: [UIApplication.OpenURLOptionsKey.annotation]
                )
            }
    }
}

This then calls the function in my extra application delegate, which then dismissed the login screen properly.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Jprofficial
  • 329
  • 3
  • 10
2

I had these errors. They were caused by my failure to call invalidateAndCancel on a NSURLSession.

Peter B. Kramer
  • 16,385
  • 1
  • 16
  • 20
0

I Had the same problem using Alamofire, it causes problem with request to confirm email

If you have the same issue - wait nearly 2 seconds to do you network response via Alamofire

 DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
       Your network response
}
Artsem Sharubin
  • 388
  • 3
  • 10