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

[Bug]: User profile picture not showing in Nextcloud contacts avatar #32271

Closed
5 of 8 tasks
mstolf opened this issue May 4, 2022 · 10 comments
Closed
5 of 8 tasks

[Bug]: User profile picture not showing in Nextcloud contacts avatar #32271

mstolf opened this issue May 4, 2022 · 10 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug needs info

Comments

@mstolf
Copy link
Member

mstolf commented May 4, 2022

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

User profile picture not showing in Nextcloud contacts avatar

The avatar appears, but only the generic letters generated when creating the user

avatar

Steps to reproduce

  1. Insert a profile photo
  2. Log out of this session and log in with another account
  3. When opening Nextcloud, click on the contacts icon and search for the user who inserted the image

Expected behavior

Display the user's avatar with the user's profile picture

Installation method

Manual installation

Operating system

Debian/Ubuntu

PHP engine version

PHP 7.4

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "nextcloud.empteste.com.br"
        ],
        "memcache.local": "\\OC\\Memcache\\Memcached",
        "memcached_servers": [
            [
                "\/tmp\/memcached.sock",
                0
            ]
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "24.0.0.12",
        "overwrite.cli.url": "http:\/\/localhost",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "mysql.utf8mb4": true,
        "loglevel": 0,
        "updater.release.channel": "beta",
        "maintenance": false,
        "theme": "",
        "app_install_overwrite": [
            "onlyoffice"
        ],
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    },
    "apps": {
        "accessibility": {
            "enabled": "no",
            "installed_version": "1.9.0",
            "types": ""
        },
        "activity": {
            "enabled": "no",
            "installed_version": "2.15.0",
            "types": "filesystem"
        },
        "backgroundjob": {
            "lastjob": "46"
        },
        "circles": {
            "enabled": "no",
            "installed_version": "23.1.0",
            "loopback_tmp_scheme": "http",
            "maintenance_run": "0",
            "maintenance_update": "{\"maximum\":3,\"3\":1649422094,\"2\":1649422094,\"1\":1649422094}",
            "types": "filesystem,dav"
        },
        "cloud_federation_api": {
            "enabled": "yes",
            "installed_version": "1.7.0",
            "types": "filesystem"
        },
        "comments": {
            "enabled": "no",
            "installed_version": "1.13.0",
            "types": "logging"
        },
        "contactsinteraction": {
            "enabled": "no",
            "installed_version": "1.4.0",
            "types": "dav"
        },
        "core": {
            "installedat": "1649418266.2818",
            "lastcron": "1651689040",
            "lastupdateResult": "[]",
            "lastupdatedat": "1651687608",
            "moveavatarsdone": "yes",
            "oc.integritycheck.checker": "[]",
            "previewsCleanedUp": "1",
            "public_files": "files_sharing\/public.php",
            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
            "theming.variables": "b92d206521717ac032f8aa58d3c7ff2f",
            "updater.secret.created": "1651687418",
            "vendor": "nextcloud"
        },
        "dashboard": {
            "enabled": "no",
            "installed_version": "7.3.0",
            "types": ""
        },
        "dav": {
            "buildCalendarReminderIndex": "yes",
            "buildCalendarSearchIndex": "yes",
            "chunks_migrated": "1",
            "enabled": "yes",
            "installed_version": "1.22.0",
            "regeneratedBirthdayCalendarsForYearFix": "yes",
            "types": "filesystem"
        },
        "deck": {
            "enabled": "yes",
            "installed_version": "1.7.0",
            "types": "dav"
        },
        "federatedfilesharing": {
            "enabled": "yes",
            "installed_version": "1.14.0",
            "types": ""
        },
        "federation": {
            "enabled": "no",
            "installed_version": "1.13.0",
            "types": "authentication"
        },
        "files": {
            "enabled": "yes",
            "installed_version": "1.19.0",
            "types": "filesystem"
        },
        "files_pdfviewer": {
            "enabled": "yes",
            "installed_version": "2.5.0",
            "types": ""
        },
        "files_rightclick": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": ""
        },
        "files_sharing": {
            "enabled": "yes",
            "installed_version": "1.16.2",
            "types": "filesystem"
        },
        "files_trashbin": {
            "enabled": "no",
            "installed_version": "1.13.0",
            "types": "filesystem,dav"
        },
        "files_versions": {
            "enabled": "yes",
            "installed_version": "1.17.0",
            "types": "filesystem,dav"
        },
        "files_videoplayer": {
            "enabled": "yes",
            "installed_version": "1.13.0",
            "types": ""
        },
        "firstrunwizard": {
            "enabled": "yes",
            "installed_version": "2.13.0",
            "types": "logging"
        },
        "forms": {
            "enabled": "yes",
            "installed_version": "2.5.0",
            "types": ""
        },
        "logreader": {
            "enabled": "yes",
            "installed_version": "2.9.0",
            "types": ""
        },
        "lookup_server_connector": {
            "enabled": "yes",
            "installed_version": "1.12.0",
            "types": "authentication"
        },
        "nextcloud_announcements": {
            "enabled": "no",
            "installed_version": "1.12.0",
            "pub_date": "Thu, 24 Oct 2019 00:00:00 +0200",
            "types": "logging"
        },
        "notifications": {
            "enabled": "yes",
            "installed_version": "2.12.0",
            "types": "logging"
        },
        "oauth2": {
            "enabled": "yes",
            "installed_version": "1.12.0",
            "types": "authentication"
        },
        "officeonline": {
            "enabled": "yes",
            "installed_version": "1.1.3",
            "types": "filesystem,dav,prevent_group_restriction"
        },
        "password_policy": {
            "enabled": "yes",
            "installed_version": "1.14.0",
            "types": "authentication"
        },
        "photos": {
            "enabled": "no",
            "installed_version": "1.5.0",
            "types": ""
        },
        "privacy": {
            "enabled": "no",
            "installed_version": "1.7.0",
            "types": ""
        },
        "provisioning_api": {
            "enabled": "yes",
            "installed_version": "1.14.0",
            "types": "prevent_group_restriction"
        },
        "recommendations": {
            "enabled": "no",
            "installed_version": "1.2.0",
            "types": ""
        },
        "richdocuments": {
            "disable_certificate_verification": "",
            "enabled": "no",
            "installed_version": "6.0.0",
            "types": "prevent_group_restriction"
        },
        "serverinfo": {
            "cached_count_filecache": "902",
            "cached_count_storages": "9",
            "enabled": "yes",
            "installed_version": "1.14.0",
            "types": ""
        },
        "settings": {
            "enabled": "yes",
            "installed_version": "1.6.0",
            "types": ""
        },
        "sharebymail": {
            "enabled": "yes",
            "installed_version": "1.14.0",
            "types": "filesystem"
        },
        "spreed": {
            "enabled": "yes",
            "has_reference_id": "yes",
            "installed_version": "14.0.0",
            "project_access_invalidated": "1",
            "signaling_ticket_secret": "***REMOVED SENSITIVE VALUE***",
            "types": "dav,prevent_group_restriction"
        },
        "support": {
            "enabled": "no",
            "installed_version": "1.6.0",
            "types": "session"
        },
        "survey_client": {
            "enabled": "yes",
            "installed_version": "1.12.0",
            "types": ""
        },
        "systemtags": {
            "enabled": "no",
            "installed_version": "1.13.0",
            "types": "logging"
        },
        "talked": {
            "enabled": "no",
            "installed_version": "0.3.0",
            "types": ""
        },
        "tasks": {
            "enabled": "yes",
            "installed_version": "0.14.4",
            "types": ""
        },
        "text": {
            "enabled": "yes",
            "installed_version": "3.5.1",
            "types": "dav"
        },
        "theming": {
            "enabled": "yes",
            "installed_version": "1.15.0",
            "types": "logging"
        },
        "twofactor_backupcodes": {
            "enabled": "yes",
            "installed_version": "1.13.0",
            "types": ""
        },
        "updatenotification": {
            "core": "24.0.0.11",
            "deck": "1.7.0",
            "enabled": "yes",
            "installed_version": "1.14.0",
            "spreed": "14.0.0",
            "types": "",
            "update_check_errors": "0"
        },
        "user_status": {
            "enabled": "yes",
            "installed_version": "1.4.0",
            "types": ""
        },
        "viewer": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": ""
        },
        "weather_status": {
            "enabled": "yes",
            "installed_version": "1.4.0",
            "types": ""
        },
        "workflowengine": {
            "enabled": "yes",
            "installed_version": "2.6.0",
            "types": "filesystem"
        }
    }
}

