K-9: exporting settings always fails: global or individual account

Created on 5 Apr 2018  路  7Comments  路  Source: k9mail/k-9

Expected behavior

export success

Actual behavior

failure message. additionally the xml file is not fully written: truncated

Steps to reproduce

  1. load k9
  2. burger
  3. export
  4. fi set path
  5. save
  6. error
  7. optional: file explorer to open xml

or

  1. long click imap account
  2. export only that one
    .. same results

Environment

K-9 Mail version: 5.403

Android version: 444

Account type (IMAP, POP3, WebDAV/Exchange):

all IMAP, about a dozen accounts

Because i am missing a reply button i had planned to export accounys, clear data, uninstall, remive leftover files, reboot, reinsrall

but cannot export

Problematically I can't rememver the password for one account so I'm stuck

bug

Most helpful comment

Are passwords salted and hashed, or more easily reversibly hashed? Or is there another way to backup account authentication information?

All 7 comments

Please provide a debug log. See https://github.com/k9mail/k-9/wiki/LoggingErrors

As I will not have access to resources for that soon I did capture with CatLog what might be helpful, an illegal character warning

04-06 12:52:44.798 W/Accounts$ExportAsyncTas(18754): com.fsck.k9.preferences.SettingsImportExportException: com.fsck.k9.preferences.SettingsImportExportException: Illegal character (d83d)

04-06 13:08:47.608 E/dalvikvm(24875): >>>>> com.fsck.k9 [ userId:0 | appId:10397 ]
04-06 13:08:47.768 W/XPrivacy(24875): Hooking package=com.fsck.k9
04-06 13:08:48.118 I/dalvikvm(24875): Could not find method android.os.PowerManager.isIgnoringBatteryOptimizations, referenced from method com.fsck.k9.power.DozeChecker.isAppWhitelisted
04-06 13:08:48.128 I/K9 (24875): Registered: unmount receiver
04-06 13:08:48.128 I/K9 (24875): Registered: shutdown receiver
04-06 13:08:48.138 V/K9 (24875): Initializing observer: com.fsck.k9.provider.MessageProvider$1@44e00ac0
04-06 13:08:48.328 I/CoreService(24875): CoreService: com.fsck.k9.service.MailService.onCreate()
04-06 13:08:48.328 I/CoreService(24875): CoreService: com.fsck.k9.service.MailService.onStart(Intent { act=com.fsck.k9.intent.action.MAIL_SERVICE_RESET cmp=com.fsck.k9/.service.MailService (has extras) }, 1)
04-06 13:08:48.348 I/MailService(24875): MailService.onStart(Intent { act=com.fsck.k9.intent.action.MAIL_SERVICE_RESET cmp=com.fsck.k9/.service.MailService (has extras) }, 1), hasConnectivity = false, doBackground = true
04-06 13:08:48.358 D/CoreService(24875): CoreService (com.fsck.k9.service.MailService) queueing Runnable 1160902424 with startId 1
04-06 13:08:48.358 D/CoreService(24875): CoreService (com.fsck.k9.service.MailService) running Runnable 1160902424 with startId 1
04-06 13:08:48.358 I/MailService(24875): No connectivity, canceling check for com.fsck.k9
04-06 13:08:48.388 D/CoreService(24875): CoreService (com.fsck.k9.service.MailService) completed Runnable 1160902424 with startId 1
04-06 13:08:48.698 I/CoreReceiver(24875): CoreReceiver.onReceive Intent { act=com.fsck.k9.service.BroadcastReceiver.cancelIntent flg=0x10 cmp=com.fsck.k9/.service.BootReceiver (has extras) }
04-06 13:08:48.698 I/BootReceiver(24875): BootReceiver.onReceive Intent { act=com.fsck.k9.service.BroadcastReceiver.cancelIntent flg=0x10 cmp=com.fsck.k9/.service.BootReceiver (has extras) }
04-06 13:08:48.698 I/BootReceiver(24875): BootReceiver Canceling alarmedIntent Intent { act=com.fsck.k9.intent.action.MAIL_SERVICE_WAKEUP cmp=com.fsck.k9/.service.MailService }
04-06 13:08:48.698 I/dalvikvm(24875): Could not find method android.app.AlarmManager.setAndAllowWhileIdle, referenced from method com.fsck.k9.helper.K9AlarmManager.setAndAllowWhileIdle
04-06 13:08:48.868 I/CoreService(24875): CoreService: com.fsck.k9.service.PushService.onCreate()
04-06 13:08:48.878 I/CoreService(24875): CoreService: com.fsck.k9.service.PushService.onStart(Intent { act=com.fsck.k9.service.PushService.stopService cmp=com.fsck.k9/.service.PushService (has extras) }, 1)
04-06 13:08:48.878 I/CoreService(24875): CoreService: com.fsck.k9.service.MailService.onDestroy()
04-06 13:08:48.898 I/am_activity_launch_time(1394): [0,1168938888,com.fsck.k9/.activity.Accounts,1364,1364,1]
04-06 13:08:49.058 I/CoreService(24875): CoreService: com.fsck.k9.service.PushService.onDestroy()
04-06 13:08:58.978 I/am_create_activity(1394): [0,1187397848,97,com.android.documentsui/.DocumentsActivity,android.intent.action.CREATE_DOCUMENT,application/octet-stream,NULL,0,com.fsck.k9,0]
04-06 13:08:58.998 I/am_pause_activity(1394): [0,1168938888,com.fsck.k9/.activity.Accounts,0]
04-06 13:08:59.018 I/am_on_paused_called(24875): [0,com.fsck.k9.activity.Accounts]
04-06 13:08:59.208 I/sf_frame_dur(333): [AtchDlg:com.fsck.k9/com.fsck.k9.activity.Accounts,14,0,3,0,0,1,0]
04-06 13:08:59.358 I/sf_frame_dur(333): [com.fsck.k9/com.fsck.k9.activity.Accounts,247,2,3,0,5,0,2]
04-06 13:09:04.538 D/Documents(24927): onFinished() [content://com.android.externalstorage.documents/document/0000-0000%3A___NEVER_reformat%2Faaak9_settings_export_2018-04-06.k9s]
04-06 13:09:04.588 I/am_resume_activity(1394): [0,1168938888,97,com.fsck.k9/.activity.Accounts,0]
04-06 13:09:04.608 I/Accounts(24875): onActivityResult requestCode = 2, resultCode = -1, data = Intent { dat=content://com.android.externalstorage.documents/document/0000-0000:___NEVER_reformat/aaak9_settings_export_2018-04-06.k9s flg=0x43 }
04-06 13:09:04.698 I/am_on_resume_called(24875): [0,com.fsck.k9.activity.Accounts]
04-06 13:09:04.948 W/Accounts$ExportAsyncTas(24875): com.fsck.k9.preferences.SettingsImportExportException: com.fsck.k9.preferences.SettingsImportExportException: Illegal character (d83d)
04-06 13:09:04.948 W/Accounts$ExportAsyncTas(24875): at com.fsck.k9.preferences.SettingsExporter.exportToUri(SettingsExporter.java:116)
04-06 13:09:04.948 W/Accounts$ExportAsyncTas(24875): at com.fsck.k9.activity.Accounts$ExportAsyncTask.doInBackground(Accounts.java:1982)
04-06 13:09:04.948 W/Accounts$ExportAsyncTas(24875): at com.fsck.k9.activity.Accounts$ExportAsyncTask.doInBackground(Accounts.java:1951)
04-06 13:09:04.948 W/Accounts$ExportAsyncTas(24875): Caused by: com.fsck.k9.preferences.SettingsImportExportException: Illegal character (d83d)
04-06 13:09:04.948 W/Accounts$ExportAsyncTas(24875): at com.fsck.k9.preferences.SettingsExporter.exportPreferences(SettingsExporter.java:186)
04-06 13:09:04.948 W/Accounts$ExportAsyncTas(24875): at com.fsck.k9.preferences.SettingsExporter.exportToUri(SettingsExporter.java:114)
04-06 13:09:04.948 W/Accounts$ExportAsyncTas(24875): at com.fsck.k9.preferences.SettingsExporter.writeIdentity(SettingsExporter.java:397)
04-06 13:09:04.948 W/Accounts$ExportAsyncTas(24875): at com.fsck.k9.preferences.SettingsExporter.writeAccount(SettingsExporter.java:370)
04-06 13:09:04.948 W/Accounts$ExportAsyncTas(24875): at com.fsck.k9.preferences.SettingsExporter.exportPreferences(SettingsExporter.java:177)
04-06 13:09:05.008 I/am_activity_launch_time(1394): [0,1168938888,com.fsck.k9/.activity.Accounts,423,423,0]
04-06 13:09:06.458 I/sf_frame_dur(333): [com.fsck.k9/com.fsck.k9.activity.Accounts,0,2,0,0,0,1,0]
04-06 13:09:10.108 I/am_create_activity(1394): [0,1189686832,97,com.android.documentsui/.DocumentsActivity,android.intent.action.CREATE_DOCUMENT,application/octet-stream,NULL,0,com.fsck.k9,0]
04-06 13:09:10.108 I/am_pause_activity(1394): [0,1168938888,com.fsck.k9/.activity.Accounts,0]
04-06 13:09:10.138 I/am_on_paused_called(24875): [0,com.fsck.k9.activity.Accounts]
04-06 13:09:10.548 I/sf_frame_dur(333): [com.fsck.k9/com.fsck.k9.activity.Accounts,40,2,2,2,0,1,0]
04-06 13:09:16.288 D/Documents(24927): onFinished() [content://com.android.externalstorage.documents/document/0000-0000%3A___NEVER_reformat%2Fbbbbk9_settings_export_2018-04-06.k9s]
04-06 13:09:16.338 I/am_resume_activity(1394): [0,1168938888,97,com.fsck.k9/.activity.Accounts,0]
04-06 13:09:16.358 I/Accounts(24875): onActivityResult requestCode = 2, resultCode = -1, data = Intent { dat=content://com.android.externalstorage.documents/document/0000-0000:___NEVER_reformat/bbbbk9_settings_export_2018-04-06.k9s flg=0x43 }
04-06 13:09:16.428 I/am_on_resume_called(24875): [0,com.fsck.k9.activity.Accounts]
04-06 13:09:16.878 I/am_activity_launch_time(1394): [0,1168938888,com.fsck.k9/.activity.Accounts,541,541,0]
04-06 13:09:17.058 W/Accounts$ExportAsyncTas(24875): com.fsck.k9.preferences.SettingsImportExportException: com.fsck.k9.preferences.SettingsImportExportException: Illegal character (d83d)
04-06 13:09:17.058 W/Accounts$ExportAsyncTas(24875): at com.fsck.k9.preferences.SettingsExporter.exportToUri(SettingsExporter.java:116)
04-06 13:09:17.058 W/Accounts$ExportAsyncTas(24875): at com.fsck.k9.activity.Accounts$ExportAsyncTask.doInBackground(Accounts.java:1982)
04-06 13:09:17.058 W/Accounts$ExportAsyncTas(24875): at com.fsck.k9.activity.Accounts$ExportAsyncTask.doInBackground(Accounts.java:1951)
04-06 13:09:17.058 W/Accounts$ExportAsyncTas(24875): Caused by: com.fsck.k9.preferences.SettingsImportExportException: Illegal character (d83d)
04-06 13:09:17.058 W/Accounts$ExportAsyncTas(24875): at com.fsck.k9.preferences.SettingsExporter.exportPreferences(SettingsExporter.java:186)
04-06 13:09:17.058 W/Accounts$ExportAsyncTas(24875): at com.fsck.k9.preferences.SettingsExporter.exportToUri(SettingsExporter.java:114)
04-06 13:09:17.058 W/Accounts$ExportAsyncTas(24875): at com.fsck.k9.preferences.SettingsExporter.writeIdentity(SettingsExporter.java:397)
04-06 13:09:17.058 W/Accounts$ExportAsyncTas(24875): at com.fsck.k9.preferences.SettingsExporter.writeAccount(SettingsExporter.java:370)
04-06 13:09:17.058 W/Accounts$ExportAsyncTas(24875): at com.fsck.k9.preferences.SettingsExporter.exportPreferences(SettingsExporter.java:177)
04-06 13:09:18.588 I/sf_frame_dur(333): [com.fsck.k9/com.fsck.k9.activity.Accounts,1,3,0,0,0,0,1]
04-06 13:09:20.258 I/am_pause_activity(1394): [0,1168938888,com.fsck.k9/.activity.Accounts,0]
04-06 13:09:20.268 I/am_on_paused_called(24875): [0,com.fsck.k9.activity.Accounts]
04-06 13:09:20.938 I/sf_frame_dur(333): [com.fsck.k9/com.fsck.k9.activity.Accounts,49,6,1,1,0,1,0]

Steps

switch back to k9
long click account, export, set filename, error
burgers
export [all]
set filename
error

stop log capture

I have enabled all two both of k9's debug options

Are passwords salted and hashed, or more easily reversibly hashed? Or is there another way to backup account authentication information?

Ahhh

The problem is my From Name contains some emoji the exporter does not like. Other accounts have emoji as well but are not a problem. This was the from line exporter choked on:

[myname] 馃惐馃嵈

perhaps there are other emoji needing checked against this.

That account now exports successfully.

Global export now completes successfully.

Please create a new issue if this is still a problem with K-9 Mail 5.7xx.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NovaViper picture NovaViper  路  3Comments

Agno94 picture Agno94  路  3Comments

D0ve picture D0ve  路  3Comments

j-ed picture j-ed  路  3Comments

digitalcraftsman picture digitalcraftsman  路  3Comments