signalapp / Signal-iOS

A private messenger for iOS.
https://signal.org
GNU Affero General Public License v3.0
10.84k stars 3.04k forks source link

SQLite error 11 database disk image is malformed after iOS crash while Signal was open in background of low storage message #5813

Open MartinEesmaa opened 5 months ago

MartinEesmaa commented 5 months ago

Bug description

The bug has occurred when I'm trying to take multiple screenshots on my iPad with low storage while Signal is open in background with low storage warning message.

Steps to reproduce

Actual result: Signal couldn't load database after crash with low storage and still open in background of Signal app.

Expected result: Before system crashes, Signal app may exit not forcing before crash, should recover database and back to there or make backup database of another file before crashes again. After iOS crash, Signal should open database correctly with normal operation.

Quick log:

2024/05/20 08:18:08:903  ❤️ [NotificationService.swift:114 didReceive(_:withContentHandler:)]: Couldn't load database: SQLite error 11: Optional("database disk image is malformed") (extended result code: 11)
2024/05/20 08:18:19:403  💛 [NSEEnvironment.swift:120 setUp(logger:)]: [NSE] pid: 856, memoryUsage: 3343160 {{xxxx-xx-xx-xxxB82}}
2024/05/20 08:18:19:405  ❤️ [OWSFileSystem.m:78 +[OWSFileSystem protectFileOrFolderAtPath:fileProtectionType:]]: Could not protect file or folder: NSCocoaErrorDomain/513, NSPOSIXErrorDomain/1

Screenshots (this was on May 3rd 2024 screenshotted, still I have an issue ongoing after I published an issue)

signalnotloadafterioscrash

Device info

Device: iPad 9th Generation

iOS version: 17.5.1

Signal version: 7.11

Link to debug log

b8437e19c349b54243bce4b44cf6c0b86a156a5886862506ccf20a7a67a55a39.zip (permanent link from GitHub)

If you would like to request more debug logs from past dates, let me know. Thanks! :)

Sincerely, Martin Eesmaa

Foxdelmar commented 4 months ago

I have the same error and it started with low storage on the iPhone. Just deleted a few GBs and updated iPhone and Signal App to the newest version of today but still the same error. Now even Push-Notifications don't work anymore in Background as a pop up message.

Support-Ticket is open: [XWJ5E6-NWxxx]

Filter: Signal - iOS Debug Log - LaunchFailure_DatabaseUnrecoverablyCorrupted Hardware: iPhone SE 2020 HID: 12,8 iOS-Version: 17.5.1 (21F90) Signal-Version: 7.18.0.190 Region: de_DE

Screenshot containing the error message: "Datenbank konnte nicht geladen werden. Signal kann nicht starten. Bitte sende ein Diagnoseprotokoll an support@signal.org, damit wir dieses Problem beheben können." Button: "Diagnoseprotokoll übermitteln"

Bildschirmfoto 2024-07-05 um 09 43 40

Foxdelmar commented 4 months ago

Is there any chance that i will be able to continue to use my signal app with all my chats and photos aber an upcoming update? Or do I have to delete my app and start from a clean app to be able to use signal?

Could anyone please give a forecast to this issue? On the one hand i really need to text with people using Signal but on the other hand I need my messages and pictures and dont want to loose it.

What should i do?

benjamindahl commented 4 months ago

exact same problem here

MartinEesmaa commented 4 months ago

Hi @Foxdelmar!

He replied to my support ticket about on May 28:

Alexander Berkman (Signal Support)

May 28, 2024, 07:03 PDT

Hi, thanks for writing in to Signal support.

The only options currently available are to attempt to resolve the issue by reinstalling the app and wiping all data, or wait until a bugfix is available. I unfortunately can't give out a specific timeline for a resolution.

Thanks again for your help in reporting this and improving Signal for everyone.

Well, if you don't want to lose conversations on Signal app with malformed database, then we have to wait bugfix is resolved about this issue or if you wanna still continue using Signal app of malformed database, then that's only one choice is to reinstall it and you may lose conversations.

Here's my feature request: I wonder what if I make sure next time internal storage is almost empty by opened in background or in app, pending messages... then I wanna just make simple to pop up a standard iOS warning message when app exits itself and also needs to empty the storage before launch use app.

If user tries to open the app again after iOS standard warning message popped up, then it will appear again message until empty and can use app to enter once storage is enough without iOS standard message.

Let me know if you have question or issue. Thanks! :)

Foxdelmar commented 4 months ago

@MartinEesmaa : Thank you for your reply. I also received a similar answer. I decided to uninstall and reinstall the app with all data lost. I need the app so there was no other option for me.

Hopefully Signal will be hardened in a way that it stops working when the space is too low instead of destroying its own database.

MartinEesmaa commented 4 months ago

Hi, @Foxdelmar! Thanks for the info.

Well, you chose to reinstall Signal app with fresh clean, so data is lost 😞, if it's fine for you by choice.

For me, I use Android my main device for Signal app to backup chats just in case.

However it would be good idea for future update to support backup file for iOS and Android (already supported).

If you have friends that you chatted it before you reinstalled app, you can request your friends to take screenshot of your written chats conversations on friend's phone like iOS or Android of screenshot or backup file using signalbackup-tools.

MartinEesmaa commented 2 months ago

It has been almost four months since I started to post issue... waiting for still updates

mihaelacr commented 1 day ago

+1, hitting this too, more info here.