[Firebase Mobile] Firebase Analytics plugin is unavailable

Forge Component
(18)
Published on 4 Nov by David Sousa
18 votes
Published on 4 Nov by David Sousa

Hello Team,


I have implemented firebase mobile. When I am trying to log event I am getting error Firebase Analytics plugin is unavailable.

Hey Suhas,

Have you generated the mobile app after adding the plugin? Have you installed the new build?

This plugin is not supported in OutSystemsNow.

Cheers!

Hello Armando Gomes,

Yes, I generate the build and installed on mobile. And I also found firebase folder which has google-services.zip file in it.

I've found similar cases in which despite everything looks "by the book", it still doesn't work. What would fix it for me would be to create a new application (Firebase Custom Plugin), move the module (Firebase) to the new application and then rebuild the application.

This assumes that everything is initialised as required. One way to check for this is to debug on the device using a remote JS console (using Chrome or Safari).

Hello Armando Gomes,

I have created the new sample application and move the firebase custom plugin to that application. It gives same error.

When I debug using Chrome !!window.fp it gives False.

Can you please provide me sample OML.

Hey Suhas,

I'm going to start from the end: why are you requesting me a sample OML?

If you're debugging remotely on the device (using Chrome Remote Debugging) and you have the window.fp returning False, then the plugin is not getting initialised.

If you run the CheckFirebasePlugin, what is the result? Is it false?

Have you configured anything as specified in the documentation?


Cheers!

Hi Suhas,


Did you also try to generate a build and test the Firebase Mobile Sample app?

For a quick configuration just add the application to your environment and use the following app identifier when generating an Android build:

com.sample.dev.FirebaseMobileSample

This way we can check if the problem resides in the plugin or anywhere else (e.g. configuration files).


Regards,

David

David Sousa wrote:

Hi Suhas,


Did you also try to generate a build and test the Firebase Mobile Sample app?

For a quick configuration just add the application to your environment and use the following app identifier when generating an Android build:

com.sample.dev.FirebaseMobileSample

This way we can check if the problem resides in the plugin or anywhere else (e.g. configuration files).


Regards,

David


Hello David Sousa,

I did the same but no luck. Please find the attachment

Armando Gomes wrote:

Hey Suhas,

I'm going to start from the end: why are you requesting me a sample OML?

If you're debugging remotely on the device (using Chrome Remote Debugging) and you have the window.fp returning False, then the plugin is not getting initialised.

If you run the CheckFirebasePlugin, what is the result? Is it false?

Have you configured anything as specified in the documentation?


Cheers!

Yes, !!window.fp returning false. CheckFirebasePlugin it gives False.


Therefore, the plugin code is not being included into your binary file. My suggestion is to add another plugin to force the rebuilding of the mobile application and, hopefully, it will sort out. If not, follow up with OutSystems support.

Hello,

Got same error when InitCloudMessaging() in iOS (12.2)

Firebase Analytics plugin is unavailable, in which !!window.fp it gives False


The FCM push notification works perfectly in Android devices.


Any hint for the problem?

Thanks.

Armando Gomes wrote:

I've found similar cases in which despite everything looks "by the book", it still doesn't work. What would fix it for me would be to create a new application (Firebase Custom Plugin), move the module (Firebase) to the new application and then rebuild the application.

This assumes that everything is initialised as required. One way to check for this is to debug on the device using a remote JS console (using Chrome or Safari).

Hello, you need to create a new application for the plugin if in the first application you have already a module that implement a cordova plugin. 

This is the "why".

Camila

Camila Teixeira wrote:


Hello, you need to create a new application for the plugin if in the first application you have already a module that implement a cordova plugin. 

This is the "why".

Camila

Hello Camila, thanks for your answer. I assure you that was not the “why” I had those issues since, as specified, everything was being done “by the book”.

But this happened more than one year ago, so it could be something random.

Cheers!


Hello,

It has been observed that Plugin works fine on Personal Environment. But issue occurs on Enterprise Environment.


Can anyone assist in resolving the issue.

