Closed N-Prime closed 1 year ago
had a similar issue on a basic arch setup (was getting exit status 125). seemed to be a docker configuration issue but i wasn't able to look into it too much. used the No-Docker install method and was able to get things working.
To be honest it shouldn't matter too much what VM it runs in, as all the complicated bits happen inside the Docker container. (Unfortunately that means it's a but opaque when something goes wrong, and I haven't put in the effort to make it easier to inspect.)
Let's start from basic and build up to see what's going wrong. Try the stuff below and let me know where and what goes wrong!
docker run --rm -it --entrypoint='' \
--volume $HOME/.config/Signal:/Signal \
carderne/sigexport:v1.5.4 bash
Inside the shell you get from running the above, run:
sigexport --source=/Signal --list-chats
Thank you for assisting with this!
The first command downloaded the image (when I ran sigexport previously it didn't download the image) and the second command worked for showing the chats.
But if you run sigexport --list-chats
from a normal command line it still doesn't work?
What about this:
docker run --rm -it --volume $HOME/.config/Signal:/Signal carderne/sigexport:v1.5.4 --list-chats
sigexport --list-chats from a normal command line still gives the error with exit status 126.
The docker run line (with sudo) works.
Okay maybe the sudo thing is related?
Can you try this:
Save this into a file called test_docker.py
: (remember to change USERNAME
).
import subprocess
cmd = ['docker', 'run', '--rm', '--volume=/home/USERNAME/.config/Signal:/Signal', 'carderne/sigexport:v1.5.4']
p = subprocess.run(cmd, capture_output=True, text=True, check=True)
print(p.stdout)
Then run:
python test_docker.py
And? If you get a 126
error, maybe try with sudo
?
I got a 126 without sudo. When run with sudo, I got a wall of text that contains the content of messages.
I also needed sudo for the docker command in your first comment of this thread. People write commands all the time, sometimes they need sudo, sometimes they don't, and I just figured that this was one of those commands that needs sudo and didn't think to mention it before.
Ok, so the only issue here was sudo
...?
So:
sudo sigexport outputdir
.On a system that set up docker without doing the post-install steps for sudo-less usage, using sudo sigexport --list-chats
(or to an output directory) gives the error sudo: sigexport: command not found
(edit - fixable with sudo -E env "PATH=$PATH" sigexport --list-chats
).
On a system with docker set up for sudo-less usage everything works, so this seems to be a required step. [Edit 2 - Not really required since workarounds are available. In my case, it didn't even occur to me to try sigexport with sudo this time because I know I didn't need it when it worked for me in the past (I know I just copied and pasted the commands in the README back then). If I did try it, I would have looked up the error and gotten it working.)
I think it's a good idea to add a note to the README because:
Something to the effect of:
First off, install Docker (including following the post-installation steps for managing Docker as a non-root user) and make sure you have Python installed.
...would help keep people from going astray.
Thanks again for your help!
I feel a bit foolish it turned out to be such a simple thing but am glad it's an easy fix.
Desktop (please complete the following information):
I've tried to get it working in several VMs - Ubuntu 22.04, Mint 21, Mint 21.1 (tried Mint twice because I had it working before in a Mint VM in November but no longer have it), and Fedora 37.
bash
Describe the bug
In all of them, docker is working (hello-world is successful), though to get docker installed on Mint, I had to edit the docker.list file to read "jammy" instead of vanessa or vera.
I copied my Signal folder (which contains the sql folder among others) to ~/.config
I see output for
sigexport --help
but if I try to runsigexport --list-chats
orsigexport ~/signal-chats
I get:To reproduce Steps to reproduce the behavior. Please include the exact commands tried.
Create a VM, update it, install docker using the instructions from docs.docker.com, test docker (hello-world), install python3-pip if needed, edit .bashrc to add ~/.local/bin to PATH
Install signal-export with
pip install signal-export
Check with
sigexport --help
Copy Signal folder to ~/.config
Attempt to use sigexport with
--list-chats
or export withsigexport ~/signal-chats
As an aside, is there a specific distro that you test this with?
If you describe a configuration that you know works (distro, docker version, etc.), I can try to recreate it in a VM and just use that VM for exporting signal chats.