Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications not sent from Google App Engine backend #11

Closed
lmgagne opened this issue Jul 3, 2017 · 13 comments
Closed

Notifications not sent from Google App Engine backend #11

lmgagne opened this issue Jul 3, 2017 · 13 comments

Comments

@lmgagne
Copy link

lmgagne commented Jul 3, 2017

Hello,

How can you see whether or not the message was sent and acknowledged properly? The integration works as we are able to send messages directly from the firebase messaging page. However, we do not get any messaging while trying to send messages from the backend (based on Google App Engine).

How can we troubleshoot this? Is the only way to get this info through Google Play Console? If so, is it mandatory to publish the app or there is any other way around?

Thanks.

@lmgagne lmgagne changed the title Statistics, Loggin, etc... Notifications not received on mobile Jul 3, 2017
@Raudius
Copy link
Owner

Raudius commented Jul 12, 2017

Can you confirm that you are using version 1.0.2?

There was an issue with version 1.0.1 where notifications were not sent correctly.

@lmgagne
Copy link
Author

lmgagne commented Jul 15, 2017 via email

@Raudius
Copy link
Owner

Raudius commented Jul 15, 2017

I will look into the issue this coming week. Could you perhaps post some code showing how you are sending the notification through Pushraven so I can try to replicate the issue?

@lmgagne
Copy link
Author

lmgagne commented Jul 15, 2017 via email

@Raudius
Copy link
Owner

Raudius commented Jul 15, 2017

That should work.

I believe you should be able to check through the firebase console what messages have gotten through to the API. If they appear on the console then you should check if the notifications reception is being handled correctly. Otherwise it could very well be an issue with Pushraven and I will investigate further.

@lmgagne
Copy link
Author

lmgagne commented Jul 15, 2017

This is it... I do not see messages coming in.
This snippet of code does not throw any error.

@Raudius
Copy link
Owner

Raudius commented Jul 15, 2017

I am still not sure what the issue is. Can you print out the response you get from the push?

System.out.println( Pushraven.push() );

@lmgagne
Copy link
Author

lmgagne commented Jul 18, 2017

Here is the error I get:
com.google.api.server.spi.SystemService invokeServiceMethod: exception occurred while calling backend method (SystemService.java:398) java.lang.NullPointerException at us.raudi.pushraven.FcmResponse.getResponseCode(FcmResponse.java:32) at us.raudi.pushraven.FcmResponse.toString(FcmResponse.java:92)

I used a fake device fcm id. Could this has anything to do? Is FCM doing some sort of device FCM id validation? If so, why would the push() method return a NPE?

@kubaguzik77
Copy link

Hello,

I use Google App Engine (Standard Java Environment) and the same error occurs in my project. I am using version 1.0.2.

NullPointerException is thrown in line 32 of FcmResponse after I call FcmResponse.getResponseCode().

If it is a bug I'd also appreciate some fixes, because I did not manage to send any push notification from my server.

@Raudius
Copy link
Owner

Raudius commented Jul 18, 2017

I am not too familiar with the Google App Engine, but after delving into some of the Documentation I found this:

https://cloud.google.com/appengine/docs/standard/java/issue-requests

It seems that if you are under the "free quota" you must add the setting "urlfetch" to "appengine-web.xml", so it handles request-calls using the urlfetch methods.

If you are not under the "free quota" or using the Java 7 runtime, then there should be no issues using the native methods.

Although I am not at all familiar with how Google App Engine works, I hope this helps clear the issue.

@jeffmwells
Copy link

I had this same issue until i removed the .dry_run(true) call.

@Raudius
Copy link
Owner

Raudius commented Jul 24, 2017

@kubaguzik77 @lmgagne

Can you let me know if you managed to fix the issue with the appengine-web.xml edit?

If not I will look into what else the issue might been.

@Raudius Raudius changed the title Notifications not received on mobile Notifications not sent from Google App Engine backend Jul 24, 2017
@lmgagne
Copy link
Author

lmgagne commented Jul 25, 2017 via email

@Raudius Raudius closed this as completed Oct 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants