Closed amarcolini closed 3 months ago
magick
and convert
work when I modify the source code to force them onAn error like The system cannot find the file specified
suggests that the files may be missing, not that the converter is causing the problem.
Can you share more about your platform and how you are running imessage-exporter
? What is the output of imessage-exporter -d
?
Here is the output for -d
:
Handle diagnostic data:
Contacts with more than one ID: 8
Message diagnostic data:
Total messages: 140685
Messages not associated with a chat: 3
Attachment diagnostic data:
Total attachments: 7485
Data referenced in table: 7.81 GB
Data present on disk: 6.41 GB
Missing files: 1010 (13%)
No path provided: 1
No file located: 1009
Global diagnostic data:
Total database size: 40.00 KB
Duplicated contacts: 32
Duplicated chats: 6
I will also note that on version 1.9.0 of the CLI this issue doesn't occur, and regardless of whether ImageMagick is present imessage-exporter outputs "No HEIC converter found". I believe version 2.0.1 fixed finding executables on the system path for Windows, but it finds the built-in Windows convert
, leading to the first two error messages. I still don't understand the last one, because running where convert
outputs:
C:\Program Files\ImageMagick-6.9.13-Q16-HDRI\convert.exe
C:\Windows\System32\convert.exe
I'm using the latest version of the imessage-exporter
CLI on Windows 11.
Thank you for the details, I will look into this.
Ok I seem to have found something. This answer points out that some Windows API for creating command processes checks System32 before the PATH variable, which would give the system convert
priority over ImageMagick's. It could be that Rust uses this API internally to call commands.
There indeed is some platform specific behavior here. See: #37519.
Given the name collision, I may need to remove the legacy support altogether.
I can confirm the name collision. Renaming the Windows convert
utility to something else causes image conversion to work as normal. All .heif and .heic files are converted to .jpeg (.mov files stay the same).
(Slightly unrelated) I think for non-Mac users it would be beneficial to note that ImageMagick is required for image conversion somewhere in the documentation (or maybe the error messages). Also, maybe check for ImageMagick v7 before legacy versions. Windows has its own "convert" command that may get confused for ImageMagick. Another fix could be to make sure the convert command isn't in System32.
Attempting to export an iOS message database using
-c compatible
on Windows yielded these errors:Unable to update "some_filename.jpeg" metadata: The system cannot find the file specified. (os error 2)
. This occurs with many files, but some attachments do get copied (excluding any .heic or .heif files). No conversion occurs.This doesn't seem to have to do with ImageMagick at all, since it doesn't change the behavior of the program