Skip to content

Conversation

@VelikovPetar
Copy link
Contributor

@VelikovPetar VelikovPetar commented Nov 12, 2025

🎯 Goal

There is a possibility if a customer is using coil2 while using the Chat SDK (which uses coil3) for a race condition: Both coil2 and coil3 use the same cache directory (image_cache) for storing image data, however they have slightly different output format. So if one version of coil writes to this cache, but is read by the different one, the parsing will fail and image will fail to load.

🛠 Implementation details

Use a Stream specific cache dir for the coil3 instance to avoid potential clash with the default (image_cache) from the customer coil instance: stream_coil3_image_cache.

🎨 UI Changes

NA

🧪 Testing

It is a bit difficult to reproduce as it is caused by a race condition. It most often happens when the same image (from same URL resource) is rendered both via coil2 and coil3. The result is that one of the image views will fail to render.

To test the more common scenario, ensure that none of the current features which include images are not broken. Ex. media attachments, media gallery, channel media attachments gallery...

@github-actions
Copy link
Contributor

github-actions bot commented Nov 12, 2025

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.21 MB 5.21 MB 0.00 MB 🟢
stream-chat-android-offline 5.45 MB 5.45 MB 0.00 MB 🟢
stream-chat-android-ui-components 10.57 MB 10.57 MB 0.00 MB 🟢
stream-chat-android-compose 12.79 MB 12.79 MB 0.00 MB 🟢

@VelikovPetar VelikovPetar marked this pull request as ready for review November 13, 2025 09:47
@VelikovPetar VelikovPetar requested a review from a team as a code owner November 13, 2025 09:47
@sonarqubecloud
Copy link

@andremion andremion merged commit 72acf8d into develop Nov 14, 2025
13 checks passed
@andremion andremion deleted the bug/AND-905_use_unique_coil3_cache_dir branch November 14, 2025 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants