Signal-android: Cannot create backup due to java.io.IOException "Renaming temporary backup file failed!"

Created on 17 Apr 2018  路  21Comments  路  Source: signalapp/Signal-Android


Bug description

When I start an encrypted backup it aborts without any notice on the GUI. In the debug logs I can read java.io.IOException: Renaming temporary backup file failed!.

Steps to reproduce

  • Start the backup

Actual result: The process aborts without letting me know what it going on. The GUI looks like before the backup.
Expected result: The backup completes. When there's any error, I expect an error message.

Device info


Device: LG G3 D855
Android version: 7.1.2 (LinageOS 14.1-20180404-NIGHTLY-d855)
Signal version: 4.18.0

All permissions for write access are granted.

Link to debug log

https://debuglogs.org/76c8a4cc871332efbd2b8b03fb1e9a4e8c2e8c05b520dd90b2db76f4937bc790

Most helpful comment

Should be fixed in 4.20

All 21 comments

Do you happen to have "removable external storage?"

Yes I have a micro SD card mounted. But I can't tell whether the backup is created on it or on the internal storage. I could try the backup again without the card inserted.

Should be fixed in 4.20

Attempted to eject the SD card to do the work around, but no luck. Hit the button and nothing happens.

You have to physically pull the SD card out of the phone, I had it "ejected" in the OS settings but it wouldn't work until I physically ejected the SD card from the phone (subsequently ejecting my SIM card as well because they're in the same tray)

I applied https://github.com/signalapp/Signal-Android/commit/6a2b76180ed8ac265fa5856e2830fc042dfeb5aa on 4.19.3 but I still get this error when I try to make a backup:

05-20 00:36:05.428 W/JobConsumer(13461): java.io.IOException: Renaming temporary backup file failed!
05-20 00:36:05.428 W/JobConsumer(13461):    at org.thoughtcrime.securesms.jobs.LocalBackupJob.onRun(LocalBackupJob.java:78)
05-20 00:36:05.428 W/JobConsumer(13461):    at org.whispersystems.jobqueue.JobConsumer.runJob(JobConsumer.java:76)
05-20 00:36:05.428 W/JobConsumer(13461):    at org.whispersystems.jobqueue.JobConsumer.run(JobConsumer.java:46)

I'm on 4.20.2 now, but I still receive the same error. (I disabled and reenabled backups before attempting to create a backup.)
Here's a debug log: https://debuglogs.org/59903411fef7872b73b04313da2a5658d726e10848513b5cfda36dc24ee5389b

Still an issue for

Device: HUAWEI STF-L09 (STF-L09)
Android version: 8.0.0
Signal Version: 4.20.2
Log: https://debuglogs.org/dc35e80b7b2048ac0435d34647b6f23344a8559524ff8f8e2044ff2d4b325966

聽 | 05-22 20:36:55.134  9589  9589 W ChatsPreferenceFragment: Queing backup...
聽 | 05-22 20:36:55.142  9589  9613 W LocalBackupJob: Executing backup job...
聽 | 05-22 20:36:56.562  9589  9594 I zygote  : Do full code cache collection, code=215KB, data=157KB
聽 | 05-22 20:36:56.564  9589  9594 I zygote  : After code cache collection, code=176KB, data=116KB
聽 | 05-22 20:36:57.471  9589  9599 I zygote  : Background concurrent copying GC freed 92314(6MB) AllocSpace objects, 0(0B) LOS objects, 50% free, 5MB/11MB, paused 762us total 108.318ms
聽 | 05-22 20:37:00.843  9589  9613 I zygote  : Deoptimizing void org.thoughtcrime.securesms.backup.FullBackupExporter$BackupFrameOutputStream.writeStream(java.io.InputStream) due to JIT inline cache
聽 | 05-22 20:37:00.862  9589  9613 W JobConsumer:
聽 | 05-22 20:37:00.862  9589  9613 W JobConsumer: java.io.IOException: Renaming temporary backup file failed!
聽 | 05-22 20:37:00.862  9589  9613 W JobConsumer:   at org.thoughtcrime.securesms.jobs.LocalBackupJob.onRun(LocalBackupJob.java:78)
聽 | 05-22 20:37:00.862  9589  9613 W JobConsumer:   at org.whispersystems.jobqueue.JobConsumer.runJob(JobConsumer.java:76)
聽 | 05-22 20:37:00.862  9589  9613 W JobConsumer:   at org.whispersystems.jobqueue.JobConsumer.run(JobConsumer.java:46)

Can confirm, that backup is still not working on 4.20.2 on LineageOS 14.1, Xperia Z5 with sd card inserted.

Which file systems are your sdcards using?

I opened the microsd card package, stuck it in my phone and here we are.

@moxie0 Yeah, running 4.20.4, and it still isn't fixed yet, so this was prematurely closed.

@moxie0 Not fixed as of Signal 4.20.4. HTC One M9, Android 7.0.

I don't understand why this is closed when the issue is still a problem.

https://debuglogs.org/4772af7f1178bcda1fbb7b4e4200887ea0c951b1f37691fdec6d47c168d599bd

I've had the same problem on my Galaxy S5. Removing the SD card allowed me to create a proper backup (which I successfully moved to and imported into Signal on my new device). Clearly there is a difference in permissions when writing to SD card vs normal storage and this is not well handled.

@kevinclevenger @OTSim This is supposedly fixed in v4.20.5, see #7831.

@kevinclevenger The current (standard?) version in the google app store is 4.19.3. A fix that is only available since version 4.20.5 does not help ordinary users. Few users will have found the work-around that I used; please push the fixed version to the google app store.

It is fixed, backups are now stored in external_sd/Android/data/org.thoughtcrime.securesms/files/Signal on my device. BTW, the official apk has not yet showed up in the beta channel, I compiled myself.

Seems to be fixed in 4.20.9 (Play).
But why are the backups now going to the external SD card instead of internal storage?

Can confirm that this is fixed for me with the 4.23 branch. A backup is now created on the SD card in the same folder as @johanw666 stated.

Was this page helpful?
0 / 5 - 0 ratings