List of activated Apps

Enabled:
  - cloud_federation_api: 1.7.0
  - dav: 1.22.0
  - deck: 1.7.0
  - federatedfilesharing: 1.14.0
  - files: 1.19.0
  - files_pdfviewer: 2.5.0
  - files_rightclick: 1.3.0
  - files_sharing: 1.16.2
  - files_versions: 1.17.0
  - files_videoplayer: 1.13.0
  - firstrunwizard: 2.13.0
  - forms: 2.5.0
  - logreader: 2.9.0
  - lookup_server_connector: 1.12.0
  - notifications: 2.12.0
  - oauth2: 1.12.0
  - officeonline: 1.1.3
  - password_policy: 1.14.0
  - provisioning_api: 1.14.0
  - serverinfo: 1.14.0
  - settings: 1.6.0
  - sharebymail: 1.14.0
  - spreed: 14.0.0
  - survey_client: 1.12.0
  - tasks: 0.14.4
  - text: 3.5.1
  - theming: 1.15.0
  - twofactor_backupcodes: 1.13.0
  - updatenotification: 1.14.0
  - user_status: 1.4.0
  - viewer: 1.8.0
  - weather_status: 1.4.0
  - workflowengine: 2.6.0
Disabled:
  - accessibility: 1.9.0
  - activity: 2.15.0
  - admin_audit
  - circles: 23.1.0
  - comments: 1.13.0
  - contactsinteraction: 1.4.0
  - dashboard: 7.3.0
  - encryption
  - federation: 1.13.0
  - files_external
  - files_trashbin: 1.13.0
  - nextcloud_announcements: 1.12.0
  - photos: 1.5.0
  - privacy: 1.7.0
  - recommendations: 1.2.0
  - support: 1.6.0
  - systemtags: 1.13.0
  - talked: 0.3.0
  - user_ldap

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

