Latest master
I reviewed one picture which was a great picture with everything perfect, I chose the thank the uploader.
I sent my log file, it might contain relevant information.
Please first try to reproduce the issue, then post the logcat here.
sure I am trying to reproduce the issue @nicolas-raoul
I tried to reproduce the issue and it went right so I think there might be some problem with the contributor's account because of which he was unable to receive the"Thanks" and because of which I think it was showing "failure".

@chaytanyasinha
Thank you for testing!
Would you mind working on #2744? And if you ever see "Sending Thanks: Failure", please immediately take a logcat and post it here :-)
Thanks @nicolas-raoul for assigning me new issues
By the way the other issue #2744 says even if it says "success", thanks is not being sent. @chaytanyasinha are you sure it worked for you?
Yes @neslihanturan,Initially I thought it worked but later I came to know about the issue #2744 .
Then I tried to send "nomination for deletion" for a picture uploaded by my friend for testing purpose and it worked for me then I am thinking to go through the api of "thanks" thing because that's where I guess the problem is happening.

Hi, is this issue assigned to @chaytanyasinha in the end ? We are a team who want to work on this project and have been redirected to this issue.
I have replicated the bug, here is the logcat :
2019-11-26 10:41:31.376 9406-9481/fr.free.nrw.commons.beta E/NativeCrypto: ssl=0x78ac48aac0 cert_verify_callback x509_store_ctx=0x7897f00788 arg=0x0
2019-11-26 10:41:31.376 9406-9481/fr.free.nrw.commons.beta E/NativeCrypto: ssl=0x78ac48aac0 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_RSA
2019-11-26 10:41:31.583 9406-9463/fr.free.nrw.commons.beta E/NativeCrypto: ssl=0x78ac4872c0 cert_verify_callback x509_store_ctx=0x78986b5a68 arg=0x0
2019-11-26 10:41:31.583 9406-9463/fr.free.nrw.commons.beta E/NativeCrypto: ssl=0x78ac4872c0 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_ECDSA
2019-11-26 10:41:31.588 9406-9453/fr.free.nrw.commons.beta E/NativeCrypto: ssl=0x78ac642540 cert_verify_callback x509_store_ctx=0x7898a07e38 arg=0x0
2019-11-26 10:41:31.588 9406-9453/fr.free.nrw.commons.beta E/NativeCrypto: ssl=0x78ac642540 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_RSA
2019-11-26 10:41:31.601 9406-9455/fr.free.nrw.commons.beta E/NativeCrypto: ssl=0x78ac486bc0 cert_verify_callback x509_store_ctx=0x7898902da8 arg=0x0
2019-11-26 10:41:31.601 9406-9455/fr.free.nrw.commons.beta E/NativeCrypto: ssl=0x78ac486bc0 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_RSA
2019-11-26 10:41:31.687 9406-9497/fr.free.nrw.commons.beta E/NativeCrypto: ssl=0x78ac642a80 cert_verify_callback x509_store_ctx=0x7896a02e68 arg=0x0
2019-11-26 10:41:31.687 9406-9497/fr.free.nrw.commons.beta E/NativeCrypto: ssl=0x78ac642a80 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_RSA
2019-11-26 10:41:51.563 9406-9406/fr.free.nrw.commons.beta E/ContributionsFragment: onFragmentResumed fr.free.nrw.commons.contributions.ContributionsListFragment
2019-11-26 10:42:53.543 9406-9592/fr.free.nrw.commons.beta E/NativeCrypto: ssl=0x7898f4fa80 cert_verify_callback x509_store_ctx=0x78954f83d8 arg=0x0
2019-11-26 10:42:53.543 9406-9592/fr.free.nrw.commons.beta E/NativeCrypto: ssl=0x7898f4fa80 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_ECDSA
2019-11-26 10:44:31.669 9406-9661/fr.free.nrw.commons.beta E/NativeCrypto: ssl=0x78ac6460c0 cert_verify_callback x509_store_ctx=0x7893ef3828 arg=0x0
2019-11-26 10:44:31.669 9406-9661/fr.free.nrw.commons.beta E/NativeCrypto: ssl=0x78ac6460c0 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_RSA

Android 7, API 24, on my tablet
After re-replicating the issue, i have a clean logcat, so the previous one might be related to something else.
Also it seems consistent replicating it like that :
-> Go to review section
-> Skip all images until a good one comes
-> Validate all conditions for the image
-> Thank the contributor.
This seems to replicate the bug consistently
The only line I have in logcat (warnings) is :
2019-11-26 10:57:57.084 9406-9465/fr.free.nrw.commons.beta W/libEGL: [ANDROID_RECORDABLE] format: 1
This issue will be discussed under #2744
@SamuelleMollard
This seems to replicate the bug consistently
Just to be sure: You can reproduce the bug consistently even when the Internet is reachable during the whole length of the test? You don't cut the WiFi nor switch to airplane mode during the reproduction steps, right?
@neslihanturan I think there are two separate problems:
Both must be fixed. Please reopen if you agree :-)
I would suggest reopening this issue and having Samuelle work on it, while Chaytanya works on #2744 :-)
Oh okay I missed the connectivity issues part, sorry for inconvenience. This one is yours @SamuelleMollard :)
Very well, I will try to solve that tomorrow and this weekend
I didn't see your comment sorry.
Yes, i did reproduce it while keeping WiFi up for the whole length of the test.
Hum, I have been looking through the code to try and understand what is happening, but I am not sure what org.wikipedia.dataclient.Service is, nor where I can find it. So far it seems that service.thank(String.valueOf(revisionId), null,
csrfTokenClient.getTokenBlocking(),
CommonsApplication.getInstance().getUserAgent()) raises an exception, and I don't have my computer with me now so i can't experiment and look at which one, though I will do that soon, but i can't get what 'service' is. I have found that https://github.com/wikimedia/apps-android-wikipedia/blob/master/app/src/main/java/org/wikipedia/dataclient/Service.java, but if this is really the Service interface, it does not expose any thank method. Can somebody confirm that sending thanks ever worked, or give me a direction to a repo/doc where I could find out what is happening to service ? I have been looking at the wiki on github, but I can't seem to find an API matching what I am looking for.
Thanks in advance
Thanks for investigating!
Please reproduce the problem in debug mode from Android Studio (you will need a computer for that). When the thank method is called, navigate the stack to see how this method behaves.
The Service method must come from one of the libraries linked to in https://github.com/commons-app/apps-android-commons/blob/master/app/build.gradle
OK, I have a problem. My breakpoint did not work, Android Studio's message is :
No executable code found, suspend thread
I must say that I am a little bit lost here, can someone help me with what that all means ?
I have this log :
android-common-error-log.log
I also appear to have a lot of warnings
android-common-warn-log.log
Well, I got the debugger to work, though I haven't figured the bug out. I can't find a way to understand what this "Service" is, and it is probably the one sending a failure since everything else seem to work fine.
I think I am going to give up on this issue, since it seems very related to #2744 and I can't get to make progress, I am a bit lost here, and we have to make a pr within a week. Does @nicolas-raoul have a 'good first issue' he wants to give me ? Otherwise I will pick one up and work on it.
Thanks for your investigation!
Sure, how about https://github.com/commons-app/apps-android-commons/issues/2803 ?
Seems good, thanks.
I will try and work on it when I find time, probably tomorrow afternoon