Apps-android-commons: A particular failed upload has no visible caption, retries fail

Created on 23 Dec 2020  路  3Comments  路  Source: commons-app/apps-android-commons

Screenshot_20201223-084533_Commons
Context: Usually when an upload fails, its caption is visible, and pushing "Retry" succeeds 99% of the time.
Problem: With this one, no caption, and on rertry it always shows the progress bar progressing until the end but then fails, with this error in logcat:

12-23 08:52:38.312 25783 27523 E UploadService: Error occurred in uploading file from stash
12-23 08:52:38.312 25783 27523 E UploadService: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.wikipedia.dataclient.mwapi.MwServiceError.getDetails()' on a null object reference
12-23 08:52:38.312 25783 27523 E UploadService:     at java.lang.String.valueOf(String.java:2896)
12-23 08:52:38.312 25783 27523 E UploadService:     at java.io.PrintWriter.println(PrintWriter.java:754)
12-23 08:52:38.312 25783 27523 E UploadService:     at java.lang.Throwable$WrappedPrintWriter.println(Throwable.java:756)
12-23 08:52:38.312 25783 27523 E UploadService:     at java.lang.Throwable.printStackTrace(Throwable.java:648)
12-23 08:52:38.312 25783 27523 E UploadService:     at java.lang.Throwable.printStackTrace(Throwable.java:713)
12-23 08:52:38.312 25783 27523 E UploadService:     at timber.log.Timber$Tree.getStackTraceString(Timber.java:547)
12-23 08:52:38.312 25783 27523 E UploadService:     at timber.log.Timber$Tree.prepareLog(Timber.java:528)
12-23 08:52:38.312 25783 27523 E UploadService:     at timber.log.Timber$Tree.e(Timber.java:455)
12-23 08:52:38.312 25783 27523 E UploadService:     at timber.log.Timber$1.e(Timber.java:313)
12-23 08:52:38.312 25783 27523 E UploadService:     at timber.log.Timber.e(Timber.java:88)
12-23 08:52:38.312 25783 27523 E UploadService:     at fr.free.nrw.commons.upload.UploadClient.lambda$uploadFileFromStash$3$UploadClient(UploadClient.java:239)
12-23 08:52:38.312 25783 27523 E UploadService:     at fr.free.nrw.commons.upload.-$$Lambda$UploadClient$-xVSLroq3t059tyyfYuDUQukbVk.apply(Unknown Source:4)
12-23 08:52:38.312 25783 27523 E UploadService:     at io.reactivex.internal.operators.observable.ObservableMap$MapObserver.onNext(ObservableMap.java:57)
12-23 08:52:38.312 25783 27523 E UploadService:     at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:51)
12-23 08:52:38.312 25783 27523 E UploadService:     at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:37)
12-23 08:52:38.312 25783 27523 E UploadService:     at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:44)
12-23 08:52:38.312 25783 27523 E UploadService:     at io.reactivex.Observable.subscribe(Observable.java:12267)
12-23 08:52:38.312 25783 27523 E UploadService:     at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:34)
12-23 08:52:38.312 25783 27523 E UploadService:     at io.reactivex.Observable.subscribe(Observable.java:12267)
12-23 08:52:38.312 25783 27523 E UploadService:     at io.reactivex.internal.operators.observable.ObservableMap.subscribeActual(ObservableMap.java:32)
12-23 08:52:38.312 25783 27523 E UploadService:     at io.reactivex.Observable.subscribe(Observable.java:12267)
12-23 08:52:38.312 25783 27523 E UploadService:     at io.reactivex.internal.operators.observable.ObservableDoOnEach.subscribeActual(ObservableDoOnEach.java:42)
12-23 08:52:38.312 25783 27523 E UploadService:     at io.reactivex.Observable.subscribe(Observable.java:12267)
12-23 08:52:38.312 25783 27523 E UploadService:     at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.subscribeInner(ObservableFlatMap.java:165)
12-23 08:52:38.312 25783 27523 E UploadService:     at io.reactivex.internal.operators.observable.ObservableFlatMap$MergeObserver.onNext(ObservableFlatMap.java:139)
12-23 08:52:38.312 25783 27523 E UploadService:     at io.reactivex.internal.operators.observable.ObservableDoFinally$DoFinallyObserver.onNext(ObservableDoFinally.java:80)
12-23 08:52:38.312 25783 27523 E UploadService:     at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:201)
12-23 08:52:38.312 25783 27523 E UploadService:     at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
12-23 08:52:38.312 25783 27523 E UploadService:     at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
12-23 08:52:38.312 25783 27523 E UploadService:     at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
12-23 08:52:38.312 25783 27523 E UploadService:     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
12-23 08:52:38.312 25783 27523 E UploadService:     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
12-23 08:52:38.312 25783 27523 E UploadService:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
12-23 08:52:38.312 25783 27523 E UploadService:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
12-23 08:52:38.312 25783 27523 E UploadService:     at java.lang.Thread.run(Thread.java:764)

On branch Pratham2305-my_develop, which is very similar to master.

bug

All 3 comments

@nicolas-raoul I have also faced the similar issue in prodDebug (previously I was testing for betaDebug), I don't think there is a issue with this particular branch as I have faced this on master also. In my case upload failed but caption was visible, still retry didn't work and same logcat error. Can you just confirm if you are facing this error on this branch only.

@Pratham2305 Thanks for the info! Actually I don't know about master, as I have been using your branch ever since I tried it because it is so useful :-)

I consider this issue as low priority since I have only seen it once. But if several other people confirm it on master, it will be worth investigating.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

neslihanturan picture neslihanturan  路  3Comments

Opsylac picture Opsylac  路  3Comments

misaochan picture misaochan  路  4Comments

psh picture psh  路  4Comments

misaochan picture misaochan  路  4Comments