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

NullPointer after recieving Push #36

Closed
inaffect-ag opened this issue Jan 18, 2017 · 3 comments
Closed

NullPointer after recieving Push #36

inaffect-ag opened this issue Jan 18, 2017 · 3 comments

Comments

@inaffect-ag
Copy link

inaffect-ag commented Jan 18, 2017

Hi
When i send a push with firebase console, i get an nullpointer exception:

[INFO] :   I/ti.goosh.IntentService: Not showing notification cause missing data.alert
[ERROR] :  TiApplication: (AsyncTask #1) [15040,15040] Sending event: exception on thread: AsyncTask #1 msg:java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.gson.JsonObject.has(java.lang.String)' on a null object reference; Titanium 6.0.1,2016/12/19 16:51,undefined
[ERROR] :  TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.gson.JsonObject.has(java.lang.String)' on a null object reference
[ERROR] :  TiApplication: 	at ti.goosh.IntentService.parseNotification(IntentService.java:122)
[ERROR] :  TiApplication: 	at ti.goosh.IntentService.onMessageReceived(IntentService.java:54)
[ERROR] :  TiApplication: 	at com.google.android.gms.gcm.GcmListenerService.zzq(Unknown Source)
[ERROR] :  TiApplication: 	at com.google.android.gms.gcm.GcmListenerService.zzp(Unknown Source)
[ERROR] :  TiApplication: 	at com.google.android.gms.gcm.GcmListenerService.zzo(Unknown Source)
[ERROR] :  TiApplication: 	at com.google.android.gms.gcm.GcmListenerService.zza(Unknown Source)
[ERROR] :  TiApplication: 	at com.google.android.gms.gcm.GcmListenerService$1.run(Unknown Source)
[ERROR] :  TiApplication: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
[ERROR] :  TiApplication: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
[ERROR] :  TiApplication: 	at java.lang.Thread.run(Thread.java:761)

any idea how i could work it out?
In firebase console I tried using the basic message as well as the advanced options adding key/value but with same outcome.

I'm using v.2.0 of the module.

@progress44
Copy link
Contributor

The firebase console doesn't send a data object which the module expects all the data to be in. I looked at the console a little but couldn't find a way to manipulate the payload therefore I don't think there's a way to make it work sending the notifications from the firebase console as of now

@inaffect-ag
Copy link
Author

thanks!

@sapfear
Copy link

sapfear commented Apr 22, 2017

Hello, you can send from firebase console additional params in users data

key: data
field: {datacontentfield: "1"}
screen shot 2017-04-22 at 11 27 45

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

2 participants