caffeinalab / ti.goosh

GCM/FCM module for Titanium.
MIT License
52 stars 34 forks source link

Crash report #108

Closed Wingee closed 6 years ago

Wingee commented 6 years ago

ti.goosh.IntentService.parseNotification java.lang.NumberFormatException: For input string: "4d736e6c-759b-402d-a759-ef0e4ddc4d9d" IntentService.java, line 385

Package: *** Version: 1 Android: 8.0.0 Manufacturer: samsung Model: SM-G950F Date: Wed Jun 06 19:22:31 GMT+01:00 2018

java.lang.NumberFormatException: For input string: "4d736e6c-759b-402d-a759-ef0e4ddc4d9d" at java.lang.Integer.parseInt(Integer.java:608) at java.lang.Integer.parseInt(Integer.java:643) at com.google.gson.JsonPrimitive.getAsInt(JsonPrimitive.java:264) at ti.goosh.IntentService.parseNotification(IntentService.java:385) at ti.goosh.IntentService.onMessageReceived(IntentService.java:55) at com.google.android.gms.gcm.GcmListenerService.handleIntent(Unknown Source:202) at com.google.firebase.iid.zzc.run(Unknown Source:4) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764)

Wingee commented 6 years ago

I've done a bit more digging and I think this is caused if ID in the payload is not an integer. We're using a GUID which is crashing the app. Perhaps you could add this to the documentation that only integers are allowed in the ID field.

progress44 commented 6 years ago

Thanks @Wingee! I think the better choice would be to allow IDs that aren't just numeric.