Skip to content

[Bug] #1169

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

Closed
PedjaSOZAP opened this issue Nov 2, 2021 · 17 comments
Closed

[Bug] #1169

PedjaSOZAP opened this issue Nov 2, 2021 · 17 comments
Labels

Comments

@PedjaSOZAP
Copy link

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2020.3.7f1
  • Firebase Unity SDK version: 8.4.0
  • Source you installed the SDK: .unityoackage
  • Problematic Firebase Component: check attached files
  • Other Firebase Components in use: Firebase Analytics, Remote Config, firebase-messaging, firebase-crashlytics
  • Additional SDKs you are using: fyber,facebook
  • Platform you are using the Unity editor on: windows
  • Platform you are targeting: iOS/Android
  • Scripting Runtime: Mono, IL2CPP

[REQUIRED] Please describe the issue here:

Hello, in crashlytics window we started to see the crashes pthread_mutex_lock that may be related to firebase and are causing issues to number of users. Please double check the attached files below. Thank you

Steps to reproduce:

Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
Unfortunately we don't have any more information than ones that you can see in files attached below

What happened? How can we make the problem occur?
Unfortunately we don't have any more information than ones that you can see in files attached below

If you have a downloadable sample project that reproduces the bug you're reporting, you will
Unfortunately we don't have any more information than ones that you can see in files attached below

Relevant Code:

// TODO(you): code here to reproduce the problem

pthread_mutex_lock line 4.txt
pthread_mutex_lock line 2.txt
pthread_mutex_lock line 8.txt
pthread_mutex_lock.txt

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@Jack37
Copy link

Jack37 commented Nov 2, 2021

Probably the same as #1160 and #1166

@PedjaSOZAP
Copy link
Author

I've read both issues but I didn't see any clear solution to this problem. Am i missing something?

@Jack37
Copy link

Jack37 commented Nov 2, 2021

The only solution so far seems to be removing multiple calls of CheckAndFixDependencies, if you have more of them, but if not then we need to wait for a fix.

@paulinon paulinon added api: core and removed new New issue. needs-triage labels Nov 2, 2021
@paulinon
Copy link
Contributor

paulinon commented Nov 2, 2021

Hi @PedjaSOZAP,

It's possible that you're calling the CheckAndFixDependenciesAsync() method more than once in your implementation, and this creates and destroys the default app once to check for dependencies. Could you try if removing the excess CheckAndFixDependenciesAsync() calls makes a difference?

If it doesn't, it would be great if you could provide a minimal, reproducible example of your project so that we can identify what's causing this behavior. You may also try our quickstart to verify the issue persists there as well.

@paulinon paulinon added the needs-info Need information for the developer label Nov 2, 2021
@PedjaSOZAP
Copy link
Author

CheckAndFixDependenciesAsync() is called only once, at when Firebase actually gets initialized. Issue with this that we were unable to reproduce the bug in our test environment, it only happened on the live version of the project.

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Nov 4, 2021
@aroman
Copy link

aroman commented Nov 4, 2021

I'm also hitting this crash — I also cannot repro in a minimal example, and I can confirm that I too am not calling CheckAndFixDependenciesAsync() more than once.

@paulinon
Copy link
Contributor

paulinon commented Nov 4, 2021

Thanks for the additional information, @PedjaSOZAP and @aroman. It's unusual for the crash to appear in just one version of your project. Could you provide a minimal, reproducible example of your implementation so that we can analyze this behavior?

@paulinon paulinon added needs-info Need information for the developer and removed needs-attention Need Googler's attention labels Nov 4, 2021
@aroman
Copy link

aroman commented Nov 7, 2021

This bug is a dupe of #1170

@chkuang-g
Copy link
Contributor

@PedjaSOZAP

Your callstack fit this profile #1160 (comment)

Please try to upgrade to the latest and see if this fixes your issue.

@AjayC-Bsw
Copy link

Here is the minimum reproducible code https://github.com/AjayC-Bsw/FirebaseCrashRepro

Tested with both mono / IL2CPP.
Firebase SDK version - 8.6.1

Steps to reproduce -

  1. Make a Apk and install
  2. Open the Apk
  3. Close app and clear app data open app again
  4. Repeat steps 2-3 few time

Application crashes when open, on some devices first time on some devices when come again after clearing data , Repeat these steps 5-6 times crash occurs.

I have tested those steps for our production application and able to repro.

This sample does have only firebase analytics , messaging .

Crash Logs with MONO is different -

      #00 (wrapper managed-to-native) Firebase.AppUtilPINVOKE:FirebaseApp_ReleaseReferenceInternal (System.Runtime.InteropServices.HandleRef)
      #01 Firebase.FirebaseApp:ReleaseReferenceInternal (Firebase.FirebaseApp) <0x23>
      #02 Firebase.FirebaseApp:RemoveReference () <0xf3>
      #03 Firebase.FirebaseApp:Dispose () <0x63>
      #04 Firebase.FirebaseApp:CheckDependenciesInternal () <0x10f>
      #05 Firebase.FirebaseApp/<CheckDependencies>c__AnonStorey2:<>m__0 () <0xf>
      #06 Firebase.FirebaseApp:TranslateDllNotFoundException (System.Action) <0x23>
      #07 Firebase.FirebaseApp:CheckDependencies () <0x8b>
      #08 Firebase.FirebaseApp:<CheckDependenciesAsync>m__2 () <0x1f>
      #09 System.Threading.Tasks.Task`1<Firebase.DependencyStatus>:InnerInvoke () <0x53>

@PedjaSOZAP
Copy link
Author

I've tried updating to latest version of firebase (8.6.1) and issue is still there, it now makes more than 50% of our crashes on crashlytics

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Nov 17, 2021
@a-maurice
Copy link
Contributor

We haven't been able to completely reproduce the problem on our end, but we just released 8.6.2, which contains a potential fix for the issue.

@paulinon
Copy link
Contributor

Hey @PedjaSOZAP, could you confirm if the issue persists using version 8.6.2 of the SDK?

@paulinon paulinon added needs-info Need information for the developer and removed needs-attention Need Googler's attention labels Nov 24, 2021
@AjayC-Bsw
Copy link

I can confirm we are not getting this issue after updating to 8.6.2

@PedjaSOZAP
Copy link
Author

PedjaSOZAP commented Nov 24, 2021

Hi, I downgraded plugin back to 8.1.0, and I can confirm that we didn't get any issues with that version of the plugin, but I will try on the next update updating firebase to latest version, and I will let you know how that goes. Issue was that we couldn't get the issue in our testing environment

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Nov 24, 2021
@paulinon
Copy link
Contributor

Thanks for letting us know, @PedjaSOZAP. In the event that you encounter an issue with the latest SDK, let us know by leaving a comment so that we can reopen this ticket and continue our investigation.

With that, I'll be closing this for now.

@firebase firebase locked and limited conversation to collaborators Dec 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants