Skip to content

SignatureDoesNotMatch: Signature expired: 20161010T120646Z is now earlier than 20161010T151154Z (20161010T152654Z - 15 min.) #1174

@OrZipori

Description

@OrZipori

hello,

I'm using the AWS SNS for sending push notifications for iOS and android devices.
Currently I'm working on the android version of my app, and when I try to use the AWS SNS for registering endpoints to my platform application I get :
SignatureDoesNotMatch: Signature expired: 20161010T120646Z is now earlier than 20161010T151154Z (20161010T152654Z - 15 min.)

Now, the iPhone app is almost done, and I didn't get that error when working on the iPhone version.
I'm using the same credentials, meaning, same IAM user which has two policies attached to him.
One for APNS and one for GCM (Firebase).

I use the same Mac to work on both apps, so it's the same time zone. Why it doesn't work, please?

Thanks.

The error occurs here (marked with double stars) :

var params = {
  PlatformApplicationArn: my application, /* required */
  Token: data.registrationId, /* required */
  CustomUserData: 'OrUser',
  Attributes: {
    Enabled: 'true',
  }
};
**sns.createPlatformEndpoint(params, function(err, data)** {
  if (err) {
    console.log(err,err.stack); // an error occurred
  }
  else {
    console.log(data);           // successful response
    localStorage.setItem('EndPointARN', data.EndpointArn); // Store localy
    registerDeviceOnServer(localStorage.getItem('registrationId'), localStorage.getItem('EndPointARN'));
  }
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    guidanceQuestion that needs advice or information.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions