question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.IllegalStateException on 3.0.3

See original GitHub issue

Hello, i get an error “Default FirebaseApp is not initialized in this process <package name>. Make sure to call FirebaseApp.initializeApp(Context) first” when debug. Didn’t change anything else. FAQ read (all also as there). On 2.3.6 everything worked

Bug Information

Version Number of Plugin: 3.0.3 Device Tested On: lg g4 (v8.1) Simulator Tested On: pexel 2 (v8.1, v.9.0) Version of VS: 16.4.2 Version of Xamarin: 4.4-sr2 Versions of other things you are using: no changes

Steps to reproduce the Behavior

Occurs immediately when debugging.

Expected Behavior

Actual Behavior

Not working. java.lang.IllegalStateException

Code snippet

`public override void OnCreate() { base.OnCreate();

        //Set the default notification channel for your app when running Android Oreo
        if (Build.VERSION.SdkInt >= BuildVersionCodes.O)
        {
            //Change for your default notification channel id here
            FirebasePushNotificationManager.DefaultNotificationChannelId = "FirebasePushNotificationChannel";

            //Change for your default notification channel name here
            FirebasePushNotificationManager.DefaultNotificationChannelName = "General";
        }

        FirebasePushNotificationManager.Initialize(this, true);  // an error occurs here

    }`

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
pedroyancommented, Jun 18, 2020

@Jerome-Liger Thanks for sharing you solution. I was having the same problem despite targeting Android 10 and setting up the code as described on the tutorial. After installing the following packages, the problem went away:

<PackageReference Include="Xamarin.Firebase.Messaging" Version="71.1740.1"/>
<PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="71.1601.1"/>
1reaction
KennyDizicommented, Jan 21, 2020

thanks @Jerome-Liger, I will try the same thing, hope it work for me too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.IllegalStateException on 3.0.3 · Issue #283
java.lang.IllegalStateException on 3.0.3 #283 · Comments · Bug Information · Footer.
Read more >
IllegalStateException in Java driver 3.0 for cassandra ...
Caused by: java.lang.IllegalStateException: Detected Guava issue #1635 which indicates that a version of Guava less than 16.01 is in use.
Read more >
CXF 3.0.3 - java.lang.IllegalStateException: Entity is not ...
CXF 3.0.3 - java.lang.IllegalStateException: Entity is not available on the return from a JAX-RS service. Posted to users@cxf.apache.org.
Read more >
java.lang.IllegalStateException: Access token already available
i am getting this Exception while accessing for access token. java.lang.IllegalStateException: Access token already available. at twitter4j.auth ...
Read more >
Preparing for Spring Boot 3.0
Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.jasig.cas.client.boot.configuration.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found