jnbt/candy_check

Errno::ECONNRESET (Connection reset by peer - SSL_connect):

Closed this issue · 3 comments

I'm getting a Connection reset by peer when running verify_subscription

      verifier = CandyCheck::AppStore::Verifier.new(config)
      secret = Rails.application.credentials.appstore_secret
      verifier.verify_subscription(receipt_data, secret)

This is happening in the sandbox environment for the app store. Any thoughts on what might be happening?

I have the same issue, and there's nothing we can do about it, the appstore sandbox is just extremely buggy. Just resend the request until it is accepted. In production, with real credit card, it works all the time

jnbt commented

I can confirm this observations. The sandbox is very unreliable. But even for production the application should handle these scenarios, because there might be a network failure.

What we're typically are doing is to but these kind of verifications into a queue or asynchronous task, which can be restarted with some exponential backoff algorithm.