signalapp / Signal-Android

A private messenger for Android.
https://signal.org
GNU Affero General Public License v3.0
25.4k stars 6.09k forks source link

Storage usage seems to be shown incorrectly #9353

Open sivaraam opened 4 years ago

sivaraam commented 4 years ago

Bug description

I was recently exploring the "Storage" feature which shows the statistics of the storage used by media messages. That's when I found that the actual storage taken up by all the media files doesn't seem to be adding up to the usage shown in the main screen the space taken by all the media. Let me explain that in a little detail.

The total usage shown in the main screen is 25 MB with the following split-up (pie-chart): image

When I tap on “REVIEW STORAGE” to see the more detailed view, I found that there was nothing listed in the “Audio” and “Files” section. So, I’m not sure why “Files” occupies such a large portion of the pie-chart when I don’t have any. The case is same for “Videos”. I went through the files shown in the “Media” section and could not find any videos. image image

To find the total space taken up by the files in the “Media”, I selected all the files shown in the “Media” section (using the “Select All” option). The size it shows for the 54 items there is 7.9 MB. image

So, there seems to be a gap of 17.1 MB between the actual storage space used by the media files (7.9 MB) and the one shown in the main screen (25 MB). This is the reason why I think the storage usage is shown incorrectly.

Device info

Device: Samsung SM-J111F Android version: 5.1.1 Signal version: 4.53.7

Note: Initially discussed in the linked community forum post

alan-signal commented 4 years ago

There are items that do legitimately count in the total but do not appear in the list.

View-once items for example. Long text messages count as a document on the total.

Do you think either of those might be the case?

mueller-ma commented 4 years ago

I have the same issue: 8.00 GB in the Android settings app for Signal data vs. 4.6 GB in the Signal app.

View-once items for example.

Currently I have no un-viewed view-once messages.

When I sent the same picture to two people before the deduplication patch (4.49), is this picture count twice? From my understanding this pic is twice on disk.

alan-signal commented 4 years ago

I have the same issue: 8.00 GB in the Android settings app for Signal data vs. 4.6 GB in the Signal app.

That's not the same issue though. This issue is about a difference between two in-app numbers.

sivaraam commented 4 years ago

View-once items for example.

I have sent 2 view once pictures and received one view-once picture in total. That's the all w.r.t. view-once media. They couldn't have contributed more than few KBs in total (if compressed). Just wondering, view-once media are compressed too right?

Long text messages count as a document on the total.

There might be a few of them. I'm not sure whether I would have sent or received that many long messages as to justify the proportion the 'Files' section takes in the pie-chart representation. To confirm, messages above what length are considered as documents?

Given that I've never sent or received any view-once video, it's still not clear why there is a portion of chunk taken up by videos. Are GIFs considered to be videos too?

There are items that do legitimately count in the total but do not appear in the list.

Is there anything else other than view-once media and long messages?

mueller-ma commented 4 years ago

That's not the same issue though. This issue is about a difference between two in-app numbers.

Sorry, I just read the title. But I also have this issue: Settings page with the bar chart says 4.6 GB Review storage => Tab ALL => Select all: 4999 items, 3.4 GB

Still no pending view-once messages and I highly doubt I have long text messages for 1.2 GB.

klues commented 4 years ago

see #9634 for different storage usage in app and system settings.

stale[bot] commented 2 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

mueller-ma commented 2 years ago

Now I have 8.4 GB in the screen where the bar chart is vs. 9.2 GB when I select all elements.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

sivaraam commented 2 years ago

I still do observe this.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Crapshit commented 1 year ago

I have the same issue. Android settings shows 107 MB usage: Screenshot_20221015-181847.png

Signal App shows 76.1 MB usage: Screenshot_20221015-181853~2.png

But I don't have any pictures, videos or documents: Screenshot_20221015-181901~3.png

Android settings can be different and that's okay for me, but why is Signal showing I have pictures, videos and files, but I don't have any. And I can't believe that my text Messages are consuming 76 MB of space.

HiperFall commented 1 year ago

Screenshot_20230124-231328~2 Screenshot_20230124-231334~2

Same issue on Pixel 6, Signal 6.8.3.

Crapshit commented 1 year ago

Still the same issue on my Pixel 7 Pro with latest March 2023 Android security update and Signal 6.13.8.

Crapshit commented 1 year ago

There are items that do legitimately count in the total but do not appear in the list.

View-once items for example. Long text messages count as a document on the total.

Do you think either of those might be the case?

Hi @alan-signal I think I found the reason for this. When I send a picture to a friend and after successfully sending the picture, I reply to that picture again with some comment. The storage usage is still counting the kilobytes megabytes for it even after successfully deleting the picture. When I also delete my direct reply I made for that picture the storage usage is correct with 0 B.

Right now I'm using Signal for Android version 6.25.5. Pixel 7 Pro with latest security patches and google play system updates.

Crapshit commented 1 year ago

Is it possible to fix this?

cody-signal commented 1 year ago

The quote/reply uses the image to render the thumbnail hence why it is not deleted until after the quote is deleted.

This thread is ancient and lot of stuff on it, what exactly are you asking to be "fixed"? As an fyi, Alan hasn't worked at Signal for over a year.

Crapshit commented 1 year ago

Hi @cody-signal, it would be great if I delete all photos in Signal settings under storage usage, that the storage usage is also 0 byte. To find out in which chat I did a reply and to find that reply from the past is a pain. I can save all photos to my local storage which I want to permanently save, but to loose chat information like some replies I don't like. One reason to delete regularly my media is to keep my backup small. The backup process is not optimal and does not create an incremental backup. It always create a new full backup. Unnecessary I/O operation to storage.

cody-signal commented 1 year ago

Thanks @Crapshit for the extra details. I'll bring it up with the team.

Just so you're aware, if you delete media from a message with a body, that message is also deleted so you are already loosing chat information if you are deleting all media regularly and that media has text associated with it. There's a warning dialog when you delete that indicates such.

I'm not saying any of the above is "the right way to do it ™️ " just that's how things work today. Again, will raise with the team.

Regarding incremental backups, that's something were exploring right now.

spring-trees-ufo commented 11 months ago

The quote/reply uses the image to render the thumbnail hence why it is not deleted until after the quote is deleted.

This is something new I learnt today. That explains why Signal reports a media size of ~900 MB while the backup is twice that size. From a user's perspective there is no easy way of knowing which media has been replied to and the text which needs to be deleted in order to truly delete the media, is there?

The increasing size of the backup on a daily basis is worrying. Is there not a way to not use the original media to show on the quote and rather use a thumbnail or better yet, just the word "Deleted media" in quotes?

Edit: The size reported by Android for Signal's User data stands at 0.96 GB. Now I do not understand the discrepancy between the data on the device and the backup data.

Crapshit commented 6 months ago

Regarding incremental backups, that's something were exploring right now.

@cody-signal do you have any update regarding this incremental backup feature?

greyson-signal commented 6 months ago

It's being worked on, but no ETA.

Crapshit commented 6 months ago

Sounds great, thank you for your update 👍. We can wait 😉.

Crapshit commented 5 months ago

Hi @cody-signal, it would be great if I delete all photos in Signal settings under storage usage, that the storage usage is also 0 byte. To find out in which chat I did a reply and to find that reply from the past is a pain. I can save all photos to my local storage which I want to permanently save, but to loose chat information like some replies I don't like. One reason to delete regularly my media is to keep my backup small. The backup process is not optimal and does not create an incremental backup. It always create a new full backup. Unnecessary I/O operation to storage.

Hi @cody-signal ,

are there any updates regarding the above issue? Currently I have the issue again that in some chat I did some reply to a photo which I deleted in signal settings under storage usage. I'm not able to find out where that reply is 😅.

Regards Crapi