import-export-tools-ng icon indicating copy to clipboard operation
import-export-tools-ng copied to clipboard

Export to mbox failing at random points

Open LeeThompson opened this issue 1 year ago • 11 comments

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

LeeThompson avatar Jan 14 '25 05:01 LeeThompson

@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

cleidigh avatar Jan 14 '25 18:01 cleidigh

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

LeeThompson avatar Jan 14 '25 18:01 LeeThompson

@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

cleidigh avatar Jan 14 '25 19:01 cleidigh

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.

LeeThompson avatar Jan 14 '25 20:01 LeeThompson

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

cleidigh avatar Jan 14 '25 20:01 cleidigh

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.

LeeThompson avatar Jan 14 '25 20:01 LeeThompson

ok that sounds good. What workaround was it?

cleidigh avatar Jan 14 '25 21:01 cleidigh

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.

LeeThompson avatar Jan 14 '25 21:01 LeeThompson

Hello there,

I'm having the same error as I try to export the whole account:

ReferenceError: ExtensionError is not defined
onStopRequest chrome://mboximport/content/mboximport/modules/mboxImportExport-8.js:659

It stops always at the same folder and exporting this folder as a single folder does also not work as a workaround.

Thank you!

stevmei avatar Jan 21 '25 11:01 stevmei

@stevmei Sorry, I seem to be battling several real world things not found in my testing. If you roll back to v14.1.2 does that work? @cleidigh

cleidigh avatar Jan 21 '25 19:01 cleidigh

@LeeThompson @stevmei I will try to finish a beta for tomorrow to see if we can identify the message causing the error. @cleidigh

cleidigh avatar Jan 22 '25 00:01 cleidigh