Coder Social home page Coder Social logo

Comments (7)

TobiasBuchholz avatar TobiasBuchholz commented on September 14, 2024 1

PR #122 is now merged into the main branch and released with version 1.3.0.

from plugin.firebase.

vhugogarcia avatar vhugogarcia commented on September 14, 2024

I am facing the same issue you are @djordje200179 . Did you find a workaround for it?

from plugin.firebase.

djordje200179 avatar djordje200179 commented on September 14, 2024

@vhugogarcia Nope :/
I have tried a lot of things, but that didnt solve the problem. And unfortunately owner of the repo didn't say anything about the issue. So we are stuck until someone figures out what we are doing wrongly.

from plugin.firebase.

vhugogarcia avatar vhugogarcia commented on September 14, 2024

I tried to implement Analytics on my own following the same logic from this plugin without success. After debugging the issue the activity is not null, somehow the Initialize static method is not assigning correctly the object for instance it is null.

_firebaseAnalytics = FirebaseAnalytics.GetInstance(context);

The code line above in the link is the one that is not being triggered somehow, I'm not sure why. I'm still investigating...

from plugin.firebase.

TobiasBuchholz avatar TobiasBuchholz commented on September 14, 2024

Hi, sorry for not giving any feedback yet, I was hoping the problem might have solved itself. If you provide me with an example project with this issue I can take a look and try to help.

from plugin.firebase.

tranb3r avatar tranb3r commented on September 14, 2024

Duplicate of #17

from plugin.firebase.

tranb3r avatar tranb3r commented on September 14, 2024

I'm also having this exception sometimes, in two different situations:

  • app resumes after a period of inactivty (activity destroyed)
  • app launched after the process has been started by a background worker

I haven't been able to debug the first situation.

However the second situation is easy to reproduce, and here is what happens:

  • the background worker starts, of course there is no activity so Platform.CurrentActivity is null (which is legit)
  • when a call to CrossFirebaseAuth.Current is done (by the worker), the constructor of FirebaseAuthImplementation is called ; in this constructor, an exception is thrown when getting Platform.CurrentActivity on GoogleAuth init.
  • as CrossFirebaseAuth.Current is using a Lazy valueFactory, any attempt to initialize again FirebaseAuthImplementation is failing, even if it's done later in the app when an Activity does exist.

So, one problem is that an exception is thrown in the constructor of a class which is called by a Lazy valueFactory.
This problem can be avoided if the Platform.CurrentActivity is not retrieved in the constructor. Which is exactly what I've done in PR #122

from plugin.firebase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.