iOS push notification settings are not getting saved on form submission

Hello!

When submitting the data in the iOS section of push notification settings form (the one at `dashboard#/<app_id>/manage/apps`), I get the toast message saying "Changes saved successfully!", however the iOS portion of the form gets cleared even though both Firebase (FCM) key (in android section) and rate limit fields persist their original data.

When doing `db.apps.find()` in mondodb shell, I see the firebase key and rate limit settings, but it seems the iOS data is not getting persisted in DB at all:

```
> db.apps.find()
{ "_id" : ObjectId("5f99b529c8a5ec6a63dcdf33"), "name" : "xxxxxxxxxxx", "country" : "FR", "type" : "mobile", "timezone" : "Europe/Paris", "category" : "6", "created_at" : 1603908905, "edited_at" : 1603908905, "owner" : "5f9996ca6474436a3e82a1f8", "seq" : 2, "key" : "86eca7f246408f802b09a99636c2d78843314f00", "plugins" : { "api" : { "safe" : false, "send_test_email" : "", "session_duration_limit" : 999, "city_data" : true, "event_limit" : 500, "event_segmentation_limit" : 100, "event_segmentation_value_limit" : 1000, "metric_limit" : 1000, "session_cooldown" : 15, "total_users" : true, "prevent_duplicate_requests" : true, "metric_changes" : true }, "push" : { "a" : { "_id" : "5fa17c2c9570d46a693cd058", "key" : "AAAAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "ehelp" : "", "type" : "fcm" }, "i" : { }, "rate" : { "period" : 1, "rate" : 99999 } } }, "sdk_version" : "20.04.9" }
```


Here is how the body of request sent to `/i/apps/update/plugins` when submitting the form looks.
```
{"push":{"i":{"type":"apn_token","key":"UL8BXXXXXX","team":"LR76XXXXXX","bundle":"app.xxxxxxxxxx","file":"data:application/pkcs8;base64,LS0tXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","fileType":"p8"},"a":{"_id":"5fa17c2c9570d46a693cd058","key":"AAAAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","ehelp":""},"rate":{"rate":99999,"period":1}}}
```

And this is the response I get:
```
{"_id":"5f99b529c8a5ec6a63dcdf33","plugins":{},"result":""}
```

What can be the cause of this?

Thanks in advance.

0

Comments

5 comments
  • Official comment

    Hello Dmytro

    Thank you for reaching out.

    This was a temporary issue and has been fixed with the latest release.

    We would suggest you to please upgrade to the latest Countly version - 20.11

     

    Hope that helps. 

    Comment actions Permalink
  • Hello, after your message I checked the release notes and noticed the issue seems to be file system related.

    I asked my colleague on macOS to upload the file and sumbit the form and it's alright for him. All the settings persisted on the server.

    After that we updated countly to 20.11, and I tried to resubmit the form. Now I get the "Something went wrong" modal. With message "Couldn't update plugin: Push: certificate must be in P12 or P8 formats". 

    I asked my colleague to upload the file again and resubmit the form, and he doesn't recieve such an error.

    I'm on linux and my file system is ext4, if that would be of any help for trying to reproduce the issue.

    Anyway thank you for your reply. At least this issue isn't blocking us anymore.

    0
    Comment actions Permalink
  • Hello Dmytro

    Please share the server logs so we can look into the matter further.

     

    0
    Comment actions Permalink
  • Hello Yash.

    The following line gets added to the 'api Log'.


    2020-11-12T14:32:48.163Z: ERROR	[mgmt:apps]	Error during plugin config updates for app 5f99b529c8a5ec6a63dcdf33: "Push: certificate must be in P12 or P8 formats" string, 46
    0
    Comment actions Permalink
  • Hello Dmytro

     

    Our Dev team is looking into it, This seems to be a one-off issue.

    We thank you for your feedback.

     

    Best Regards.

    0
    Comment actions Permalink

Please sign in to leave a comment.