NA

Additional info

NA

@mstolf mstolf added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels May 4, 2022
@solracsf
Copy link
Member

solracsf commented May 5, 2022

Not having such problem.
Did you try anything else than SVG?

image

@mstolf
Copy link
Member Author

mstolf commented May 6, 2022

Tried both with PNG and JPG

I did a clean install of Nextcloud for development environment (Version 25) and the problem also occurred

Photo has been inserted into profile and Spreed, but not contacts

@mstolf
Copy link
Member Author

mstolf commented May 6, 2022

When saving the image it is generating the logs below in the nextcloud.log file

{ "reqId": "YnUk_h5I-D4x2Hi7NvicWwAADSI", "level": 0, "time": "2022-05-06T13:39:10+00:00", "remoteAddr": "172.23.31.158", "user": "matheus.stolf", "app": "core", "method": "POST", "url": "/index.php/avatar/", "message": "OC_Image->fixOrientation() Image is not a JPEG.", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36", "version": "25.0.0.1" } { "reqId": "YnUk_h5I-D4x2Hi7NvicWwAADSI", "level": 0, "time": "2022-05-06T13:39:10+00:00", "remoteAddr": "172.23.31.158", "user": "matheus.stolf", "app": "core", "method": "POST", "url": "/index.php/avatar/", "message": "OC_Image->fixOrientation() Orientation: -1", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36", "version": "25.0.0.1" } { "reqId": "YnUlBm8P4SO7f35Yxjrp1QAAjAI", "level": 1, "time": "2022-05-06T13:39:18+00:00", "remoteAddr": "172.23.31.158", "user": "matheus.stolf", "app": "no app in context", "method": "POST", "url": "/index.php/avatar/cropped", "message": "Deprecated event type for OCP\\IUser::changeUser: Symfony\\Component\\EventDispatcher\\GenericEvent is used", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36", "version": "25.0.0.1" } { "reqId": "YnUlBm8P4SO7f35Yxjrp1QAAjAI", "level": 0, "time": "2022-05-06T13:39:18+00:00", "remoteAddr": "172.23.31.158", "user": "matheus.stolf", "app": "dav", "method": "POST", "url": "/index.php/avatar/cropped", "message": "Activity generated for a changed card in addressbook 1", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36", "version": "25.0.0.1" } { "reqId": "YnUlBm8P4SO7f35Yxjrp1QAAjAI", "level": 1, "time": "2022-05-06T13:39:18+00:00", "remoteAddr": "172.23.31.158", "user": "matheus.stolf", "app": "no app in context", "method": "POST", "url": "/index.php/avatar/cropped", "message": "Deprecated event type for \\OCA\\DAV\\CardDAV\\CardDavBackend::updateCard: Symfony\\Component\\EventDispatcher\\GenericEvent is used", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36", "version": "25.0.0.1" } { "reqId": "YnUlBm8P4SO7f35Yxjrp1gAAjAI", "level": 0, "time": "2022-05-06T13:39:18+00:00", "remoteAddr": "172.23.31.158", "user": "matheus.stolf", "app": "core", "method": "GET", "url": "/index.php/avatar/matheus.stolf/32?v=-739", "message": "Avatar requested in deprecated size 32", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36", "version": "25.0.0.1" } { "reqId": "YnUlBm8P4SO7f35Yxjrp3wAAjAA", "level": 0, "time": "2022-05-06T13:39:18+00:00", "remoteAddr": "172.23.31.158", "user": "matheus.stolf", "app": "core", "method": "GET", "url": "/index.php/avatar/matheus.stolf/145?v=-739", "message": "Avatar requested in deprecated size 145", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36", "version": "25.0.0.1" }

But I don't know if it's related to the failure in question, I believe it may be something in the request that loads the contacts (contactsmenu/contacts)

@AndyXheli
Copy link

AndyXheli commented May 6, 2022

Same issue I had this ticket open since Feb 7 and still nothing from dev #31065
NC 23
NC 24

@mstolf
Copy link
Member Author

mstolf commented May 6, 2022

I'm analyzing the sources, it seems I'm able to track the problem.

There is the file contact.handlebars, in this source code there is a validation that only applies the image, when there is a value in the contact.avatar

image

Looking at the return of the request, it is always coming with null values, both the id and the avatar

Follow the object returned from the request

{ "contacts": [ { "id": null, "fullName": "Matheus Gutjahr Stolf", "avatar": null, "topAction": { "title": "Visualizar perfil", "icon": "https:\/\/nxtdev.empteste.com.br\/core\/img\/actions\/profile.svg", "hyperlink": "https:\/\/nxtdev.empteste.com.br\/index.php\/u\/matheus.stolf", "appId": "profile" }, "actions": [ { "title": "Falar com Matheus Gutjahr Stolf", "icon": "https:\/\/nxtdev.empteste.com.br\/apps\/spreed\/img\/app-dark.svg", "hyperlink": "https:\/\/nxtdev.empteste.com.br\/index.php\/apps\/spreed\/?callUser=matheus.stolf", "appId": "spreed" }, { "title": "SENSITIVE VALUE", "icon": "https:\/\/nxtdev.empteste.com.br\/core\/img\/actions\/mail.svg", "hyperlink": "SENSITIVE VALUE", "appId": "email" } ], "lastMessage": "", "emailAddresses": [ "SENSITIVE VALUE" ], "profileTitle": "Visualizar perfil", "profileUrl": "https:\/\/nxtdev.empteste.com.br\/index.php\/u\/matheus.stolf" } ], "contactsAppEnabled": false }

@AndyXheli
Copy link

Do you know what needs to be changed in the code I'll try it

@mstolf
Copy link
Member Author

mstolf commented May 6, 2022

I still can't find the reason for the avatar field not receiving the value in the request, I'm still investigating the problem, but the update will include it here in the issue

@mstolf
Copy link
Member Author

mstolf commented May 9, 2022

@AndyXheli, I made the correction by the pull request above, it is for review, but the insertion of the code of this pull request solved the problem here for me, just wait for the reviewers to approve the pull request merge

@mstolf mstolf added 2. developing Work in progress 3. to review Waiting for reviews and removed 2. developing Work in progress labels May 9, 2022
@mwllgr
Copy link

mwllgr commented Jul 10, 2022

Any news here? My instance is also affected.

@AndyXheli
Copy link

Still waiting on the pull to get approved!

@szaimen szaimen removed the 3. to review Waiting for reviews label Jan 23, 2023
@szaimen szaimen closed this as completed Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug needs info
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants