Skip to content

Conversation

benishak
Copy link

@benishak benishak commented Aug 3, 2016

Amazon SNS will set Endpoint to false when a notification service indicates to Amazon SNS that the endpoint is invalid even if it temporarily fail. We need to set it back to true

@benishak benishak changed the title Re-Enable Endpoints before sending push Re-Enable Endpoints before sending push and allow sending push to Topic Aug 3, 2016
@rogerhu
Copy link
Collaborator

rogerhu commented Aug 19, 2016

Tests are failing:

1) SNSPushAdapter can send SNS Payload
  Message:
    Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
  Stack:
    Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
        at Timer.listOnTimeout (timers.js:92:15)
2) SNSPushAdapter errors sending SNS Payload to Android and iOS
  Message:
    Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
  Stack:
    Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
        at Timer.listOnTimeout (timers.js:92:15)
3) SNSPushAdapter can send to APNS with multiple identifiers
  Message:
    Expected undefined to equal '{"APNS_SANDBOX":"{}"}'.
  Stack:
    Error: Expected undefined to equal '{"APNS_SANDBOX":"{}"}'.
        at /home/travis/build/parse-server-modules/parse-server-sns-adapter/spec/SNSPushAdapter.spec.js:388:34
        at process._tickDomainCallback (node.js:407:9)

Is the right action to re-enable right away? Are there better errors to distinguish between a network error, bad cert, etc.?

@flovilmart
Copy link
Contributor

Are they passing on your machine? Also hosting the tests to report the errors would be noce

@benishak
Copy link
Author

I didn't write the test thats why it is failing. I will try to change it when I got time. Otherwise I'm already using this on production and work as expected.

It is not necessary to check the cause of disabling the endpoint as if it would fail again you will get an error back. You need to reenable it to know what cause the failing

@flovilmart
Copy link
Contributor

If the tests are failing, it's usually because that something that wasn't supposed to change mas changed....

@benishak
Copy link
Author

Yeah the callback inside sendToSNS has changed. The old callback is being executed insode another callback that enable the endpoint.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants