activitree / meteor-push

Meteor Push Notifications for Cordova and Web/PWA with Firebase (FCM).
MIT License
27 stars 19 forks source link

Meteor 2.5.1 compatibility #47

Open bratelefant opened 2 years ago

bratelefant commented 2 years ago

Hi there,

tried to update Meteor to 2.5.1; I also use cordova-plugin-androidx-adapter@1.1.3. Bulding with meteor-push@2.0.10 yields several error (s. below).

When I manually change the dependency in the gradle file under "cordova-support-google-services" for google services to classpath 'com.google.gms:google-services:4.3.10' building seems to work fine, and at least push tokens get inserted into mongo db. (did no further testing atm).

Is there a chance that 1.) this is a valid solution and 2.) this gets merged?

Here's from the logs:

   Building Cordova app for Android          \
FAILURE: Build failed with an exception.

* What went wrong:
Some problems were found with the configuration of task ':app:processReleaseGoogleServices' (type 'GoogleServicesTask').
  - In plugin 'com.google.gms.googleservices.GoogleServicesPlugin' type 'com.google.gms.googleservices.GoogleServicesTask' field 'intermediateDir' without corresponding getter has been annotated with @OutputDirectory.

    Reason: Annotations on fields are only used if there's a corresponding getter for the field.

    Possible solutions:
      1. Add a getter for field 'intermediateDir'.
      2. Remove the annotations on 'intermediateDir'.

    Please refer to https://docs.gradle.org/7.1.1/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.
  - In plugin 'com.google.gms.googleservices.GoogleServicesPlugin' type 'com.google.gms.googleservices.GoogleServicesTask' field 'packageNameXOR1' without corresponding getter has been annotated with @Input.

    Reason: Annotations on fields are only used if there's a corresponding getter for the field.

    Possible solutions:
      1. Add a getter for field 'packageNameXOR1'.
      2. Remove the annotations on 'packageNameXOR1'.

    Please refer to https://docs.gradle.org/7.1.1/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.
  - In plugin 'com.google.gms.googleservices.GoogleServicesPlugin' type 'com.google.gms.googleservices.GoogleServicesTask' field 'packageNameXOR2' without corresponding getter has been annotated with @Input.

    Reason: Annotations on fields are only used if there's a corresponding getter for the field.

    Possible solutions:
      1. Add a getter for field 'packageNameXOR2'.
      2. Remove the annotations on 'packageNameXOR2'.

    Please refer to https://docs.gradle.org/7.1.1/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.
  - In plugin 'com.google.gms.googleservices.GoogleServicesPlugin' type 'com.google.gms.googleservices.GoogleServicesTask' field 'quickstartFile' without corresponding getter has been annotated with @InputFile, @Optional.

    Reason: Annotations on fields are only used if there's a corresponding getter for the field.

    Possible solutions:
      1. Add a getter for field 'quickstartFile'.
      2. Remove the annotations on 'quickstartFile'.

    Please refer to https://docs.gradle.org/7.1.1/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.
  - In plugin 'com.google.gms.googleservices.GoogleServicesPlugin' type 'com.google.gms.googleservices.GoogleServicesTask' field 'searchedLocation' without corresponding getter has been annotated with @Input.

    Reason: Annotations on fields are only used if there's a corresponding getter for the field.

    Possible solutions:
      1. Add a getter for field 'searchedLocation'.
      2. Remove the annotations on 'searchedLocation'.

    Please refer to https://docs.gradle.org/7.1.1/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.

* Try:....
paulincai commented 2 years ago

Hi @bratelefant the package is almost ready for a new release. Would be a good time to transition to another Cordova Push plugin which ideally ... should not be deprecated. I would be interested to work with you to test the new package version which now allows a separate DB connection for high volume push notifications. Would you like to take this to a private chat and work together? I would only need you to try your app with a package that I provide to you and we adjust for the best setup and finish everything with the right documentation.

bratelefant commented 2 years ago

Hey, I'm surely interested in testing; though time's a limiting factor right now. Which plugin are you thinking of, maybe this one? I'm currently using push on a private repo with ~1200 tokens, and pushing messages occurs "stackwise" (queues with ~300-500 push messages).

paulincai commented 2 years ago

Yes, that is the one. I see one of the forks of this package uses that package.

bratelefant commented 2 years ago

Is there a fork that you could possibly merge?

paulincai commented 2 years ago

Hi @bratelefant there are three ways I see to fix this.

  1. You fork it and do your preferred changes.
  2. You provide your updates in a fork and we merge into the main repo
  3. Time is not a limiting factor anymore.
bratelefant commented 2 years ago

Hm. I'm actually thinking of prioritizing this one, since I think that push is essential to almost any meteor app and I'd really like to keep up with meteor core updates.

I'll try to move to cordova-plugin-push in my fork and see if I can get this to work.

bratelefant commented 2 years ago

I get iOS working, but Android devices do not receive background push notifications, although a device token is set and fcmConnection in sendNotification gives a result (log shows Successfully sent message:...). @paulincai Any hint where to look at?

paulincai commented 2 years ago

Whatsapp please at +971 55 6036403 or skype at paulailincai (in United Arab Emirates).

imongithubnow commented 2 years ago

I'm also facing on this issue, there is news ?

paulincai commented 2 years ago

@imongithubnow are there any news?

imongithubnow commented 2 years ago

I tried some things but without lucky, I answered you on Meteor forums. Seems clair the problem is in push component but so far I can't understand how resolve it.

bratelefant commented 2 years ago

My guess is that the problem is located in phonegap-plugin-push

paulincai commented 2 years ago

Hi @bratelefant where exactly?

bratelefant commented 2 years ago

Couldn't point my finger at, but moving to cordova-plugin-push at least eliminates this error and building is possible. However, as stated above, android devices aren't receiving any notifications.

HoptimizeME commented 2 years ago

Hi,

is it still the case ? We were going to start using push notifications with our app based on Meteor 2.6.1. What do you guys do with your app ? You cannot upgrade to >2.5 because push notifications stopped working?

Regards

bratelefant commented 2 years ago

This can be fixed by a minor hack; there's also a Cordova plugin that automates this. Check this meteor forum thread for further details:

https://forums.meteor.com/t/mobile-app-generation-cordova-issues-with-2-5-1-solved/57199/24

rioadrian commented 2 years ago

Hi All, first of all thanks to @paulincai for share this incredible plugin so push notification become easy and possible in meteor. Just want to inform You that I have similar error when running android and it being solved by changing gradle 7.1.1 to 6.7.1 and trying running again with no problem. I hope it can help. And I also hoping for update so we can build on top of higer version gradle.

Screen Shot 2022-05-20 at 17 06 50

Thanks & Regards