Skip to content

It is not possible to add or change user profile picture. #4730

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

Open
YamatoRyou opened this issue Dec 15, 2021 · 7 comments
Open

It is not possible to add or change user profile picture. #4730

YamatoRyou opened this issue Dec 15, 2021 · 7 comments
Labels
A-Settings A-User Avatar O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Something isn't working: bugs, crashes, hangs and other reported problems X-Needs-Investigation Z-WTF WTF moment: High Impact, Low Effort

Comments

@YamatoRyou
Copy link

Steps to reproduce

  1. Open "Settings" and go to "General";
  2. Click on the user profile picture to get a picture from one of the camera or photo album;
  3. Click the check mark in the upper right corner.

Outcome

What did you expect?

Add or replace user picture according to user needs.

What happened instead?

No matter if you try to add or replace old user pictures, the above steps will not produce any results.
I tested 3 different phones and all had the same problem.

Your phone model

HMD TA-1054; Xiaomi Mi 9T; Oppo A57

Operating system version

Android 8.1; Android 11; Android 6.0

Application version and app store

1.3.9 (F-Droid)

Homeserver

Private server.

Will you send logs?

No

@YamatoRyou YamatoRyou added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Dec 15, 2021
@bmarty
Copy link
Member

bmarty commented Dec 15, 2021

It's working fine here, on a matrix.org account.
Any chance you provide some log from logcat, or do a rageshake after a try?

@YamatoRyou
Copy link
Author

YamatoRyou commented Dec 15, 2021

It's working fine here, on a matrix.org account. Any chance you provide some log from logcat, or do a rageshake after a try?

I sent a feedback using Shaking the phone just now (TA-1054 and Mi 9T).
Next I will test it on natrix.org.
Matrix.org registration failed and failed to pass verification.

@YamatoRyou
Copy link
Author

It's working fine here, on a matrix.org account. Any chance you provide some log from logcat, or do a rageshake after a try?

The demo videos of 2 of the mobile phones have been supplemented.
https://drive.google.com/file/d/11IBrNwMzI1qobv5FxRwKb71ryOMlxL9J/view?usp=sharing

@YamatoRyou
Copy link
Author

It's working fine here, on a matrix.org account. Any chance you provide some log from logcat, or do a rageshake after a try?

Update:
I have successfully registered an account on matrix.org and have repeatedly changed the user profile picture several times. Most of the time, it can be changed, and only a few times are the same as mentioned above.
When I switch back to my private server and repeat the above operation, the problem remains.

@ouchadam
Copy link
Contributor

I'm also unable to reproduce this issue using matrix.org and my private server, the logs provided by @YamatoRyou did have a lot of 404s and DNS failures which makes me suspect could be homeserver hosting related

@YamatoRyou
Copy link
Author

YamatoRyou commented Dec 20, 2021

I'm also unable to reproduce this issue using matrix.org and my private server, the logs provided by @YamatoRyou did have a lot of 404s and DNS failures which makes me suspect could be homeserver hosting related

  1. Try to add or update the avatar on the Android client. Although the client does not respond, the server has a corresponding log:
    {35F520CC-F3E6-0241-80C0-3991F08FACD8}
  2. The same private server, Element desktop version and Web version can change the avatar normally. In addition, after the above client changes the avatar, the Android client will synchronize the user’s changed avatar.
  3. The server runs in Synology's Docker, and uses DSM's built-in reverse proxy function to allow port 8008 to support HTTPS connections, and port forwarding is set up on the router to make it accessible to the outside world. This may be the cause of this problem?

@375573088
Copy link

375573088 commented Dec 21, 2021

Use coroutineDispatchers.io it is dit fixed the exception and setAvatar successed。may be you can use other solution fix your problem。

 override suspend fun updateAvatar(userId: String, newAvatarUri: Uri, fileName: String) {
        val logger = FormattedJsonHttpLogger()
        //withContext(coroutineDispatchers.main)
        //coroutineDispatchers.io 异步方式,修复网络占用主线程
        withContext(coroutineDispatchers.io) {
           try{
               val response = fileUploader.uploadFromUri(newAvatarUri, fileName, MimeTypes.Jpeg)
               setAvatarUrlTask.execute(SetAvatarUrlTask.Params(userId = userId, newAvatarUrl = response.contentUri))
               userStore.updateAvatar(userId, response.contentUri)
           }
           catch (e :Exception){
               logger.log("updateAvatar------>"+ e.message)  
           }

        }
    }

@daniellekirkwood daniellekirkwood added the Z-WTF WTF moment: High Impact, Low Effort label Feb 16, 2022
@daniellekirkwood daniellekirkwood added S-Minor Impairs non-critical functionality or suitable workarounds exist O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Settings A-User Avatar O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Something isn't working: bugs, crashes, hangs and other reported problems X-Needs-Investigation Z-WTF WTF moment: High Impact, Low Effort
Projects
None yet
Development

No branches or pull requests

8 participants
@germain-gg @ouchadam @bmarty @375573088 @YamatoRyou @fedrunov @daniellekirkwood and others