Exchange: ErrorNamespace

Problem

With an Exchange account, Authentication fails with the message:

ErrorNamespace (IMAP)

I don’t find any way to configure manually the authentication infos. Probably the problem is due to the fact that the email and the server domains are different (name.surname@domain.com vs mail.domain.com).

Additional Context

With other email clients I always had to manually edit the domain to from domain.com to mail.domain.com, and I think this is the same case. I wonder why mailspring does not yet have a simple tab for manually editing and reviewing the default configuration, this would be a very useful feature.

Some more details:

----------IMAP----------
* OK The Microsoft Exchange IMAP4 service is ready. [UABSADIAUAAyADYANABDAEEAMAAwADIAOQAuAEYAUgBBAFAAMgA2ADQALgBQAFIATwBEAC4ATwBVAFQATABPAE8ASwAuAEMATwBNAA==]
1 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+
1 OK CAPABILITY completed.
2 LOGIN "username@domain.com" "*********"
2 OK LOGIN completed.
3 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CLIENTACCESSRULES CLIENTNETWORKPRESENCELOCATION BACKENDAUTHENTICATE CHILDREN IDLE NAMESPACE LITERAL+
3 OK CAPABILITY completed.
4 NAMESPACE
4 BAD User is authenticated but not connected.

Email Provider

Exchange

Setup

  • OS and Version: Ubuntu 16:04
  • Mailspring Version: 1.1.4

(Originally posted by diegoferigo on GitHub.)

I am having the same issue in 1.2.2-96fb3a99

This is my log output:

----------IMAP----------
* OK The Microsoft Exchange IMAP4 service is ready. [TQBSADIAUAAyADYANABDAXXXA==]
1 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+
1 OK CAPABILITY completed.
2 LOGIN "xxx.xxx@xxx.com" "*********"
2 OK LOGIN completed.
3 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CLIENTACCESSRULES CLIENTNETWORKPRESENCELOCATION BACKENDAUTHENTICATE CHILDREN IDLE NAMESPACE LITERAL+
3 OK CAPABILITY completed.
4 NAMESPACE
4 BAD User is authenticated but not connected.

I believe I need to change to AUTH=LOGIN but I’m not sure how to set this.


(Originally posted by DewaldDeJager on GitHub.)

This issue is still present with a hotmail.com account. Here’s the log from mine:

Mailspring Version: 1.7.8-13635bcf
Platform: linux
Account State: sync_error
Account Provider: outlook
IMAP Server: imap-mail.outlook.com
SMTP Server: smtp-mail.outlook.com
--------------------------------------------
21184 [2020-06-23 22:29:14.270] [background] [info] Syncing folder list...
21184 [2020-06-23 22:29:16.524] [background] [critical] 
***
*** Mailspring Sync 
*** An exception occurred during program execution: 
*** {"debuginfo":"syncFoldersAndLabels - fetchAllFolders","key":"ErrorNamespace","retryable":false,"what":"std::exception"}
***

21184 [2020-06-23 22:29:16.524] [background] [critical] *** Stack trace (line numbers are approximate):
*** ??:?        SyncWorker::syncFoldersAndLabels()
*** ??:?        runBackgroundSyncWorker()
*** main.cpp:?  main::{lambda()#3}::operator()() const
*** main.cpp:?  _Bind_simple::operator()()
*** main.cpp:?  thread::_Impl::_M_run()
*** thread.o:?  execute_native_thread_routine()
***

21205 [2020-06-23 22:29:16.778] [main] [info] Identity created at 1546573202 - using ID Schema 1
21205 [2020-06-23 22:29:16.779] [main] [info] ------------- Starting Sync (******@hotmail.com) ---------------
21205 [2020-06-23 22:29:16.782] [metadata] [info] Metadata delta stream starting...
21205 [2020-06-23 22:29:19.782] [background] [info] Marking all folders as `busy`
21205 [2020-06-23 22:29:19.784] [background] [info] Syncing folder list...
21205 [2020-06-23 22:29:22.926] [background] [critical] 
***
*** Mailspring Sync 
*** An exception occurred during program execution: 
*** {"debuginfo":"syncFoldersAndLabels - fetchAllFolders","key":"ErrorNamespace","retryable":false,"what":"std::exception"}
***

21205 [2020-06-23 22:29:22.926] [background] [critical] *** Stack trace (line numbers are approximate):
*** ??:?        SyncWorker::syncFoldersAndLabels()
*** ??:?        runBackgroundSyncWorker()
*** main.cpp:?  main::{lambda()#3}::operator()() const
*** main.cpp:?  _Bind_simple::operator()()
*** main.cpp:?  thread::_Impl::_M_run()
*** thread.o:?  execute_native_thread_routine()
***

21231 [2020-06-23 22:29:23.166] [main] [info] Identity created at 1546573202 - using ID Schema 1
21231 [2020-06-23 22:29:23.166] [main] [info] ------------- Starting Sync (******@hotmail.com) ---------------
21231 [2020-06-23 22:29:23.169] [metadata] [info] Metadata delta stream starting...
21231 [2020-06-23 22:29:26.168] [background] [info] Marking all folders as `busy`
21231 [2020-06-23 22:29:26.170] [background] [info] Syncing folder list...
21231 [2020-06-23 22:29:29.496] [background] [critical] 
***
*** Mailspring Sync 
*** An exception occurred during program execution: 
*** {"debuginfo":"syncFoldersAndLabels - fetchAllFolders","key":"ErrorNamespace","retryable":false,"what":"std::exception"}
***

21231 [2020-06-23 22:29:29.496] [background] [critical] *** Stack trace (line numbers are approximate):
*** ??:?        SyncWorker::syncFoldersAndLabels()
*** ??:?        runBackgroundSyncWorker()
*** main.cpp:?  main::{lambda()#3}::operator()() const
*** main.cpp:?  _Bind_simple::operator()()
*** main.cpp:?  thread::_Impl::_M_run()
*** thread.o:?  execute_native_thread_routine()
***

Originally posted by wazlecracker on GitHub.)

I just ran into this in 1.8.0 while attempting to connect to an O365 account. My browser loads the intended OAuth URL and I can complete that process, yielding the “You’re All Set!” success splash page at Mailspring

However the actual Mailspring App “Add Account” modal just sits there, then eventually shows the ErrorNamespace (IMAP) error.


(Originally posted by BinaryPaean on GitHub.)

2 Likes

I have the same problem with O365 Authentication. It seems that the Microsoft 365 accepts the login but then the Mailspring shows the error of ErrorNamespace.

My settings:
SO: Ubuntu 20.04
Mailspring version: 1.8.0 .deb
Account: Microsoft 365 Corporate

Output of the console

/usr/share/mailspring/resources/app.asar/src/error-logger.js:101 Error: ErrorNamespace (IMAP)
    at ChildProcess._proc.on.code (mailsync-process.ts:222)
    at ChildProcess.emit (events.js:182)
    at ChildProcess.EventEmitter.emit (domain.js:442)
    at maybeClose (internal/child_process.js:962)
    at Socket.stream.socket.on (internal/child_process.js:381)
    at Socket.emit (events.js:182)
    at Socket.EventEmitter.emit (domain.js:442)
    at Pipe._handle.close (net.js:606) Object
module.exports.ErrorLogger.reportError @ /usr/share/mailspring/resources/app.asar/src/error-logger.js:101
1 Like

Same error @BinaryPaean and @jrmejiaa reported here. Version 1.7 used to work like a charm. It seems the problem is “User is authenticated but not connected”. Any hint here?

BTW, getting the same error when trying to connect to two different corporate accounts.

SO: Ubuntu Budgie 20.04
Mailspring version: 1.8.0 .deb
Account: Microsoft 365 Corporate

(base) tnascimn@everis:~ $ mailspring
Gtk-Message: Failed to load module “appmenu-gtk-module”
Running database migrations
App load time: 129ms

{“error”:null}
{ Error: ErrorNamespace (IMAP)
at ChildProcess._proc.on.code (file:///tmp/nylas-build/electron-packager/linux-x64/mailspring-linux-x64/resources/app/src/mailsync-process.ts:222:27)
at ChildProcess.emit (events.js:182:13)
at ChildProcess.EventEmitter.emit (domain.js:442:20)
at maybeClose (internal/child_process.js:962:16)
at Socket.stream.socket.on (internal/child_process.js:381:11)
at Socket.emit (events.js:182:13)
at Socket.EventEmitter.emit (domain.js:442:20)
at Pipe._handle.close (net.js:606:12)
message: ‘ErrorNamespace (IMAP)’,
rawLog:
‘----------IMAP----------\nconnect mailcore::IMAPSession:0x7ffc27c54f90\r\n* OK The Microsoft Exchange IMAP4 service is ready. [QwBQADMAUAAyADgANABDAEEAMAAxADAANAAuAEIAUgBBAFAAMgA4ADQALgBQAFIATwBEAC4ATwBVAFQATABPAE8ASwAuAEMATwBNAA==]\r\nssl connect outlook.office365.com 993 2\r\nOpenSSL version: OpenSSL 1.1.0f 25 May 2017\r\n1 CAPABILITY\r\n* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+\r\n1 OK CAPABILITY completed.\r\nconnect ok\r\nlogin\r\n2 AUTHENTICATE XOAUTH2
###HIDDEN TEXT HERE###
\r\n2 OK AUTHENTICATE completed.\r\n3 CAPABILITY\r\n* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CLIENTACCESSRULES CLIENTNETWORKPRESENCELOCATION BACKENDAUTHENTICATE CHILDREN IDLE NAMESPACE LITERAL+\r\n3 OK CAPABILITY completed.\r\n4 NAMESPACE\r\n4 BAD User is authenticated but not connected.\r\nfetch namespace failed\r\n’ } { pluginIds: }
Raven: 429 - undefined

1 Like

Hi,

I managed to work around this by downgrading to 1.7.8, setting up the account again, and then updating to the current newest (1.8.0). I tried this both on windows and ubuntu.

My specific issue was that I changed my office365 password, and got ErrorNamespace when trying to re-authenticate.

Thanks in general to the mailspring developers, much appreciated for a very useful piece of software.
ben

1 Like

I managed to work around this by downgrading to 1.7.8, setting up the account again, and then updating to the current newest (1.8.0). I tried this both on windows and ubuntu.

This also works for me, but this is not a solution. With this new system of issues in this page I don’t know if they are working on that.

I hope that they fix this issue.

@jrmejiaa We do update when we start work on a task and/or manage to resolve it. This system is designed to make it easier for people to know what’s going on. Silence means we haven’t been able to work on it yet. (Development time is limited; PRs and diagnostic work always welcome.)

1 Like

Thanks for the update @CodeMouse92. I am not sure how I can be useful because I don’t know much about the software that you use to develop the app. But if I can do test to help, I would love to do it.

Thanks for your time.

Same issue. And I don’t know any other solution than using another app. I will wait for some time in two apps, and hope it will be fixed. Cause your app is awesome!

Same issue as above, tried a fresh install several times and deleted the folders in AppData no luck. I can connect successfully in other apps including via IMAP on my cell phone via multiple apps. Only Mailspring give an issue.

OS: Windows 10
Mailspring Version: 1.9.1
Account: O365 Corporate

ErrorNamespace (IMAP)View Log

----------IMAP----------
connect <mailcore::IMAPSession:0093F6D8>
* OK The Microsoft Exchange IMAP4 service is ready. [QgBOADYAUABSADEAOQBDAEEAMAAwADcAOQAuAG4AYQBtAHAAcgBkADEAOQAuAHAAcgBvAGQALgBvAHUAdABsAG8AbwBrAC4AYwBvAG0A]
ssl connect outlook.office365.com 993 2
OpenSSL version: OpenSSL 1.1.0f  25 May 2017
1 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+
1 OK CAPABILITY completed.
connect ok
login
2 LOGIN "user@domain.com" *********
2 OK LOGIN completed.
3 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CLIENTACCESSRULES CLIENTNETWORKPRESENCELOCATION BACKENDAUTHENTICATE CHILDREN IDLE NAMESPACE LITERAL+
3 OK CAPABILITY completed.
4 NAMESPACE
4 BAD User is authenticated but not connected.
fetch namespace failed

Hi @wpbryant and @NickRimmer. This problem is a issue from the new versions of Mailspring. I know it is not a solution for the problem but until this could be solved, I stay in the version v1.7.8 of this project. If you want to test, I think that it could work properly also in your cases.

Greetings.

Thanks, yeah I’m sorta new so I’m not sure how to find this older version of the software.

If you go into the releases in Github, you are going to find the executable for the different versions of the System. This should be the version that would work for you

Hmm interesting I still get the error on 1.7.8

----------IMAP----------
connect <mailcore::IMAPSession:004FF8A4>
* OK The Microsoft Exchange IMAP4 service is ready. [QgBOADAAUABSADAANABDAEEAMAAwADcAMgAuAG4AYQBtAHAAcgBkADAANAAuAHAAcgBvAGQALgBvAHUAdABsAG8AbwBrAC4AYwBvAG0A]
ssl connect outlook.office365.com 993 2
OpenSSL version: OpenSSL 1.1.0f  25 May 2017
1 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+
1 OK CAPABILITY completed.
connect ok
login
2 LOGIN "user@domain.com" *********
2 OK LOGIN completed.
3 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CLIENTACCESSRULES CLIENTNETWORKPRESENCELOCATION BACKENDAUTHENTICATE CHILDREN IDLE NAMESPACE LITERAL+
3 OK CAPABILITY completed.
4 NAMESPACE
4 BAD User is authenticated but not connected.
fetch namespace failed

I’m quite a new user here, and not sure how can I install 1.7.8 version on Manjaro Linux system =

You have to download the pkgbuild from the View Changes section.

If using a DE(Desktop Environment)

  1. Go to AUR (en) - mailspring
  2. Click ‘View Changes’ at the far right section.
  3. Click on the specific version, in this case ‘update srcinfo to 1.7.8’
  4. Click download, in this case ’ aur-f192f2bdf2f14d40b554fa0b008d2fb5ec087c94.tar.gz’
  5. Right click to Extract.
  6. Open a terminal on that path.
  7. Do a ‘ls’ command and make sure you are inside the extracted path. It should only contain a PKGBUILD file.
  8. Run ‘makepkg -si’

For CLI

    cd $HOME/Downloads
    curl -O https://aur.archlinux.org/cgit/aur.git/snapshot/aur-f192f2bdf2f14d40b554fa0b008d2fb5ec087c94.tar.gz
    tar -xzvf aur-f192f2bdf2f14d40b554fa0b008d2fb5ec087c94.tar.gz
    cd aur-f192f2bdf2f14d40b554fa0b008d2fb5ec087c94
    makepkg -si

Here a screenshot for reference:

Once installed, you can just use your package manager as usual to verify and confirm version.

sudo pacman -Qi mailspring

Since the OP is using Ubuntu - is there a Ubuntu solution?

Give this a try: