Skip to content
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

Change snackbar's error message in the Another User's Page #5625

Closed
kanahia1 opened this issue Mar 14, 2024 · 9 comments
Closed

Change snackbar's error message in the Another User's Page #5625

kanahia1 opened this issue Mar 14, 2024 · 9 comments

Comments

@kanahia1
Copy link
Contributor

kanahia1 commented Mar 14, 2024

When opening the user page (someone else's page), if the achievements are not loaded it shows an Snack bar with message "Something went wrong, We could not fetch your achievements" wouldn't it be better to change the "Something went wrong, We could not fetch {User's name}'s achievements"

313374445-73ed77ab-32d1-4315-bd14-aa1bbe34cccc

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

label: good first issue, enhancement

@rohit9625
Copy link
Contributor

I tried repeating the steps and the first thing I faced was a very long waiting time as shown in the video. Time was more than 1 minute but I recorded a small part of it.

Screen_recording_20240316_101143.mp4

At last I get the same error message.
Screenshot_20240316_101100

The reason was this

Fetching achievements statistics failed
java.net.SocketTimeoutException: timeout
at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.kt:675)
at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.kt:684)
at okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.kt:143)
at okhttp3.internal.http2.Http2ExchangeCodec.readResponseHeaders(Http2ExchangeCodec.kt:96)
at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:106)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:79)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
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 fr.free.nrw.commons.mwapi.OkHttpJsonApiClient.lambda$getAchievements$4$fr-free-nrw-commons-mwapi-OkHttpJsonApiClient(OkHttpJsonApiClient.java:249)
at fr.free.nrw.commons.mwapi.OkHttpJsonApiClient$$ExternalSyntheticLambda0.call(Unknown Source:6)
at io.reactivex.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:44)
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)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)

We should figure out why is this happening with the server. Also, I see this behavior with many user pages.

@rohit9625
Copy link
Contributor

This is what the server says:
image

Clearly, it will be solved but I think should reduce the waiting time to 10 to 15 seconds. What did you say @kanahia1 ?

@kanahia1
Copy link
Contributor Author

Hey @rohit9625 How about opening different issue since this issue is primarily focused on changing error message.

@rohit9625
Copy link
Contributor

rohit9625 commented Mar 16, 2024

Yeah right, but I am gonna leave it for now as it is not that important. Server errors are not common, right?
Well, are you working on changing the error message if not then I would like to proceed : )

@kanahia1
Copy link
Contributor Author

@rohit9625 How about leaving this as good first issue since this could be great start for others!

@rohit9625
Copy link
Contributor

Yes, you are right😀
It will be a good start for newcomers.

@kanahia1 kanahia1 changed the title Change snackbar's error message in the User Page Change snackbar's error message in the Another User's Page Mar 20, 2024
@nicolas-raoul
Copy link
Member

I would suggest rewording to "Something went wrong, We could not fetch achievements".
That's as useful, and less complex.

@neeldoshii
Copy link
Contributor

Taking it up.

@neeldoshii
Copy link
Contributor

This issue can be closed as its fixed.

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

No branches or pull requests

4 participants