Signal-iOS icon indicating copy to clipboard operation
Signal-iOS copied to clipboard

"Problem Retrieving Data" and then crash

Open stefan2904 opened this issue 1 year ago • 25 comments

  • [X] I have searched open and closed issues for duplicates (this is similar but just in a comment; https://github.com/signalapp/Signal-iOS/issues/5395#issuecomment-1561927054)
  • [X] I am submitting a bug report for existing functionality that does not work as intended
  • [X] This isn't a feature request or a discussion topic

Bug description

When I start Signal, I get the "Problem Retrieving Data" screen. After confirming it, the all displays that it is now recovering the database but crashes after 10 seconds. There is no way to skip the recovery or retrieve debug logs.

It might be the case that this was triggered by a full device storage, but now there is >1GB space free.

Steps to reproduce

  • Start app
  • Immediately get "Problem Retrieving Data" screen
  • Click continue
  • For 10 seconds, get recovery screen

Actual result: Describe here what happens after you run the steps above (i.e. the buggy behaviour)

  • App crashes without Error message or debug log
  • No access to existing or new messages, not able to send messages

Expected result: Describe here what should happen after you run the steps above (i.e. what would be the correct behaviour)

  • Successful Recovery
  • Able to start Signal and access messages

Screenshots

IMG_20240520_105620_451

IMG_20240520_105616_814

Device info

Device: iPhone SE 2020

iOS version: 17.3.1

Signal version: 7.11

Link to debug log

  • Log from app not available
  • Log from iOS send to signal support.

stefan2904 avatar May 20 '24 09:05 stefan2904

The log indicates a SIGTRAP and some Address size faults below.

{"beforePC":"4gMZquMDF6rkAxWq5QMTquYDFqrnAxiqFQCA0pUDAJTgAxSq1xgPlA==","atPC":"IAAg1IgSgFL\/EwC56AcA+UgAgFLoAwA54CYAsADQLZHjJgCwY0A6kQ=="},
  "basebandVersion" : "5.00.00",
  "exception" : {"codes":"0x0000000000000001, 0x00000001a96fe3fc","rawCodes":[1,7137649660],"type":"EXC_BREAKPOINT","signal":"SIGTRAP"},
  "termination" : {"flags":0,"code":5,"namespace":"SIGNAL","indicator":"Trace\/BPT trap: 5","byProc":"exc handler","byPid":1265},
  "os_fault" : {"process":"Signal"},
  "faultingThread" : 2,
  "threads" : [{"id":115944,"threadState":{"x":[{"value":268451845},{"value":21592279046},{"value":8589934592},{"value":40694815129600},{"value":0},{"value":40694815129600},{"value":2},{"value":4294967295},{"value":18446744073709550527},{"value":9475},{"value":0},{"value":1},{"value":9475},{"value":11257864},{"value":4398046511104},{"value":0},{"value":18446744073709551569},{"value":7385227492,"symbolLocation":56,"symbol":"clock_gettime"},{"value":0},{"value":4294967295},{"value":2},{"value":40694815129600},{"value":0},{"value":40694815129600},{"value":6132049800},{"value":8589934592},{"value":21592279046},{"value":21592279046},{"value":4412409862}],"flavor":"ARM_THREAD_STATE64","lr":{"value":8449691408},"cpsr":{"value":0},"fp":{"value":6132049648},"sp":{"value":6132049568},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":8449692024},"far":{"value":0}},"queue":"com.apple.main-thread","frames":[{"imageOffset":4472,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":26},{"imageOffset":3856,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":26},{"imageOffset":3624,"symbol":"mach_msg_overwrite","symbolLocation":436,"imageIndex":26},{"imageOffset":3176,"symbol":"mach_msg","symbolLocation":24,"imageIndex":26},{"imageOffset":219804,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":160,"imageIndex":27},{"imageOffset":211348,"symbol":"__CFRunLoopRun","symbolLocation":1208,"imageIndex":27},{"imageOffset":209912,"symbol":"CFRunLoopRunSpecific","symbolLocation":608,"imageIndex":27},{"imageOffset":13560,"symbol":"GSEventRunModal","symbolLocation":164,"imageIndex":28},{"imageOffset":2279584,"symbol":"-[UIApplication _run]","symbolLocation":888,"imageIndex":29},{"imageOffset":2277084,"symbol":"UIApplicationMain","symbolLocation":340,"imageIndex":29},{"imageOffset":4547992,"imageIndex":29},{"imageOffset":176700,"imageIndex":25},{"imageOffset":24012,"symbol":"start","symbolLocation":2240,"imageIndex":30}]}
...

stefan2904 avatar May 20 '24 10:05 stefan2904

fyi, the Signal support team replied to my email that they are aware of and working on that issue, but they cannot give a timeline.

So, in my case, I had to reset the app, loosing all old messages. 😭

stefan2904 avatar May 21 '24 11:05 stefan2904

This exact same issue just happened to me. My iPhone was running out of space and I opened signal. Now after freeing up space the Signal app says "Problem Retrieving Data" and immediately crashes when I click continue. Is there no way to recover the data?

acanis avatar May 22 '24 01:05 acanis

Tap 8 times on the white area of "Problem Retrieving Data". It will ask "What would you like to do with the link to your debug log?", and choose email support. I sent a bug report for the same issue last week.

I just hope they will fix it soon. The more people send their report, the more they will (hopefully) pay attention to this bug. Last two updates haven't fixed it for me, and I have read every single post about this issue. There is no way to recover the data.

birfan avatar May 24 '24 09:05 birfan

I got the same issue, any update? I don't want to lose my data

Nerodelo avatar May 31 '24 14:05 Nerodelo

Tap 8 times on the white area of "Problem Retrieving Data". It will ask "What would you like to do with the link to your debug log?", and choose email support. I sent a bug report for the same issue last week.

I just hope they will fix it soon. The more people send their report, the more they will (hopefully) pay attention to this bug. Last two updates haven't fixed it for me, and I have read every single post about this issue. There is no way to recover the data.

It's impossible for me to send report, app crash before

Nerodelo avatar May 31 '24 14:05 Nerodelo

Tap 8 times on the white area of "Problem Retrieving Data". It will ask "What would you like to do with the link to your debug log?", and choose email support. I sent a bug report for the same issue last week. I just hope they will fix it soon. The more people send their report, the more they will (hopefully) pay attention to this bug. Last two updates haven't fixed it for me, and I have read every single post about this issue. There is no way to recover the data.

It's impossible for me to send report, app crash before

Don't click "continue" on the "problem retrieving data" screen. Just tap 8 times on the white area. If that doesn't work, try contacting support directly.

birfan avatar Jun 02 '24 22:06 birfan

This may not be a helpful addition, but just a +1 that this is affecting another user I work with, who also had what seems like database corruption after a low storage warning.

I have advised them to share debug logs. Happy to assist otherwise if I can.

(Also https://github.com/signalapp/Signal-iOS/issues/5813, https://github.com/signalapp/Signal-iOS/issues/5815).

rocodes avatar Jun 14 '24 14:06 rocodes

+1

I have the same issue - shared debug logs via email and really looking for the bug fix, since this is affecting core Signal functionality.

Please bump up the priority, happy to assist and share more logs/data from iOS if needed to streamline the fix.

mixmaxdp avatar Jun 15 '24 02:06 mixmaxdp

This issue was fixed for me in the final update released yesterday (version 7.15)!

Make sure you have enough free storage on your phone (I had 6 GB), update the app, then open the Signal app. Continue with the database recovery step. It doesn't crash, the recovery is complete, and I got back both my old messages (including media shared) before the crash, and every message I received after.

Thank you Signal team for fixing it!

birfan avatar Jun 15 '24 08:06 birfan

I have encountered the same issue. My iPhone storage was full and I opened Signal and it crashed. Next time I opened Signal, it gave me the same error as described above ("Problem Retrieving Data"). When trying to retrieve data, it reaches 57% and then tells me that data cannot be retrieved and I am supposed to reset Signal completely which I do not want to do as I do not want to lose all my messages and media data. Interestingly enough I am still receiving new messages and they pop up on my home screen but I have no way to access them as I run into "problem retrieving data" again. Any new insights what I can do?

c-mar-coder avatar Jun 28 '24 19:06 c-mar-coder

exact same problem here. +1

benjamindahl avatar Jul 11 '24 06:07 benjamindahl

Same issue here +1

dronox avatar Jul 22 '24 09:07 dronox

I have the same exact issue. Got a storage warning on my iPhone and Signal gives me the "Problem Retrieving Data" screen ever since. I continue to receive notifications for new messages however.

Looks like @birfan was able to do a successful recovery on v7.15 while @c-mar-coder's recovery failed.

I haven't tried pressing "Continue" yet because I am afraid of losing all my data.

@c-mar-coder can you confirm you were able unable to fix this even after upgrading to v7.15?

Is there anyone else who got this error screen and was able to recover successfully?

hanifvirani avatar Aug 21 '24 05:08 hanifvirani

Tried sending a debug log through email after updating the Signal app, but keep getting the This is not the latest version of Signal. reply.

Is this not the latest version?

Filter: Signal - iOS Debug Log - LaunchFailure_DatabaseCorruptedAndMightBeRecoverable Hardware: iPhone HID: 14,6 iOS Version: 17.6.1 (21G93) Signal Version: 7.25.0.287

Kuraio avatar Aug 24 '24 14:08 Kuraio

This has just affected me as well - low storage, it glitched a bit and even though I cleared space and was receiving new messages, one “ghost” message never appeared and was causing a stuck notification. I tried updating the app to 7.32 to resolve it with no luck, and this morning I open it to see the exact messages as everyone here, and it fails to recover. I submitted my debug logs via the link, but right now am looking at seemingly losing my entire Signal history and all associated media which is pretty awful.

If that recovery process is supposed to work then the only thing I can think of is to clear more space than I have (1.5 GB) in the hopes that maybe this is partly related to not enough space for the recovery process to work properly.

If that’s not the case then I’m pretty stuck until there is help from developers or a fix, which hopefully is possible…

cosmicpudding avatar Oct 13 '24 02:10 cosmicpudding

In case this helps anyone else, I was able to successfully recover my data. I just made sure I had enough free storage space before clicking "Continue".

hanifvirani avatar Nov 04 '24 10:11 hanifvirani

+1 I even made 25Gigabytes of free space, but didn't work. My signal data is around 4.5 Gigabyte

OctopusET avatar Nov 06 '24 15:11 OctopusET

Hitting the same issue: got messages while iphone storage space was full, can no longer restore data from signal (despite now having > 20GB free of space).

Looking at the logs:

2024/11/16 08:08:24:654  🧡 [DatabaseRecovery.swift:552 copyTable(tableName:from:to:)]: Error while iterating: SQLite error 11: database disk image is malformed - while executing `SELECT * FROM keyvalue`
2024/11/16 08:08:24:657  🧡 [DatabaseRecovery.swift:564 copyTable(tableName:from:to:)]: Error when reading: SQLite error 11: database disk image is malformed - while executing `COMMIT TRANSACTION`
2024/11/16 08:08:24:657  🧡 [DatabaseRecovery.swift:402 copyTableThatMustBeCopiedFlawlessly(tableName:oldDatabaseStorage:newDatabaseStorage:)]: Completely unable to copy keyvalue

Updating the app does not help the issue.

As others have mentioned, the data is definitely still there (Signal is taking 11GB space on my phone), so there should be a way to fix the corrupt messages and restore the state for most data.

Seems to be a duplicate of issue 5813, which also has no resolution.

mihaelacr avatar Nov 16 '24 12:11 mihaelacr

Same error here. My wife's iPhone had no empty space and signal crashed. After getting some space we got the same error as above.

trashcoder avatar Nov 30 '24 12:11 trashcoder

I have spent more time looking into this, and I believe the following steps would solve the problem:

  1. allow the user to export the SQLlite database
  2. the user fixes the database, for example via sqlite3 mydata.db ".dump" | sqlite3 new.db
  3. allow the user to re-import the database.

1 and 3 can be done from the current failure UI screen. 2 is the responsibility of the user.

I have reached out to the signal team but have not heard back on whether they are willing to implement steps 1 and 3.

In lieu of that, the next question to answer is whether if I build Signal from source myself (to implement 1), and put it on my iPhone, will it be able to see my data that was written by the Signal app from the app store?

mihaelacr avatar Dec 08 '24 11:12 mihaelacr

I have spent more time looking into this, and I believe the following steps would solve the problem:

  1. allow the user to export the SQLlite database
  2. the user fixes the database, for example via sqlite3 mydata.db ".dump" | sqlite3 new.db
  3. allow the user to re-import the database.

1 and 3 can be done from the current failure UI screen. 2 is the responsibility of the user.

I have reached out to the signal team but have not heard back on whether they are willing to implement steps 1 and 3.

In lieu of that, the next question to answer is whether if I build Signal from source myself (to implement 1), and put it on my iPhone, will it be able to see my data that was written by the Signal app from the app store?

@mihaelacr I have the same problem, did you find any solution for this?

1din555go avatar Dec 20 '24 21:12 1din555go

if I build Signal from source myself (to implement 1), and put it on my iPhone, will it be able to see my data that was written by the Signal app from the app store?

I asked this on iOSProgramming reddit; they said one would not be able to get at one's own data this way.

Which is weird because it effectively means the data is effectively owned/controlled by the app developer (Signal devs), not by the "owner" of the Apple device.

Would be nice if anybody could confirm this.

nh2 avatar Dec 20 '24 23:12 nh2

if I build Signal from source myself (to implement 1), and put it on my iPhone, will it be able to see my data that was written by the Signal app from the app store?

I asked this on iOSProgramming reddit; they said one would not be able to get at one's own data this way.

Which is weird because it effectively means the data is effectively owned/controlled by the app developer (Signal devs), not by the "owner" of the Apple device.

Would be nice if anybody could confirm this.

@nh2 Have you e-mailed your solution to the signal team? No update has solved the problem since last year

Nerodelo avatar Feb 27 '25 11:02 Nerodelo

@Nerodelo Which solution? According to my post above, there's no solution, because the Signal team owns our data with their signing key, and we as users (and developers) can't get to it.

The only real solution seems to be if the Signal team builds a raw DB export feature into the main Signed signal app, or provides us with a signed app out-of-band that has this feature.

nh2 avatar Feb 28 '25 00:02 nh2

I still have the same problem, I'm super sad I could loose years of conversation Did anyone succeed with an iMazing (Im using iPhone7, iOS 15.7.1) encrypted backup to restore any part of it?

Blaualgen avatar Jun 11 '25 20:06 Blaualgen

I still have the same problem, I'm super sad I could loose years of conversation Did anyone succeed with an iMazing (Im using iPhone7, iOS 15.7.1) encrypted backup to restore any part of it?

Same problem. That's super sad. I'm also thinking of some external help but I didn't see any example which is successful from others.

kurtislamtk avatar Jul 10 '25 13:07 kurtislamtk

I feel the same. I also have the same problem. It’s so sad and it’s not even something I caused. It wasn't my fault. Still no reply from support.

1din555go avatar Jul 10 '25 22:07 1din555go

Same problem.

kevin-valerio avatar Sep 10 '25 16:09 kevin-valerio

Hi, we're very sorry you're experiencing these issues. Database corruption is a longstanding and very complex issue that we've made progress on, but is obviously still present.

For anyone crashing during the "Database Recovery" flow, it'd be super valuable if you could provide .ips crash files so we can investigate. Instructions for that can be found here.

Additionally, if you're able to collect debug logs (either from the sheet that pops during launch saying something is wrong, or by tapping 8 times anywhere on the screen), those would be helpful in addition to the .ips files.

sashaweiss-signal avatar Sep 10 '25 18:09 sashaweiss-signal