Condition notification through rest not working..

144 views
Skip to first unread message

Rodolfo hernandez

unread,
Sep 24, 2016, 8:15:49 AM9/24/16
to Firebase Google Group
The device is getting messages even when is not registered in the topic..


{
  "applicationVersion": "1.0",
  "connectDate": "date",
  "application": "app",
  "scope": "*",
  "authorizedEntity": "17984284",
  "rel": {
    "topics": {
      "topic": {
        "addDate": "date"
      },
      "top": {
        "addDate": "date"
      }
    }
  },
  "connectionType": "WIFI",
  "platform": "platform"
}

and when I do:


{
  "condition":"'test' in topics",
  "notification": {
  "title": "title",
     "body":"hello"
  },
  "priority": "HIGH"
}

The device is getting the message... This should not happen.
By the other hand If I do the send with "to": "/topics/test" the device don't get any notification.


Kato Richardson

unread,
Sep 26, 2016, 12:15:36 PM9/26/16
to Firebase Google Group
Hi Rodolfo,

There's only one topic here so it's unclear if you need a `condition`. Out of curiosity, do you get the same result if you use `"to": "/topics/test"`? Have you tried unregistering the device from the given topic to be certain?

If none of that helps, can you include steps to reproduce and version info here please?

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/e6dcd905-03cc-4bba-b261-d7a6133d3ede%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Rodolfo hernandez

unread,
Sep 27, 2016, 12:11:25 AM9/27/16
to Firebase Google Group
Hi Kato.

Yes, what I want to point out is the different behavior between condition: "'test' in topics" and to: "/topics/test", when using condition the phone get a notification ( as if it is registered in that topic ), and when using toTopic the device doesn't get any notification ( which is OK ). 
Please note that 'test' doesn't appear in the list of topics for that token

I just realized the error by accident, when testing the following condition: "'test' in topics && 'top' in topics", the device was receiving notifications even when It wasn't registered in 'test' topics as shown in the info response. ( so, yes I need to use condition )

I'm not sure how to reproduce the error. I have been registering and unregistering the 'test' topic for the token a lot of times while developing. The base actions have been batchAdd  and batchRemove.

Which version do you need?

I'm getting the token from the client, and I registering the token to topics thru the API.

Thanks ( I will update as soon as I get the error reproduced )
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/e6dcd905-03cc-4bba-b261-d7a6133d3ede%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kato Richardson

unread,
Sep 27, 2016, 12:34:10 AM9/27/16
to Firebase Google Group
Hi Rodolfo,

Thanks for this. We probably just need to know the topic (i.e. test in this case), the device id that you're seeing the behavior on, the device make/manufacturer/os version, and your Firebase SDK version.

☼, Kato

To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Rodolfo hernandez

unread,
Sep 28, 2016, 10:37:18 AM9/28/16
to Firebase Google Group
Ok, this is very weird, seems like the token has some kind of issue or...

Steps to reproduce:


Now, everythings says {} 200 .. the details for the tokens says that newTest topic is not registered.

However, if in this moment if I do condition: "'newTest' in topics", the device receive a notification.

The device Token: cUxtPBv9En0:APA91bHrwBSiRIaVhuOT2Tl-vku_H89SzEic1Nsz2qAAFIHi-370VrSE1eWBUNzqhhdLqa1dDElDkiDIwO4tc8D1i_F-CnWfXyOCovEQ95scLAcwhqfPTtIkWNHWMF_wAgdAJUocFgs3
Is a Iphone 5th generation. I dont have the sdk version right now ( I will update asap )

Thanks.

Kato Richardson

unread,
Sep 28, 2016, 12:32:18 PM9/28/16
to Firebase Google Group
That does seem odd. I'll file a bug internally to have a look at this and see if there's an explanation. Thanks for the details!

Obviously, I'd stick with `to:` in this case over `contains:` as a workaround. : /

☼, Kato

To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Rodolfo hernandez

unread,
Sep 28, 2016, 6:30:59 PM9/28/16
to fireba...@googlegroups.com
Using "toTopic" instead of "condition" drives me to code implicit conditions in topic name, however, I will wait for an update on this.

Thanks a lot Kato.

--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/ScHnkQrWSYk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

Rodolfo hernandez

unread,
Oct 10, 2016, 3:45:13 PM10/10/16
to Firebase Google Group
Do you guys have an update on this ? have you been able to verify the issue ?

Thanks.
Reply all
Reply to author
Forward
0 new messages