Skip to content

iPhone 13 cannot access Internet on cellular data when Firebase added to project #1261

Closed
@HarrisonShort

Description

@HarrisonShort

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2021.2.14f1
  • Firebase Unity SDK version: 8.9.0
  • Source you installed the SDK: unitypackage
  • Problematic Firebase Component: Firebase (provided project uses Auth, have also seen with Messaging and Dynamic Links)
  • Platform you are using the Unity editor on: Mac
  • Platform you are targeting: iOS
  • Scripting Runtime: IL2CPP

[REQUIRED] Please describe the issue here:

We are finding an issue where iPhone 13s cannot access the Internet on cellular data. It works as expected on wifi. Initially we did not suspect Firebase, but after investigating further, and beginning a "process of elimination" tactic, we found that adding Firebase to the Unity project causes the issue to occur.

We have found this issue on iPhone 13 Pro and Pro Max, but do not have access to other phones in the iPhone 13 family.

The error log:

2022-04-27 14:31:16.130521+1000 CellularDataTest[37665:3565489] Task <45F280FC-4A76-4838-8A54-18A3E24809AA>.<1> HTTP load failed, 0/0 bytes (error code: -1009 [1:50])
2022-04-27 14:31:16.134395+1000 CellularDataTest[37665:3565489] Task <45F280FC-4A76-4838-8A54-18A3E24809AA>.<1> finished with error [-1009] Error Domain=NSURLErrorDomain Code=-1009 "The internet connection appears to be offline." UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x28151d1a0 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_NSURLErrorNWPathKey=unsatisfied (Denied over cellular interface), interface: pdp_ip0[lte], ipv4, dns, expensive, _kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <45F280FC-4A76-4838-8A54-18A3E24809AA>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <45F280FC-4A76-4838-8A54-18A3E24809AA>.<1>"
), NSLocalizedDescription=The internet connection appears to be offline., NSErrorFailingURLStringKey=https://httpbin.org/get, NSErrorFailingURLKey=https://httpbin.org/get, _kCFStreamErrorDomainKey=1}

Unfortunately I'm not actually sure what the issue could be, but it does seem to only occur when Firebase is added to the project.

Steps to reproduce:

I have provided two Unity projects, which are identical except that one has Firebase implemented. I have also included an XCode builds for both projects, which are in the Build folder in each project root. I am running XCode 13.3.1 on my Macbook Pro. I have removed the GoogleService-Info.plist from the Firebase project and have changed the bundle ID for privacy reasons.
https://drive.google.com/file/d/15iXvZNokPoFHgeQdkGk3k077yn2oveCc/view?usp=sharing

On No-Firebase project:

  1. Run build on iPhone 13 on wifi
  2. OnAwakeScript component on Main Camera will send a GET request to https://httpbin.org/get
  3. Request should be successful
  4. Run build on iPhone 13 on cellular data
  5. OnAwakeScript component on Main Camera will send a GET request to https://httpbin.org/get
  6. Request should be successful

On Firebase project:

  1. Run build on iPhone 13 on wifi
  2. OnAwakeScript component on Main Camera will send a GET request to https://httpbin.org/get
  3. Request should be successful
  4. Run build on iPhone 13 on cellular data
  5. OnAwakeScript component on Main Camera will send a GET request to https://httpbin.org/get
  6. Above error should appear

Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
What's the issue repro rate? (eg 100%, 1/5 etc)

Yes, 100%. I had a project with Messaging and another project with Dynamic Links added as I was recently investigating another Firebase issue we were experiencing, and the same issue occurs in both of those projects as well.

Thanks for your attention on this!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions