Skip to content

Push notifications sent via Parse Server break Parse.com Push dashboard #1325

Closed

Description

@leonluc-dev

Originally mentioned in (but unrelated to) Issue #1245.

Environment Setup

Node.JS 4.4
Python 2.7.11
Parse Server 2.2.4
Self hosted MongoDB 3.0.10-1.5 (Storage engine: Rocksdb)
Debian 8

Steps to reproduce

If you send a push notification using Parse Server the push dashboard at parse.com fails to list any push notification. It will just show a message "No pushes to display yet. You may need to configure push notifications for your app." for any page Parse Server created notifications are to be listed.

This happens only when Parse Server created entries in the _PushStatus collection are to be presented by the Parse.com dashboard. If there are no Parse Server created entries to be loaded (removed from database or on a different page) the push notification list will function normally.

Noteworthy thing regarding the _PushStatus entries is that the entries created by Parse.com have structural differences from those created by Parse Server. Is this intentional? (Could be related to this issue?)

I'm uncertain if this issue is related to the way Parse Server stores _PushStatus entries or the Parse.com dashboard itself.

Logs/Trace

_ParseStatus entry created by Parse.com:

{
    "_id" : "kMoQhCO2rU",
    "_created_at" : ISODate("2016-04-01T18:30:49.378Z"),
    "_updated_at" : ISODate("2016-04-01T18:30:50.526Z"),
    "source" : "cloud_code",
    "query" : "{\"channels\":{\"$in\":[\"news\",\"important\",\"all\"]}}",
    "payload" : "{\"alert\":\"OMITTED\",\"badge\":\"Increment\",\"title\":\"OMITTED\",\"uri\":\"OMITTED\"}",
    "status" : "succeeded",
    "numSent" : 1383,
    "pushHash" : "e8a4a7489d823f162462d1bb1affc0f6",
    "expansionDuration" : 0.866821775,
    "sentPerType" : {
        "js" : 0,
        "ios" : 576,
        "osx" : 0,
        "android" : 806,
        "winphone" : 0,
        "winrt" : 1,
        "embedded" : 0
    }
}

_ParseStatus entry created by Parse Server:

{
    "_id" : ObjectId("56fe7eee38b022d0112dd694"),
    "objectId" : "oKIqqyJqhJ",
    "pushTime" : "2016-04-01T14:00:14.879Z",
    "_created_at" : ISODate("2016-04-01T14:00:14.879Z"),
    "query" : "{\"channels\":{\"$in\":[\"All\",\"News\"]}}",
    "payload" : {
        "alert" : "OMITTED",
        "badge" : "Increment",
        "title" : "OMITTED",
        "uri" : "OMITTED"
    },
    "source" : "rest",
    "title" : null,
    "expiry" : null,
    "status" : "succeeded",
    "numSent" : 1068,
    "pushHash" : "b6a5d67fcf1ed82eb64e4978b375caf3",
    "_wperm" : [],
    "_rperm" : [],
    "numFailed" : 2,
    "sentPerType" : {
        "ios" : 347,
        "android" : 721
    },
    "failedPerType" : {
        "android" : 2
    }
}

The following errors appear in the browser console during loading of list containing Parse Server created entries:

Microsoft Edge

HTTP500: SERVER ERROR - The server encountered an unexpected condition that prevented it from fulfilling the request.
(XHR): GET - https://parse.com/apps/*OMITTED APP NAME*/push_notifications/?type=all
Origin https://dashboard.parse.com not found in Access-Control-Allow-Origin header.

Firefox
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://parse.com/apps/*OMITTED APP NAME*/push_notifications/?type=all. (Reason: CORS header 'Access-Control-Allow-Origin' missing).1 Source:<unknown>

Chrome
XMLHttpRequest cannot load https://parse.com/apps/*OMITTED APP NAME*/push_notifications/?type=all. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://dashboard.parse.com' is therefore not allowed access. The response had HTTP status code 500.

Activity

  1. hramos commented on Apr 1, 2016

    @hramos
    Contributor

    Thanks for the detailed description. Given the nature of Parse Server, it is not unexpected that actions performed in Parse Server can have different results when going back to Parse.com.

    I would recommend that you switch to parse-dashboard for your dashboard needs, especially now that it supports sending push notifications.

    Closing as this can be worked around by using the open sourced dashboard.

  2. leonluc-dev commented on Apr 2, 2016

    @leonluc-dev
    Author

    I was still using the Parse.com dashboard for push notification history since the open sourced dashboard doesn't show push history yet when connected to a Parse Server instance. (It just shows the ability to send them)

  3. hramos commented on Apr 2, 2016

    @hramos
    Contributor

    Fair enough. If you will depend on the push history feature, I would suggest using Parse.com exclusively to send the push notifications. While we are doing our best to avoid breaking changes when migrating from Parse.com to Parse Server, we are not prioritizing issues that may arise from moving in the reverse direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions