Skip to content

[Bug]: The app crashes when showing user pages #5623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
prototyperspective opened this issue Mar 14, 2024 · 11 comments
Closed

[Bug]: The app crashes when showing user pages #5623

prototyperspective opened this issue Mar 14, 2024 · 11 comments
Assignees
Labels

Comments

@prototyperspective
Copy link

Summary

When trying to show any user page, the app crashes and an Android error message box is showing saying Oops! Something went wrong.

Steps to reproduce

  1. In the Wikimedia Commons app on Android, open any image for example one shown at the page right after starting the app
  2. In the upper right select choose Show user page

Expected behaviour

It should show the user page, maybe directly the user's uploads with a link to the user page. If it shows the latter, a well-visible button to see the uploads should be shown at the top.

Improving the WMC app to a reasonable standard is high-impact / of high importance since most readers probably use WMC via smartphone by now and many of these either use the app or could be while the current quality is quite low (lots of potential).

Actual behaviour

The app crashes and an Android error message box is showing saying Oops! Something went wrong. The app is fully closed afterwards. Just try it yourself or on a few different phones.

Device name

No response

Android version

Android (a new version)

Commons app version

4.2.1

Device logs

No response

Screen-shots

No response

Would you like to work on the issue?

Prefer not

@kanahia1
Copy link
Contributor

Hey @prototyperspective, Thanks for reporting the issue :-)

I tried testing out the project through steps you have provided but, in my case app does not crashed but It showed snackbar instead which I feel problem truly exists which can be seen from the logs.

WhatsApp.Video.2024-03-14.at.21.58.01_9a963038.mp4

Here are my logs

java.io.IOException: {"error":{"code":"badinteger","info":"Invalid value \"M57387768\" for integer parameter \"pageids\".","docref":"See https://commons.wikimedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."},"servedby":"mw2298"}
                                                                                                    	at fr.free.nrw.commons.OkHttpConnectionFactory$UnsuccessfulResponseInterceptor.intercept(OkHttpConnectionFactory.java:90)
                                                                                                    	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
                                                                                                    	at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.kt:221)
                                                                                                    	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
                                                                                                    	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
                                                                                                    	at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
                                                                                                    	at retrofit2.OkHttpCall.execute(OkHttpCall.java:190)
                                                                                                    	at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:42)
                                                                                                    	at io.reactivex.Observable.subscribe(Observable.java:12267)
                                                                                                    	at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:34)
                                                                                                    	at io.reactivex.Observable.subscribe(Observable.java:12267)
                                                                                                    	at io.reactivex.internal.operators.observable.ObservableSingleSingle.subscribeActual(ObservableSingleSingle.java:35)
                                                                                                    	at io.reactivex.Single.subscribe(Single.java:3603)
                                                                                                    	at io.reactivex.internal.operators.single.SingleMap.subscribeActual(SingleMap.java:34)
                                                                                                    	at io.reactivex.Single.subscribe(Single.java:3603)
                                                                                                    	at io.reactivex.internal.operators.single.SingleFlatMap.subscribeActual(SingleFlatMap.java:36)
                                                                                                    	at io.reactivex.Single.subscribe(Single.java:3603)
                                                                                                    	at io.reactivex.internal.operators.single.SingleMap.subscribeActual(SingleMap.java:34)
                                                                                                    	at io.reactivex.Single.subscribe(Single.java:3603)
                                                                                                    	at io.reactivex.internal.operators.single.SingleResumeNext.subscribeActual(SingleResumeNext.java:39)
                                                                                                    	at io.reactivex.Single.subscribe(Single.java:3603)
                                                                                                    	at io.reactivex.internal.operators.single.SingleAmb.subscribeActual(SingleAmb.java:84)
                                                                                                    	at io.reactivex.Single.subscribe(Single.java:3603)
                                                                                                    	at io.reactivex.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)
                                                                                                    	at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
                                                                                                    	at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
                                                                                                    	at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
                                                                                                    	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
                                                                                                    	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)

Is it possible for you to share the logs ?

@prototyperspective
Copy link
Author

This problem persisted for quite a while and maybe I could share some of the logs but I can't see them in the app where I could only find a button to send the logs but not see them.

@kanahia1
Copy link
Contributor

If the app crashes you may see a dialog to report it which will redirect you to your mail app. Then you can copy logs from there.

@prototyperspective
Copy link
Author

I don't have an email app and prefer not having one on Android. Maybe I'll try later if really nobody else here has this problem.

@nicolas-raoul
Copy link
Member

Would you mind sharing a screencast?

@prototyperspective
Copy link
Author

@nicolas-raoul There really would be nothing to see – I just browse around click on any image then view user page…it then immediately crashes with Android showing this grey error Oops messagebox (the app is then fully closed meaning when I make Android show all running apps it doesn't show it anymore). Already had this problem many months ago.

@safan41
Copy link

safan41 commented Mar 27, 2024

I'll try to tackle this issue and see what I can find.

@nicolas-raoul
Copy link
Member

@prototyperspective A screencast is needed because neither Kanahia nor me are getting a crash by following the steps you describe. A screencast will help us see details that might be different. For instance, are you logged in or not?

@PetitPotiron
Copy link

Hello, I get this result. Are you talking of this kind of crash ?
https://github.com/commons-app/apps-android-commons/assets/70655051/e82d5cb3-2303-40e9-acc1-eb3ca0707eeb

@prototyperspective
Copy link
Author

@nicolas-raoul Details: this is occurring on Android 11, with the latest version of the app, iirc only default settings (all settings disabled), and while logged out (never logged in).

@PetitPotiron No, not at all. Like I said the whole app crashes. In your screencast the app doesn't crash and just shows some message at the bottom. There is not much to see: from the start page I just open a random image and select show user page. Then it immediately quits. I'm back to my Android homescreen over which there is a message box about half of the size of the screen (rest of the homescreen is dimmed) with a rectangular warning sign and title Commons that says "Ups! Something went wrong." and tell us what you did by email that will help fix the problem! above a textbox with a blinking cursor where I can enter text. When I press Cancel, the app is really fully shut down. It's not in the processes anymore. In your screencast video the app is still running.

When I press Ok to make it open an email app there are no logs there that I could paste here. Does it need Internet access? I would recommend that one could also see the logs from somewhere in the settings.

@prototyperspective
Copy link
Author

Thanks for fixing this, it works now. Well, except that it needs two tries and the user page doesn't show stats when logged out. See #5754 which is where the development would continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants