sigtop icon indicating copy to clipboard operation
sigtop copied to clipboard

Issue with Invalid Arguments and Mentions in JSON Files

Open jsmith67438 opened this issue 10 months ago • 5 comments

I'm encountering multiple instances where the system is returning errors related to invalid arguments while opening JSON files, as well as issues with invalid mentions in messages.

sigtop: open <filename>.json: invalid argument

sigtop: invalid mention (index: X, body: X Y, placeholders: X, mentions: X: Y, Z)
sigtop: message with invalid mention (conversation: "<conversation name>", sent: <timestamp>)

sigtop: message with invalid mention in edit X (conversation: "<conversation name>", sent: <timestamp>)

jsmith67438 avatar Feb 20 '25 10:02 jsmith67438

sigtop: open <filename>.json: invalid argument

What OS? What filesystem? Can you say anything about the filename? Does it contain "special" (i.e. non-ASCII) characters? How many characters does it have?

sigtop: invalid mention (index: X, body: X Y, placeholders: X, mentions: X: Y, Z)
sigtop: message with invalid mention (conversation: "<conversation name>", sent: <timestamp>)

sigtop: message with invalid mention in edit X (conversation: "<conversation name>", sent: <timestamp>)

Are you using the latest version of sigtop? If not, can you share the X/Y/Z values?

tbvdm avatar Feb 21 '25 21:02 tbvdm

I am using Ubuntu 24.04 with an ext4 filesystem and the latest version of sigtop. When attempting to export data to an external disk formatted as exFAT, I encounter the following "invalid argument" errors (example with randomized names and dates, but the format remains the same):

sigtop: open PNI:85aeg5d-534v-745f-234f-dsf464t (PNI:PNI:85aeg5d-534v-745f-234f-dsf464t).json: invalid argument
sigtop: open Group Name || SubName❄️ (group).json: invalid argument
?6 (85aeg5d-534v-745f-234f-dsf464t ).json: invalid argument

However, when exporting to an ext4-formatted local disk, I receive these errors only (but they also occour for exFAT):

sigtop: cannot fix edited long message (conversation: "Group Name", sent: 2025-02-20 01:42:31 (174029000345))
sigtop: attachment without path
sigtop: open Channel1 (group).json: file exists

Interestingly, I did not encounter the "invalid argument" errors today for unknown reasons.

jsmith67438 avatar Feb 25 '25 10:02 jsmith67438

I am using Ubuntu 24.04 with an ext4 filesystem and the latest version of sigtop. When attempting to export data to an external disk formatted as exFAT, I encounter the following "invalid argument" errors (example with randomized names and dates, but the format remains the same):

sigtop: open PNI:85aeg5d-534v-745f-234f-dsf464t (PNI:PNI:85aeg5d-534v-745f-234f-dsf464t).json: invalid argument
sigtop: open Group Name || SubName❄️ (group).json: invalid argument
?6 (85aeg5d-534v-745f-234f-dsf464t ).json: invalid argument

sigtop cannot create these files because the filenames contain characters that are not permitted on exFAT. sigtop properly sanitises filenames for exFAT on Windows, but not on Unix.

sigtop: cannot fix edited long message (conversation: "Group Name", sent: 2025-02-20 01:42:31 (174029000345))

You can ignore this error. It is a failed attempt to work around a (minor) bug in Signal.

sigtop: attachment without path

This is an as yet unsolved problem that is tracked in #51.

sigtop: open Channel1 (group).json: file exists

This is because you have two groups with the same name. I'll commit a fix for this soon.

tbvdm avatar Feb 26 '25 13:02 tbvdm

Thank you very much for the quick response. I will try to export messages only to my ext4 filesystem for now, but will still need to extract all media files to my exFAT disk.

jsmith67438 avatar Feb 27 '25 10:02 jsmith67438

Some groups is actually named something similar to <-Group------name------US>, which seems like it is not permitted on ext4 either, is there any way these type of names can be defaulted to exported as their group id instead, if this error occurs?

jsmith67438 avatar Feb 27 '25 11:02 jsmith67438

I replied by email but GitHub is unreliable. New attempt:

I'm very busy at the moment. Sorry. I'll get back to you as soon as possible.

tbvdm avatar Mar 11 '25 18:03 tbvdm

Some groups is actually named something similar to <-Group------name------US>, which seems like it is not permitted on ext4 either

That's not likely given that ext4 disallows only NUL and slash in filenames. What is the exact error you're getting?

tbvdm avatar Jul 30 '25 20:07 tbvdm