FirebaseApp Initialization Error in MAUI .NET 8

Omkar Pawar 40 Reputation points
2024-12-24T11:32:28.0366667+00:00

Hello,

I am encountering an issue with initializing Firebase in my MAUI Android and iOS projects. The error message I am receiving on Android is:

[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: Java.Lang.IllegalStateException: Default FirebaseApp is not initialized in this process com.companyname.crossfirebasefirebasecrashlytics. Make sure to call FirebaseApp.initializeApp(Context) first.

On iOS, I'm seeing a similar issue where the default Firebase app is not initialized.

I have ensured that google-services.json and GoogleService-Info.plist are in the correct locations and set to the correct build actions. I have also added the necessary Firebase dependencies in my project.

Despite this, the error persists on both platforms. Could someone please help me identify what might be going wrong or suggest any additional steps I should take to resolve this issue?

You can find my project on GitHub here: CrossFirebaseFirebaseCrashlytics.

Thank you!

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,768 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,157 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 46,281 Reputation points Microsoft Vendor
    2024-12-25T02:53:29.17+00:00

    Hello,

    Plugin.Firebase is a third-party plugin and is not officially supported according to community policy.

    For this issue, it is more recommended that you report it to the official repository of this plugin. In addition, I noticed a same issue with a solution: Exception:Default FirebaseApp is not initialized in this process #4.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.