• Resolved will_brett

    (@will_brett)


    Hi there,

    I have a flutter application which is using FCM for push notifications.

    When I sent a push notification from the firebase dash it does display in app.

    However when I send a test messaging from this plugin I get the following errors:

    {“headers”:{},”body”:”{\”error\”:\”InvalidParameters: Bad topic or filter provided\”}”,”response”:{“code”:200,”message”:”OK”},”cookies”:[],”filename”:null,”http_response”:{“data”:null,”headers”:null,”status”:null}}

    perhaps I am setting the plugin settings up wrong.

    I have used my firebase project server key for api key. The topic that is configured in the app which in my case is: “One Track Mind Magazine”

    for application channel I added this code to my android manifest:

    <meta-data android:name=”com.google.firebase.messaging.default_notification_channel_id”
    android:value=”app_channel”/>

    and I’m using “app_channel” as channel name.

    Any ideas what I am doing wrong?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter will_brett

    (@will_brett)

    Quick update:

    I changed my topic name to “otm_mag” to see if the issue was caused by upper case or spaces and this has made a change. I’m now getting the following response from the test push:

    {“headers”:{},”body”:”{\”message_id\”:8281251672685649131}”,”response”:{“code”:200,”message”:”OK”},”cookies”:[],”filename”:null,”http_response”:{“data”:null,”headers”:null,”status”:null}}

    Still not push notification showing in-app and I can’t see the test message in the firebase cloud messaging console.

    Plugin Author Paulo Miranda

    (@dprogrammer)

    HI,

    I used the test option of the plugin and everything is ok

    Notification received on smartphone

    View post on imgur.com

    Test result

    View post on imgur.com

    API Return
    {“headers”:{},”body”:”{\”message_id\”:4446721866611171484}”,”response”:{“code”:200,”message”:”OK”},”cookies”:[],”filename”:null,”http_response”:{“data”:null,”headers”:null,”status”:null}}

    I think that the notifications sent are not recorded in the console.

    Plugin Author Paulo Miranda

    (@dprogrammer)

    HI,

    I found this, but I didn’t see any comments on Firebase pages

    https://stackoverflow.com/questions/42790940/save-notification-in-console-on-use-rest-api

    Thread Starter will_brett

    (@will_brett)

    Still not getting any notifications appearing in the app when I send the test though.

    Not sure if I’ve missed a step somewhere. Can’t work out how to debug either as there seems to be no errors but nothing coming through to the app.

    Thread Starter will_brett

    (@will_brett)

    Quick update.

    I’ve tested this on a live device rather than a simulator and it is infact working. Not sure why it’s not working on simulator but hey ho.

    Great plugin. Could possibly do with a little more documentation though.

    Plugin Author Paulo Miranda

    (@dprogrammer)

    Thank you @will_brett

    I will improve the documentation.

    I’ll see if I create an example in flutter too.

    Thanks for the feedback

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘InvalidParameters: Bad topic or filter provided’ is closed to new replies.