question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lots of `/profile` requests from Android clients

See original GitHub issue

Whenever a new user joins a big room like Matrix HQ, we see lots of GET /_matrix/client/r0/profile/<userid> requests from Element-android useragents. But all the information that the client needs should be in the join event (indeed, the “profile” probably isn’t even what you want, since users may have different displaynames/avatars in different rooms).

What is the reason for these requests?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
bmartycommented, Aug 30, 2022

When the Android SDK detects a membership event, it forces a fetch of the user profile, to mitigate issue of outdated User data. The Sync response does not contain information about the user profile, but just room member, and user can change their profile data per room. That said we had a bug which is currently been fixed, we where fetching several times the same profile data. This will be fixed in the release 1.4.36 by this commit: https://github.com/vector-im/element-android/pull/6917/commits/a7666e2112ee6ec957d1972def10b83f1d4e3662

If this is happening when a user send a message, this is probably another bug. Please confirm.

By the way it’s good to see such issues coming from server maintainers. Thanks!

0reactions
bmartycommented, Aug 31, 2022

…make /profile request every time there is an m.room.member

We make a profile request if the m.room.member data differs from what is stored locally, to ensure an up to date local DB. Also previously User info was kept up to date using the data received with the Presence information (display name and avatar), but since this is disabled on matrix.org, we had to find a (or rather another!) workaround.

Ideally profile information changes would come in the sync response, but this is not the case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Work profiles - Android Developers
The Android platform allows devices to have work profiles (sometimes referred to as managed profiles).
Read more >
Work profiles - Android Enterprise Help
A work profile is a separate area of an Android device for storing work apps and data. Work profiles provide platform-level separation of...
Read more >
Intercept and edit HTTP traffic from (almost) any Android app
HTTP is used by almost all Android apps to request data, load content, and send changes to backend servers. If you can see...
Read more >
Corporate-owned Android Enterprise device restriction ...
Android Enterprise corporate-owned work profile (COPE) ... defines the default permission policy for requests for runtime permissions.
Read more >
Requesting additional permissions | Authentication
By default, new client IDs are now blocked from using the older platform ... Request the base scope profile when you initialize Google ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found