Hello all,


I have the same problem reported here. On IOS I'm always receiving the "Firebase Analytics Plugin is unavailable".


I did the configuration as suggested, creating two zip files, one for Android and another for IOS but it seems that for IOS I can't make it work.


Any tip?


Thank you,

José

Hi José,

"Firebase Analytics Plugin is unavailable" is the error obtained when there are references to the plugin but the latest build (with the plugin) isn't the one being used in the mobile phone. Are you using a build that has the plugin for iOS?

PS: If the app identifier is the same for both Android and iOS you only need a single zip folder containing both configuration files (json and plist). Is that the way the configuration is done in your app?

Regards,

David


Hello all, 

I got the same issue "Firebase Analytics Plugin is unavailable" on iOS. On android it works fine.

I called the action CheckFirebasePlugin it return false and shows "Firebase Analytics Plugin is unavailable".

Now I'm using this version: Firebase.Mobile-1.0.5_O11.


Hi David Sousa, do you know that version can work for iOS or not?. 

Do you have any idea to fix that? 


Thanks & best regards,


Hi Hien,

As I mentioned in the previous comment, that happens when the plugin isn't present in the mobile app build.

Are you sure you've the latest build, with the Firebase plugin, installed in your iPhone?

Best regards,

David


Hi David, 

I think I already built with the latest build(version firebase 1.0.5) but it still shows the same error. 

Now I'm using the example in forge: https://www.outsystems.com/forge/component-overview/4999/firebase-mobile-sample

After I install this it will auto install the Firebase plugin also. When installing is done. I start to configure for the ios push notification. 

I'm following this link: https://www.outsystems.com/forums/discussion/43685/configuration-guide/

After configuration done. I generate app and install again. But it still show that error("Firebase Analytics Plugin is unavailable")

Do you have any idea to fix it?

Thanks a lot for your support. 

Hey Hien,

The sample app already comes with some configuration files but you need to change your app identifier so that it matches "com.sample.dev.FirebaseMobileSample". Did you change your app id?

I'm not being able to reproduce the behavior you mentioned. If all the configurations are OK I'll end up with Firebase methods available in an iOS app.

Best regards,

David

Hey David,

About the app ID. I'm using the same app ID like this "com.sample.dev.FirebaseMobileSample" and I created the app ID from apple account with that ID. I already generated successful and installed to my device. 

So I think the app id it matches now. I also configure all app ID the same with "com.sample.dev.FirebaseMobileSample" in Firebase.

Do you think I should change the app ID?


Thanks and best regards,

David Sousa wrote:

Hi José,

"Firebase Analytics Plugin is unavailable" is the error obtained when there are references to the plugin but the latest build (with the plugin) isn't the one being used in the mobile phone. Are you using a build that has the plugin for iOS?

PS: If the app identifier is the same for both Android and iOS you only need a single zip folder containing both configuration files (json and plist). Is that the way the configuration is done in your app?

Regards,

David


Hi David,


Both files are there, and the native shell was generated after I added them, so it should be there.

I have two zip files, because the app ids are different from Android and iOS, but it seems to be with the right names and target directory.


One thing that I'm suspecting is the .p12 certificate that it's added on firebase console. But because I didn't generate the certificate (it was provided by the customer), I can't check if that's the case. Do you know if that message can be triggered if the certificate that is on firebase is not the right one?


Thanks for the help!


Regards,

José


Hi,

The p12 certificate only needs to be added in order to handle push notifications. It's added in the Firebase console, in the Settings tab called Cloud Messaging.

I just tried with a test application and everything worked fine. Here are some screenshots:

In this last screenshot I tested calling the getToken function from the chrome console and it worked as intended.


Best regards,

David


Hello David! 


Thanks for all the help. Everything was looking good on the configurations. The problem was that in our applications we had the push_sound.zip file, but we didn't configure the target directory for it. After adding it to the same directory as the google_services.zip file everything worked fine.


Just wanted to leave this here so that it can help someone that faces the same problem.


Regards,

José