Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to mbox failing at random points #673

Open
LeeThompson opened this issue Jan 14, 2025 · 8 comments
Open

Export to mbox failing at random points #673

LeeThompson opened this issue Jan 14, 2025 · 8 comments
Assignees

Comments

@LeeThompson
Copy link

LeeThompson commented Jan 14, 2025

I'm doing my annual mbox format exporting to backup my email (I then delete the past year's email from the IMAP server) except this year ImportExportToolsNG is randomly stopping in the middle of the batches. No errors, just stops at N of Y messages.

The error console has this:

21:44:56.192 Uncaught TypeError: data is undefined
    onStopRequest chrome://mboximport/content/mboximport/exportTools.js:1362
exportTools.js:1362:7

I don't think it's a specific message or anything as it stops at a different message every time.

This may be related to #332 but I'm not sure. (I never import, I only use this as a backup tool).

Other Info

  • The mail server is my own and is on the same wired LAN.

Versions

OS: Windows 10.0.19044.2006 (Enterprise Edition)
Thunderbird: 128.6.0esr (64-bit)
ImportExportToolsNG: 14.1.4

@cleidigh
Copy link
Collaborator

@LeeThompson
Sorry for the issue. It's odd and frustrating especially when v14.1.4 just released yesterday. I am confused though. The error you gave (thank you), is in the eml export code, no relationship with the mbox code. I did a sanity check and didn't have any issues with either structural export of eml or mbox.
So I am confused how you even got that error.
Did you try exporting a single mbox?
Also perhaps a Thunderbird restart?
Christopher

@LeeThompson
Copy link
Author

How I do backups

  1. I go into one of my mailbox folders and sort by date.
  2. I select all of the prior year (2024 in this case) messages
  3. I right click and select "Export messages as > mbox Format -> new mbox file" for the path I use a work folder on the local drive and I name it in this format: foldername.mbox

Additional Tests / Info

  • I restarted Thunderbird, no change.
  • Some of my folders have exported fine while others I'm having problems with.
  • All the folders in Thunderbird are set for "offline use"
  • I even have started to select "Get Messages" first to ensure all of the messages are local.
  • I tried right clicking on the IMAP folder and exporting it but it resulted in a 0 length mbox file. The console error is below. (I don't use this method because I don't want current year messages included.)

Folder Export Error

10:47:27.023 ReferenceError: ExtensionError is not defined mboxImportExport-8.js:659:15

@cleidigh
Copy link
Collaborator

@LeeThompson
Thanks for the detailed info. Ok the new mbox uses the eml code so your first error makes some sense. The mbox error should have bubbled to a popop, have to check that.
Both errors indicate some form of corrupted msg where even the internal get msg seems to fail.
A lot of this is old code I'm desperately trying to replace with better error handling and structure.
If you export as eml we would get messages until the problem email, but I may end up having to do some quick debug to determine what message is causing you the problem. Try setting the add date to file properties option on the Misc tab. Then export as eml and maybe we can see where it stops. Use the smallest folder so we might track it down.
I will do a debug version if I have to.
@cleidigh

@LeeThompson
Copy link
Author

LeeThompson commented Jan 14, 2025

I don't think it's corruption, because it will fail at a different point each time.

Did the EML export of one of the folders that was failing and it worked fine, afterwards I did the mbox format export and this time, it worked okay. So that's interesting.

NOTE: I did not do the add date option.

I went back and tried EML export first, then mbox with another problem folder and it worked fine, again.

Update: Completed a larger test with a folder that has 5817 messages from 2024. This time it worked fine. So this seems to be a workaround for me at least.

@cleidigh
Copy link
Collaborator

I would tend to agree, but when the getrawmessage fails that tells me it's a low level error.

@LeeThompson
Copy link
Author

Completed a larger test with a folder that has 5817 messages from 2024. This time it worked fine. So this seems to be a workaround for me at least.

@cleidigh
Copy link
Collaborator

ok that sounds good.
What workaround was it?

@LeeThompson
Copy link
Author

ok that sounds good. What workaround was it?

I export EML format then mbox format.

Basically it seems that the mbox format export isn't doing something it needs to do properly but the EML export takes care of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants