-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Pic of the day widget is blank #6193
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
Comments
Can I work on this 🤚 |
So, it works for the Network call for ProdBeta(same request with beta host i.e https://commons.wikimedia.beta.wmflabs.org/w/api.php) Should this be working in |
Are you referring to the API response? By working, did you mean it showed up correctly for you on your device too? |
The widget has been there on my screen ever since I added it. It's still blank. |
Any who wants to work on this issue, please check whether you experience the same empty widget, thanks! :-) |
Maybe you have the And yes, in case of |
No, this is the prod widget only 😅 I'll try to get the logs in some time. |
@RitikaPahwa4444 , to save you the trouble of logging. Go to Now, just make sure the app isn't in the memory and then put the widget again, that would trigger the network request and now see the result BODY in the logs and see if you get the data or not :-) |
Getting an UnknownHostException every time: |
I think I found the issue: this is happening because of my battery saver. Had freshly installed it, whitelisted the app now :) |
Thanks all for checking this! |
Interesting! If possible, would you mind giving details? Others might run into the same issue. Maybe even worth a FAQ item at https://commons-app.github.io/docs.html#docs? |
What about showing a message on the widget? |
@rohit9625 How would you detect that though? I guess our widget gets kicked out of memory without warning. |
There must be some way to detect that. I'll let you know if we can detect or not. |
We do log it here: apps-android-commons/app/src/main/java/fr/free/nrw/commons/widget/PicOfDayAppWidget.kt Line 114 in 50eb13a
|
Android restricts network usage, especially when the user is not actively using the app. The unknown host exception gave that hint post which I turned it off 😅 The message could be similar to the one we show for multi-uploads (over 5 images). Worth mentioning in the FAQs. |
I get this exception when adding a widget while having the app restricted for battery usage:
|
Summary
The pic of the day widget is blank.
Steps to reproduce
Expected behaviour
The picture of the day should be fetched and shown.
Actual behaviour
The widget appears blank.
Device name
Moto g34 5g
Android version
Android 14
Commons app version
master, prodDebug
Device logs
No response
Screen-shots
Would you like to work on the issue?
None
The text was updated successfully, but these errors were encountered: