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

No avatars on mobile when forcing default-avatar.png in local-static #5797

Open
lurendrejer opened this issue Nov 24, 2023 · 6 comments
Open
Labels
a-avatar Avatar URLs, caching, sizes, styles, etc.

Comments

@lurendrejer
Copy link

After disabling users ability to change avatars, gravatar sync and setting default avatar in settings.py - the mobile app displays an '?' for every users avatar.

Only tested on iPhones atm.

@lurendrejer
Copy link
Author

lurendrejer commented Nov 24, 2023

The avatar is displayed properly at the 'top' of the conversation, but fails inside the conversation.

IMG_0631

@gnprice
Copy link
Member

gnprice commented Nov 27, 2023

Interesting, thanks for the report.

The fact that it works in the app bar at the top of the screen, and doesn't work inside the message list, seems very informative as a clue. I suspect the issue is that the server isn't recognizing the authentication credentials the client sends for accessing the image, because the way we do that is different between those two places.

Specifically, inside the message list, we provide the credential by adding it to the URL as a query parameter. The server accepts this only on certain routes — it accepts it on user-uploaded files, for example. What's needed is for it to accept that form of authentication for this custom default avatar as well — otherwise that feature of a custom default avatar won't fully work, as you see here.

What's the name of the setting you're using for this in settings.py?

@gnprice gnprice added the a-avatar Avatar URLs, caching, sizes, styles, etc. label Nov 27, 2023
@lurendrejer
Copy link
Author

Hi.

These are the lines i have changed in settings.py
AVATAR_CHANGES_DISABLED = True
ENABLE_GRAVATAR = False
DEFAULT_AVATAR_URI = "/local-static/default-avatar.png"

@gnprice
Copy link
Member

gnprice commented Mar 4, 2024

Thanks for the reply — sorry I missed this in my inbox earlier.

If my suspected diagnosis above is right, then this is an issue that's fixed by our upcoming new app, written in Flutter. The Flutter app reached beta in December:
https://chat.zulip.org/#narrow/stream/2-general/topic/Flutter/near/1708728

So one debugging step that would be helpful is for you to try out that beta and see if the issue goes away. If so, that'd confirm the diagnosis; if it doesn't, we can debug further.

@lurendrejer
Copy link
Author

lurendrejer commented Mar 5, 2024 via email

@gnprice
Copy link
Member

gnprice commented Mar 5, 2024

Great. Glad to hear it, and thanks for confirming.

Because this app is in maintenance mode as we're focused on building the new app, I think this is a bug we won't get to fixing in this legacy codebase. Instead it'll effectively be fixed by the migration to the new app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-avatar Avatar URLs, caching, sizes, styles, etc.
Projects
None yet
Development

No branches or pull requests

2 participants