Crash on iPhone 6 on iOS 12 with Realtime Database

Open
#1,360 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp, ios, unity

Research direction

Start with the ReadSomeValueChange method and its ValueChanged subscription, then reproduce the report in the samples project on an iPhone 6 running iOS 12. Compare the behavior with later iPhones and verify that registering the Realtime Database listener no longer crashes and that the callback can run.

Written by the indexing model from the issue text.

Description

new
[REQUIRED] Please fill in the following fields:
  • Unity editor version: 2021.3.32f1
  • Firebase Unity SDK version: 11.6.0
  • Source you installed the SDK: Unity package manager via tgz
  • Problematic Firebase Component: Realtime database
  • Other Firebase Components in use: None
  • Additional SDKs you are using: None
  • Platform you are using the Unity editor on: MacOS 14.0 with xCode version 15.0.1
  • Platform you are targeting: iPhone 6 iOS 12.5.7
  • Scripting Runtime: IL2CPP
[REQUIRED] Please describe the issue here:

When trying to register for a value changed in the realtime database, the app crashes on the iPhone 6. This only occurs on the iPhone 6 and not on later iPhones. When the app crashes, xcode outputs a cryptic message:

0x100aa4000: .long 0xfeedfacf ; unknown opcode

Steps to reproduce:
  • Install firebase through the package manager
  • Add GoogleService-Info to the project
  • Add the script below (see following section)
  • Build the project through xCode
  • Notice the crash on iPhone 6.
  • Notice that the crash does not occur on more 'modern' iPhones, which my collegues have

I was also able to reproduce this issue in the samples project.

I also tried downgrading the firebase SDK to 10.6.0 and the issue also occured here.

Relevant Code:
public void ReadSomeValueChange()
    {
        string dataBaseUrl = "https://<yourfirebaseurl>.firebasedatabase.app/";
        Debug.Log("Before getting instance");
        var dataBase = FirebaseDatabase.GetInstance(dataBaseUrl);
        Debug.Log("Before getting reference");
        var somePath = dataBase.GetReference("/test");
        Debug.Log("Before registering to value changed");
        somePath.ValueChanged += HandleValueChanged; // APP CRASHES HERE
    }

    private void HandleValueChanged(object sender, ValueChangedEventArgs args)
    {
        // app does not reach this line
        Debug.Log("Value changed");
    }

Dominant language
C#
Stars
923
Forks
456
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/quickstart-unity

All issues in firebase/quickstart-unity

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.