Skip to content

GCM push notifications restricted by DNS record/IP #1994

Closed
@zgc7009

Description

@zgc7009

Describe your issue in as much detail as possible.

Note: DNS record and IP are interchangeable in our situation. We would like this to work specifically with DNS records, so it will be what we use. We are not sure this is a Parse issue but thought it was worth posting. Obviously, if it is a non-Parse issue feel free to close.

Due to the impact this migration can have on our clients, we are hoping to do a rollout of our application. To do this, we have asked a number of our clients to utilize the web portion of our app from a beta formatted DNS that is pointed to our Parse server while others continue to use the old DNS record that is pointed to the Parse maintained server, while both servers are pointing to the same mLab DB. Posting a message through the web app should trigger a push notification to the mobile applications. As a note, we do not plan on ever pointing our mobile apps to the beta DNS record, once we are done testing everything is going to get associated with the current live DNS record. The problem we are having is that GCM push notifications are only being received if the message is posted from the web app pointing to the same DNS record that the application itself is pointed at. For example, messages posted on our live web app are successfully pushing notifications to the Android app which is also pointed to live DNS record but if we attempt to post a message from the beta web app, the message will never get to the Android app that is pointed to the live DNS record.

Steps to reproduce

Please include a detailed list of steps that reproduce the issue. Include curl commands when applicable.

Note: this is a unique situation, the creation process would be fairly in depth

  1. Create an Android app and setup the GCM with Google Play
  2. Initialize the Android app with an official Parse server (using Parse.com’s GCM credentials)
  3. Host Cloud Code in /cloud directory of open source Parse-Server instance
  4. Point both Parse servers to a single Mongo database
  5. Call Parse.Push.send({ ... }, {useMasterKey: true}) within the Cloud Code

Expected Results

All mobile users will receive a push notification that a message was posted from the web app to the Parse server.

Actual Outcome

The push appears to go out, iOS even successfully gets the push, but Android does not receive the push notification.

Environment Setup

  • Server
    • parse-server version: 2.2.0
    • Operating System: Amazon Linux AMI, Windows Server 2012 R2 AMI
    • Hardware: t2.large (2 vCPU, 8 Mem(GiB))
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): AWS (EBS)
  • Database
    • MongoDB version: 3.0.11
    • Storage engine: MMAP
    • Hardware: M1 Cluster (1.7 GB RAM, 40 GB SSD storage)
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): mLab

      Logs/Trace

You can turn on additional logging by configuring VERBOSE=1 in your environment.

  • No relevant log seen

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