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

Cannot create backup due to java.io.IOException "Renaming temporary backup file failed!"

Open Noir- opened this issue 8 years ago • 21 comments

  • [x] I have searched open and closed issues for duplicates
  • [x] I am submitting a bug report for existing functionality that does not work as intended
  • [x] I have read https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports
  • [x] This isn't a feature request or a discussion topic

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

Noir- avatar Apr 17 '18 11:04 Noir-

Do you happen to have "removable external storage?"

moxie0 avatar Apr 19 '18 00:04 moxie0

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.

Noir- avatar Apr 19 '18 20:04 Noir-

Should be fixed in 4.20

moxie0 avatar Apr 24 '18 01:04 moxie0

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

Hellmark avatar May 11 '18 19:05 Hellmark

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)

Snuupy avatar May 16 '18 22:05 Snuupy

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)

johanw666 avatar May 19 '18 22:05 johanw666

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

AlfonsoMuskedunder avatar May 22 '18 15:05 AlfonsoMuskedunder

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)

riyapenn-signal avatar May 22 '18 16:05 riyapenn-signal

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

diemadedrei avatar May 23 '18 15:05 diemadedrei

Verizon s8 stock 8.0 https://debuglogs.org/edd170d0b6d04f715e3cb13f9a746e74462608d85a2fd198efa611cc2c9265d0

jeremymasters avatar May 23 '18 16:05 jeremymasters

Which file systems are your sdcards using?

Trolldemorted avatar May 23 '18 16:05 Trolldemorted

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

jeremymasters avatar May 23 '18 16:05 jeremymasters

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

Hellmark avatar May 23 '18 18:05 Hellmark

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

kazzatso avatar May 25 '18 06:05 kazzatso

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

https://debuglogs.org/4772af7f1178bcda1fbb7b4e4200887ea0c951b1f37691fdec6d47c168d599bd

kevinclevenger avatar May 30 '18 05:05 kevinclevenger

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.

Peter-Knoppers avatar May 30 '18 10:05 Peter-Knoppers

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

haffenloher avatar May 30 '18 10:05 haffenloher

@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.

Peter-Knoppers avatar May 30 '18 11:05 Peter-Knoppers

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.

johanw666 avatar May 30 '18 11:05 johanw666

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?

tp0 avatar Jun 20 '18 08:06 tp0