Page MenuHomePhabricator

Error on iOS App Donate Page
Open, HighPublicSpike

Description

Steps to replicate the issue (include links if applicable):
While trying to reproduce the duplicate payment issue on T407383, I came across this bug I think may/may not be related to the issues reported.


The first 2 test Apple Pay donations I made were successful, I was redirected to the last article I was reading and the thank you toast was shown at the bottom of the page.

I tried to make a google pay donation but the button did not render on the inapp browser, so I cancelled and attempted another test Apple Pay transaction. It was successful, I was redirected to the search page but the toast did not show up.

Going back to the donate page I saw the missing toast from the last transaction. I tried another transaction to confirm the pattern, but its been giving errors since then. The first error had a code 1005 “The network connection was lost” and subsequent errors say Decoding error key not found. Please see attached images.

What happens?:

internet_connection_error.PNG (2×1 px, 358 KB)

IMG_9377.PNG (2×1 px, 613 KB)

What should have happened instead?:
Payment should complete with no errors

Software version:
iOS App 7.8.5 (5873)

Other information:
iOS 26.1

Engineering Notes:

Some payments can take up to 33 seconds, and it looks like Apple Native Payments have an internal timeout of 30 seconds. (link), and this seems to be the case in simulations as well.

We would need to add an early fake success around here.

Care would need to be made to ensure that if submitPayment does complete in a reasonable amount of time, code within the case .success: is still executed.

Event Timeline

Restricted Application changed the subtype of this task from "Bug Report" to "Spike". · View Herald TranscriptTue, Dec 2, 6:35 PM

My findings:

UI Bug

We definitely have a UI bug where the thank you toast sometimes displays behind the bottom tab bar. We should look into that, because a user may think it wasn't successful even if it was. To trigger:

  • Go to dev settings and enable "bypass donation"
  • Go to Search > Profile > Donate, make a native payment.
  • Upon success, success toast displays underneath the bottom tab bar (on iPhone, I haven't tested on iPad).

Timeout

internet_connection_error (1).PNG (2×1 px, 358 KB)

The screenshot here just looks like a network connection error, I was able to reproduce with a slow connection speed. We can try extending the timeout interval just for this submitPayment network call.

Rate limiting

IMG_9377.PNG (2×1 px, 613 KB)

We are rather strictly expecting the API response to at least have this information:

{
  "response": {
    "status": "success",
  }
}

If it is not structured like this, or "status" != "success", it will appear like a failure. I actually was able to trigger this error. Upon inspecting the submitPayment API response, it looks like this: {}. I think this may be due to rate limiting though (the call was made at 17:35 CST). @Damilare Is it possible you ran into the rate limiting when seeing this error?

Hi @Tsevener, thanks for looking into this. Yes, I think the second error is possibly a rate limit, I was able to debug the request using a proxy and saw the empty response as well. The error displayed on the page made it a bit confusing, as I couldn't tell if it was evidence of the other issue we are looking to debug.

HNordeenWMF renamed this task from Error on iOS App Donate Page to [Spike] Error on iOS App Donate Page.Tue, Dec 9, 6:15 PM
Tsevener renamed this task from [Spike] Error on iOS App Donate Page to Error on iOS App Donate Page.Thu, Dec 11, 9:53 PM
Tsevener removed a project: Spike.
Tsevener updated the task description. (Show Details)

I am repurposing this spike into concrete directions for longer network calls (see Engineering Notes). Note I believe I fixed the UI bug by increasing our toast display delay in this PR. It has been merged and will be in our 7.8.7 release (submitted for review today).