johanw666 / Signal-Android

Fork from a private messenger for Android with extra options added: full backup and (partial, ony text) xml backup of messages. Restore can happen at any time, not only after a fresh install. Import SMS database. Import of (unencrypted) WhatsApp databases. Removed apk expire. Choose between passphrase protection and the Android screenlock. Choice for the backup location (internal or removable storage on Android < 11 (on 11 and higher this is already possible)). Set the maptype in the place picker. Option to treat view-once media as normal media. Option to ignore remote deletion. Choose between FCM or websocket notification delivery.
https://johanw.home.xs4all.nl/Signal/signal-jw.html
GNU Affero General Public License v3.0
250 stars 16 forks source link

Exporting Plaintext SMS "Error, unable to write to storage. #19

Closed xNyxNox closed 3 years ago

xNyxNox commented 3 years ago

Let's begin with a checklist: Replace the empty checkboxes [ ] below with checked ones [x] accordingly. -->


Bug description

Describe here the issue that you are experiencing. When click the "Export plaintext backup" button, an error message appears saying "Error, unable to write to storage." I believe that this is due to the app only requesting media access in Android 11 instead of access to all storage.

After asking for help on reddit, someone offered their advice on how this could be handled and asked me to include his comments in this request. I'm editing this to include them. Here is the link

Steps to reproduce

Actual result: "Error, unable to write to storage." appears on the bottom of the screen. Expected result: A backup should begin to be created.

Screenshots

https://imgur.com/a/xis6qPV https://imgur.com/a/0tVo8oF

Device info

Device: Samsung Galaxy S10 Android version: 11 Signal version: 5.3.6.0-JW

Link to debug log

https://debuglogs.org/1e03c87453b7fd4a6f68bb5cf518e1150c8162d59c034cec706a96f41dd9d585

johanw666 commented 3 years ago

I see a NoExternalStorageException. If you go to Settings - Chats - Chat Backups, what is written below the backup folder section?

And do you have a micro sd card installed in the device?

Yu could try making a standard backup in the same directory you want to export the plaintext to (or one lower in the same path) and see if it works afterward.

xNyxNox commented 3 years ago

I see a NoExternalStorageException. If you go to Settings - Chats - Chat Backups, what is written below the backup folder section?

And do you have a micro sd card installed in the device?

Yu could try making a standard backup in the same directory you want to export the plaintext to (or one lower in the same path) and see if it works afterward.

Here is a screenshot of the path you asked me to go to. I don't see a "backup folder" option, not sure if it's related. https://imgur.com/a/ZS65gCq Also there is a screenshot of what happens when I try to make a backup using the "Create backup" option. That notification pops up for around 5 seconds, then disappears and as far as I can tell from making backups in the normal Signal app, it isn't making a backup. I also tried exporting an encrypted backup (through similar means that I tried exporting the plaintext backup) and got the original error.

Edit: No, no microSD card installed. Sorry, forgot to answer that.

xNyxNox commented 3 years ago

I've updated to the most recent build (5.2.11.0-JW) from 8 hours ago and the problem persists.

You asked about external storage, do I need a microSD card in my phone in order to perform a backup?

Additionally, since it seems like standard backups also don't work as far as I can tell simply uninstalling the fork and trying something else isn't really an option since I'd lose all messages.

I realize this is likely something that you build and maintain out of your interest and because you personally see the benefit of having these features. Personally, I have a lot of SMS messages stuck in Signal that I would really love to get out and honestly I don't know of a way to do it other than this incredible fork. If there is a Ko-fi or something that you have I'd be happy to donate for your time. If there is any more information or help you can provide about how I may be able to get this to work, that would be amazing.

johanw666 commented 3 years ago

You have not made a "normal" backup at all, then this probably does not work at the moment. I intend to make changes for Android 11 to fix this once and for all but I have to wait for my device to get Android 11 to develop and test this.

xNyxNox commented 3 years ago

Seems to have been solved in recent updates! :)