[Firebase Mobile] Unable to generate Android method does not override or implement a method from a supe

Forge Component
(20)
Published on 26 May by Patrícia Glória Ferreira
20 votes
Published on 26 May by Patrícia Glória Ferreira

trying generate Android can NOT get the app to compile in all environments.  the just occurred on the new MABS 6.0 with version 11.6.23


the is the error Error compiling Cordova plugin: main/java/org/apache/cordova/firebase/FirebasePluginMessagingService.java:53: error: method does not override or implement a method from a supertype.


I'm getting a  

  • In Android on 2020-01-30 at 11:33:07 - Error installing Cordova plugin: cordova-plugin-firebase': TypeError: Cannot read property 'get.

Sooooo... is this broken?

Dave Groet wrote:

trying generate Android can NOT get the app to compile in all environments.  the just occurred on the new MABS 6.0 with version 11.6.23


the is the error Error compiling Cordova plugin: main/java/org/apache/cordova/firebase/FirebasePluginMessagingService.java:53: error: method does not override or implement a method from a supertype.


Hi Dave,

I'm unable to replicate this. I've already built multiple Android apps with the latest plugin version and MABS 6.0 without issues. Is this error still happening?


Mariano Picco wrote:

I'm getting a  

  • In Android on 2020-01-30 at 11:33:07 - Error installing Cordova plugin: cordova-plugin-firebase': TypeError: Cannot read property 'get.

Sooooo... is this broken?

Mariano,

If you're using MABS 6.0, please confirm that you're also using the latest plugin version (1.0.7).


David Sousa wrote:

Mariano Picco wrote:

I'm getting a  

  • In Android on 2020-01-30 at 11:33:07 - Error installing Cordova plugin: cordova-plugin-firebase': TypeError: Cannot read property 'get.

Sooooo... is this broken?

Mariano,

If you're using MABS 6.0, please confirm that you're also using the latest plugin version (1.0.7).



Using MABS 6 and Stable version 1.0.7 (O11)

Getting a In Android on 2020-01-30 at 12:38:55 - Error compiling Cordova plugin: main/java/org/apache/cordova/firebase/FirebasePluginMessagingService.java:53: error: method does not override or implement a method from a supertype. 


Attached the error log

And error with MABS 5.2: 


Build failed with the following error: Error compiling Cordova plugin: org/apache/cordova/engine/SystemCookieManager.java uses or overrides a deprecated API..


Attached error log. 



Here's the thing: Our last successful Android version was built 21/01, way after you last updated the component, and as far as I can tell, after MABS 6.0 was introduced by OutSystems. 

So is it something that changed in the sdk? How do we go about and fixing it?

Update: Downloaded Firebase Mobile Version 1.0.6, compiled with MABS 5.2: it compiles. But I don't get any notifications.


Mariano,


I was able to reproduce this after referencing the OneSignal plugin (using MABS 6.0 and Firebase 1.0.7).

Do you really need OneSignal?

Anyways, I'll take a look into it.


Best regards,

David

I do not need OneSignal right now, but there shouldn't be any problem if for some reason a client came to me and said "We have a bunch of OneSignal stuff, but we wanna use Firebase's analytics", might need both? 

Weird error, isn't it? I'm applying Firebase to a completely different app (without OneSignal) and seeing if there's errors there. 

Hi Mariano,


I investigated a bit into the OneSignal plugin and noticed that it references some Google Play Services and Firebase libraries in the gradle file.

https://github.com/OutSystems/OneSignal-Cordova-SDK/blob/master/build-extras-onesignal.gradle


Attached is the final gradle file before the app is built.

I removed the lines between 16 and 27 and the build compiles successfully with both plugins.


These are the removed lines:

// ### Google Play Services library
'com.google.android.gms': [
    'version': '11.8.+',
    'omitModules': ['strict-version-matcher-plugin']
],

// ### Google Firebase library
// Although not used by OneSignal Firebase has some dependencies on gms
// If present, ensuring they are aligned
    'com.google.firebase': [
    'version': '11.8.+'
],



David Sousa wrote:

Hi Mariano,


I investigated a bit into the OneSignal plugin and noticed that it references some Google Play Services and Firebase libraries in the gradle file.

https://github.com/OutSystems/OneSignal-Cordova-SDK/blob/master/build-extras-onesignal.gradle


Attached is the final gradle file before the app is built.

I removed the lines between 16 and 27 and the build compiles successfully with both plugins.


These are the removed lines:

// ### Google Play Services library
'com.google.android.gms': [
    'version': '11.8.+',
    'omitModules': ['strict-version-matcher-plugin']
],

// ### Google Firebase library
// Although not used by OneSignal Firebase has some dependencies on gms
// If present, ensuring they are aligned
    'com.google.firebase': [
    'version': '11.8.+'
],

I am one of the developers that Mariano is referring to that uses One Signal for Notifications and Firebase for analytics.  by removing those entries from the OneSignal.gradle file will that break the notification process that is currently being used in our applications?  




Hello David,

I am one of the developers that Mariano is referring to that uses One Signal for Notifications and Firebase for analytics.  by removing those entries from the OneSignal.gradle file will that break the notification process that is currently being used in our applications

Hi Dave,

I'm not sure if it will break. If I had to bet on it I would say that it would still work because the removed dependencies from OneSignal (GMS and Firebase) are already in the Firebase plugin.

Regards,

David

David Sousa wrote:

Hi Dave,

I'm not sure if it will break. If I had to bet on it I would say that it would still work because the removed dependencies from OneSignal (GMS and Firebase) are already in the Firebase plugin.

Regards,

David

Hey David, I know this is an old post, but I was wondering if this is still a solution, I was looking in the OneSignal repository and couldn't find those lines

"

// ### Google Play Services library
'com.google.android.gms': [
    'version': '11.8.+',
    'omitModules': ['strict-version-matcher-plugin']
],

// ### Google Firebase library
// Although not used by OneSignal Firebase has some dependencies on gms
// If present, ensuring they are aligned
    'com.google.firebase': [
    'version': '11.8.+'
],"


I'm using onesignal and firebase aswell and I'm having errors when generating an app with mabs 6.1


Has anyone managed to resolve the conflict with the OneSignal Plugin when generating the native?

reference in:OneSignal Plugin


Best regards,

Maurilio

Hi, I've got the same issue in my app, so anyone can guide me to fix this issue?

related issue when I'm using mabs 6.1 to generate native apps