firebase-unity-sdk icon indicating copy to clipboard operation
firebase-unity-sdk copied to clipboard

[Question] Firebase - NoClassDefFoundError at startup

Open rossojr92 opened this issue 1 year ago • 3 comments

What is your question?

Hi We are experiencing an issue with Firebase 11.8.1. We are building aab with multidex and split application binary enabled.

The build seems to crash at startup with this error:

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/Preconditions; at com.google.firebase.provider.FirebaseInitProvider.checkContentProviderAuthority(FirebaseInitProvider.java:85)

I leave here a screenshot with more information about the log. Is anyone experiencing this issue?

We are running out of idea

Screenshot 2024-05-20 at 18 45 43

Firebase Unity SDK Version

11.8.1

Unity editor version

2022.3.20f1, 2022.3.19f1

Installation Method

.unitypackage

Problematic Firebase Component(s)

Analytics, Crashlytics

Other Firebase Component(s) in use

No response

Additional SDKs you are using

Facebook, OneSignal, GoogleSignIn

Targeted Platform(s)

Android

Unity editor platform

Mac, Windows

Scripting Runtime

IL2CPP

Release Distribution Type

Pre-built SDK from https://firebase.google.com/download/unity

rossojr92 avatar May 20 '24 16:05 rossojr92

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

google-oss-bot avatar May 20 '24 16:05 google-oss-bot

Hey @rossojr92, thanks for reaching out. NoClassDefFoundError is usually caused by unable find a class definition on runtime, meaning there was an issue during the compilation. I'm suspecting that the issue might be a conflict in the dependencies. Could you try the solution in #927 and #688?

Let me know if that helps. Thanks!

argzdev avatar May 20 '24 17:05 argzdev

Hi for sure it's something in dependencies. Regarding the #927 and #688: #927 --> this is a compilation problem. Our build phase is fine. Our crash happen at runtime #688 --> The solution here seems to enable Custom Main Gradle Template and Custom Gradle Properties to properly resolve dependencies conficts.

Unfortunately, we are already using Custom Main Gradle Template and Custom Gradle Properties. The resolution phase is succeeding all the time.

Does it exists a way to log conflicts or something similar during dependencies resolution?

rossojr92 avatar May 22 '24 07:05 rossojr92

We might need to dig deeper, could you provide an MCVE? Thanks!

argzdev avatar May 27 '24 14:05 argzdev

Hey @rossojr92. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Jun 03 '24 01:06 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@rossojr92 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar Jun 10 '24 01:06 google-oss-bot