Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift. The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated #1965

Closed
pabloroca opened this issue Oct 17, 2018 · 13 comments

Comments

@pabloroca
Copy link

@pabloroca pabloroca commented Oct 17, 2018

[REQUIRED] Step 2: Describe your environment

  • Xcode version: 10
  • Firebase SDK version: 5.10.0
  • Firebase Component: Core?___ (Auth, Core, Database, Firestore, Messaging, Storage, etc)
  • Component version: _____

[REQUIRED] Step 3: Describe the problem

With Xcode10, when starting Firebase I get this in the logs. No idea implications this can have.

console log:

`
5.10.0 - [Firebase/Analytics][I-ACS023007] Analytics v.50200000 started

5.10.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)

Failed to create synchronous remote object proxy: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}

Failed to create remote object proxy: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}

[NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}

Failed to ping server after delegate was set

Failed to create synchronous remote object proxy: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}

[NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}

Failed to create synchronous remote object proxy: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}

[NetworkInfo] Descriptors query returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service named com.apple.commcenter.coretelephony.xpc was invalidated.}

TIC TCP Conn Failed [7:0x600001660f00]: 12:8 Err(-65554)

Task <1B1A5D4C-5BBF-4AD4-A7E3-0ACA74AB8D7F>.<2> HTTP load failed (error code: -1003 [12:8])

Task <1B1A5D4C-5BBF-4AD4-A7E3-0ACA74AB8D7F>.<2> finished with error - code: -1003
`

Steps to reproduce:

Put FirebaseApp.configure() in the App Delegate or with this code also:

if let filePath = Bundle.main.path(forResource: "GoogleService-Info", ofType: "plist") {
    // Init FIRApp passing the file
    if let options = FirebaseOptions.init(contentsOfFile: filePath) {
        FirebaseApp.configure(options: options)
    }
}

My GoogleService-Info.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>AD_UNIT_ID_FOR_BANNER_TEST</key>
	<string>xsomethingx</string>
	<key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key>
	<string>xsomethingx</string>
	<key>CLIENT_ID</key>
	<string>xsomethingx</string>
	<key>REVERSED_CLIENT_ID</key>
	<string>xsomethingx</string>
	<key>API_KEY</key>
	<string>xsomethingx</string>
	<key>GCM_SENDER_ID</key>
	<string>xsomethingx</string>
	<key>PLIST_VERSION</key>
	<string>1</string>
	<key>BUNDLE_ID</key>
	<string>xsomethingx</string>
	<key>PROJECT_ID</key>
	<string>xsomethingx</string>
	<key>STORAGE_BUCKET</key>
	<string>xsomethingx</string>
	<key>IS_ADS_ENABLED</key>
	<true/>
	<key>IS_ANALYTICS_ENABLED</key>
	<true/>
	<key>IS_APPINVITE_ENABLED</key>
	<false/>
	<key>IS_GCM_ENABLED</key>
	<true/>
	<key>IS_SIGNIN_ENABLED</key>
	<true/>
	<key>GOOGLE_APP_ID</key>
	<string>xsomethingx</string>
	<key>DATABASE_URL</key>
	<string>xsomethingx</string>
</dict>
</plist>
@paulb777

This comment has been minimized.

Copy link
Member

@paulb777 paulb777 commented Oct 17, 2018

See https://stackoverflow.com/questions/52455652/xcode-10-seems-to-break-com-apple-commcenter-coretelephony-xpc.

Are you able isolate the issue to a particular pod?

If you're still stuck, please share the Podfile.

@pabloroca

This comment has been minimized.

Copy link
Author

@pabloroca pabloroca commented Oct 17, 2018

I also confirm this only happens in the simulator, glad to know it.

I am not using Cocoapods. I am using Carthage with this Cartfile:

binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseDynamicLinksBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMLVisionBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseMLVisionFaceModelBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebasePerformanceBinary.json"
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseStorageBinary.json"

I didn´t isolate what part is involved in this, but I remember some people talking about Firebase Notifications?. I checked in my Safari history, but I don't find it. I am not using Firebase Notifications, could be a common core dependency.

Some advice from an Apple Engineer at the Apple Developer Forums, I hope the can help:

"I’m not familiar with Unwanted Communication app extensions, so I’m going to respond in a very general sense. It’s possible that there are aspects of this that are specific to Unwanted Communication app extensions that I’m not aware of )-:
It’s not uncommon for app extensions to run in a tighter sandbox than normal app and I suspect that’s what’s happening here: Your app runs in the standard sandbox, and thus can talk to the backend service used by CTTelephonyNetworkInfo, but your app extension is running in a tighter sandbox that prevents that.
If that theory is correct then you won’t be able to work around it directly. One possibility indirect solution is to have your app get that info and store it in an app group shared container that it shares with the app extension. The app extension can then read that info and include it with its requests.
However, it’s possible that the app extension sandbox also prevents read access to shared app groups. That would be pretty unusual, but it’s technically possible and might even make sense given the privacy-sensitive nature of an Unwanted Communication app extension."

@sibabratswain11

This comment has been minimized.

Copy link

@sibabratswain11 sibabratswain11 commented Nov 9, 2018

facing the same issue with ionic project
Podfile
platform :ios, '9.0'
use_frameworks!
target 'BlockShorts' do
pod 'FirebaseMessaging', '> 2.0.0'
pod 'GoogleToolboxForMac', '
> 2.1'
pod 'Firebase'
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'Fabric'
pod 'Crashlytics'
end

@scalessec

This comment has been minimized.

Copy link

@scalessec scalessec commented Dec 4, 2018

We're also seeing this when integrating via Carthage. We're currently only using:
binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseAnalyticsBinary.json"

As stated above, these logs only appear when running on the simulator. Not sure if this is helpful, but in our case it's our dynamic framework that is linking against Firebase and it's dependencies.

@DNAatWork

This comment has been minimized.

Copy link

@DNAatWork DNAatWork commented Dec 21, 2018

not part of this, same with regular ios app using adbanner (kGADAdSizeSmartBannerPortrait) hope this helps if I read right.

@TylerZubke

This comment has been minimized.

Copy link

@TylerZubke TylerZubke commented Jan 31, 2019

I'm not sure if there has been any update on this, but I was able to get it to work in the simulator with this in my Podfile

pod 'FirebaseCore'
pod 'GoogleAnalytics'
pod 'FirebaseAnalytics'
pod 'GoogleTagManager'
@lauriejhouse

This comment has been minimized.

Copy link

@lauriejhouse lauriejhouse commented Feb 12, 2019

I'm not sure if there has been any update on this, but I was able to get it to work in the simulator with this in my Podfile

pod 'FirebaseCore'
pod 'GoogleAnalytics'
pod 'FirebaseAnalytics'
pod 'GoogleTagManager'

How did you get it work? I have most of those pods minus GoogleTagManager and I can't get it to work.

@TylerZubke

This comment has been minimized.

Copy link

@TylerZubke TylerZubke commented Feb 12, 2019

@lauriejhouse I may have spoke too soon with that comment. It started working for a little bit, then the CoreTelephony errors came back. The only way I was able to get them to go away completely was to add a 1 second delay before initializing Firebase. I only do this delay when the simulator is detected.

@LucasVanDongen

This comment has been minimized.

Copy link

@LucasVanDongen LucasVanDongen commented Feb 14, 2019

Running
xcrun simctl spawn booted log config --mode "level:off" --subsystem com.apple.CoreTelephony
in terminal made it go away for me

@jitesh-sharma

This comment has been minimized.

Copy link

@jitesh-sharma jitesh-sharma commented Apr 21, 2019

I am facing this issue, when I am addding clevertap pod in my firebase project.

@dlewanda

This comment has been minimized.

Copy link

@dlewanda dlewanda commented Apr 30, 2019

Running
xcrun simctl spawn booted log config --mode "level:off" --subsystem com.apple.CoreTelephony
in terminal made it go away for me

Is there a way to make this part of the project or workspace settings so we don't have to run this on every developer's machine no matter which simulator they choose?

@LucasVanDongen

This comment has been minimized.

Copy link

@LucasVanDongen LucasVanDongen commented Apr 30, 2019

@morganchen12

This comment has been minimized.

Copy link
Contributor

@morganchen12 morganchen12 commented May 30, 2019

Closing this issue since it's not something we plan on fixing in the Firebase SDKs. Feel free to continue discussion here.

@firebase firebase locked and limited conversation to collaborators Oct 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.