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

Can't save to sent folder "Message contains bare newlines" #3251

Open
KA-mbeck opened this issue Feb 1, 2017 · 32 comments
Open

Can't save to sent folder "Message contains bare newlines" #3251

KA-mbeck opened this issue Feb 1, 2017 · 32 comments

Comments

@KA-mbeck
Copy link

KA-mbeck commented Feb 1, 2017

What operating system are you using?

OS X 10.11.6

What version of Nylas Mail are you using?

1.0.20

--

Bug?

I get this error whenever I send an email:

Your message successfully sent; however, we had trouble saving your message, "Test email", to your Sent folder.

Message contains bare newlines

The emails do not show up in my sent folder in Nylas, or on Fastmail's web interface.

Do you have any third-party plugins installed? If so, which ones?

No

Is the issue related to a specific email provider (Gmail, Exchange, etc.)?

I am using fastmail

Is the issue reproducible with a particular attachment, message, signature, etc?

No, applies to all messages.

--

Feature Request?

Does this feature exist in another mail client or tool you use?

...

@spang
Copy link
Contributor

spang commented Feb 2, 2017

Hi @lapistola, we've seen this error happen as well. Does it happen repeatedly for you / for all messages you send?

@KA-mbeck
Copy link
Author

KA-mbeck commented Feb 2, 2017

Yes, ever single one.

@spang
Copy link
Contributor

spang commented Feb 2, 2017

Interesting. Have you tried connecting and sending from any accounts other than your Fastmail account? Curious if that's a specific factor in this issue.

@KA-mbeck
Copy link
Author

KA-mbeck commented Feb 2, 2017

Looks like it works fine on my Gmail

@kevprice83
Copy link

I am seeing this issue with a Gmail account and no sent mails since the 31st jan until this afternoon are showing!

@jstejada jstejada changed the title Error: we had trouble saving your message to your sent folder Can't save to sent folder "Message contains bare newlines" Feb 7, 2017
@ryanleesipes
Copy link

Seeing this too, with Fastmail.

@franzos
Copy link

franzos commented Mar 8, 2017

I'm having the same issue with Nylas Mail and Fastmail / Gmail.

Here's what I can see:
Client Tasks
EnsureMessageInSentFolderTask (ID: da6c) SUCCESS (PROCESSING REMOTE)
Provider Syncback Requests
EnsureMessageInSentFolder: FAILED - {"messageId":"85d6......","sentPerRecipient":false}

Interestingly:

  • I can confirm that the Sent message appears in the Fastmail 'Sent' folder but not in Nylas Mail
  • Emails sent from Fastmail web interface appear in Nylas Mail 'Sent'
  • The error message doesn't appear all the time (Fastmail / Gmail)
    - The error message doesn't appear with a Gmail account (different SMTP implementation?)

Could this happen because of a timing issue?

  1. Email is sent via SMTP
  2. Nylas Mail tries to confirm whether Email is in Sent folder but fails because Fastmail does not yet list Email, possibly because of internal processing
  3. Nylas Mail reports the Email is not in the Sent folder (this usually happens within seconds)
  4. The message never appears in Nylas Mail Sent because the previous confirmation failed and the message ID remains held up.

Because of a high ping for example, Fastmail infrastructure would be able to catch-up, before Nylas Mail is able to process the request, thus the error message would never appear. Given that the message doesn't appear all the time, I'd suggest that my changing internet connectivity has an impact on whether the request would succeed or not.

@ghost
Copy link

ghost commented Mar 21, 2017

Hello, I have the same problem with my Gmail account and my Fastmail account

@franzos
Copy link

franzos commented Apr 13, 2017

The issue persists on Nylas Mail 2.0.10

"remoteError": {
      "stack": "Error\n    at new APIError (/src/flux/errors.es6:57:19)\n    at _actions2.default.didReceiveSyncbackRequestDeltas.listen.syncbackRequests (/src/flux/syncback-task-api-request.es6:30:25)\n    at EventEmitter.eventHandler (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/reflux/src/PublisherMethods.js:36:22)\n    at EventEmitter.emit (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/eventemitter3/index.js:72:35)\n    at Function.trigger (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/reflux/src/PublisherMethods.js:52:26)\n    at Function.functor [as didReceiveSyncbackRequestDeltas] (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/reflux/src/createAction.js:32:56)\n    at DeltaProcessor._notifyOfSyncbackRequestDeltas (/src/services/delta-processor.es6:139:13)\n    at /src/services/delta-processor.es6:77:12\n    at next (<anonymous>)\n    at step (/Applications/Nylas Mail.app/Contents/Resources/app.asar/src/services/delta-processor.js:35:191)\n    at /Applications/Nylas Mail.app/Contents/Resources/app.asar/src/services/delta-processor.js:35:361\n    at tryCatcher (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/util.js:16:23)\n    at Promise._settlePromiseFromHandler (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:510:31)\n    at Promise._settlePromise (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:567:18)\n    at Promise._settlePromiseCtx (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:604:10)\n    at Async._drainQueue (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:138:12)\n    at Async._drainQueues (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:143:10)\n    at Async.drainQueues (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:17:14)",
      "name": "APIError",
      "error": {
        "stack": "Error: Error: Message contains bare newlines\n    at NylasError (errors.es6:1:8)\n    at IMAPProtocolError (imap-errors.es6:22:5)\n    at convertImapError (imap-errors.es6:140:15)\n    at wrappedReject (imap-connection.es6:245:34)\n    at imap-connection.es6:264:11\n    at throw (<anonymous>)\n    at step (imap-connection.es6:9:1)\n    at imap-connection.es6:9:1\n    at tryCatcher (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/util.js:16:23)\n    at Promise._settlePromiseFromHandler (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:510:31)\n    at Promise._settlePromise (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:567:18)\n    at Promise._settlePromise0 (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:612:10)\n    at Promise._settlePromises (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:687:18)\n    at Async._drainQueue (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:133:16)\n    at Async._drainQueues (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:143:10)\n    at Async.drainQueues (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:17:14)",
        "message": "Error: Message contains bare newlines",
        "userMessage": "IMAP protocol error. Please contact support@nylas.com.",
        "statusCode": 401,
        "source": "protocol"
      },
      "body": {
        "message": "Error: Message contains bare newlines"
      },
      "requestOptions": null,
      "statusCode": 401,
      "message": "Error: Message contains bare newlines"
    },

@almet
Copy link

almet commented Apr 18, 2017

I am also seeing the same issue with fastmail here.

@franzos
Copy link

franzos commented Apr 18, 2017

I'm now on Nylas Mail Version 2.0.15, Mac OS X 10.12.4, Fastmail IMAP but the error persists: Your message successfully sent; however, we had trouble saving your message ....

Error
    at new APIError (/src/flux/errors.es6:57:19)
    at _actions2.default.didReceiveSyncbackRequestDeltas.listen.syncbackRequests (/src/flux/syncback-task-api-request.es6:30:25)
    at EventEmitter.eventHandler (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/reflux/src/PublisherMethods.js:36:22)
    at EventEmitter.emit (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/eventemitter3/index.js:72:35)
    at Function.trigger (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/reflux/src/PublisherMethods.js:52:26)
    at Function.functor [as didReceiveSyncbackRequestDeltas] (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/reflux/src/createAction.js:32:56)
    at DeltaProcessor._notifyOfSyncbackRequestDeltas (/src/services/delta-processor.es6:139:13)
    at /src/services/delta-processor.es6:77:12
    at next (<anonymous>)
    at step (/Applications/Nylas Mail.app/Contents/Resources/app.asar/src/services/delta-processor.js:35:191)
    at /Applications/Nylas Mail.app/Contents/Resources/app.asar/src/services/delta-processor.js:35:361
    at tryCatcher (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:510:31)
    at Promise._settlePromise (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromiseCtx (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/promise.js:604:10)
    at Async._drainQueue (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:138:12)
    at Async._drainQueues (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:143:10)
    at Async.drainQueues (/Applications/Nylas Mail.app/Contents/Resources/app.asar/node_modules/bluebird/js/release/async.js:17:14)

@miloszfalinski
Copy link

To anyone having these issues and just wanting to try a temporary fix: the errors stop for me if I just add my Fastmail account as a normal IMAP account, not via the Fastmail integration.

@franzos
Copy link

franzos commented Apr 19, 2017

@miloszfalinski if that's true, there must be something Fastmail specific, that prevents this from working. Here's what Nylas Mail uses to connect to Fastmail (source):

"imap_host": "imap.fastmail.com",
"imap_port": "993",
"imap_security": "SSL / TLS",
"imap_user_format": "email",
"smtp_host": "smtp.fastmail.com",
"smtp_port": "465",
"smtp_security": "SSL / TLS",
"smtp_user_format": "email"

Other than that, I've only found that Nylas Mail appears to strip the INBOX. prefix from Fastmail folders. In any case, there have been reports that this also happens with Gmail accounts so it would appear as though this is a general issue?

@jstejada
Copy link
Contributor

thanks for the info! we're looking into this one

@ryanleesipes
Copy link

@jstejada
Figured this one out! It has something to do with custom signatures.

Three users at my org are using Fastmail accounts. Before adding their custom HTML signatures, this error did not happen. Following adding the signature, it does. Did a new installation and tested this again, and it is the case only after the signature has been changed. I am including the custom signature that I use (that prompts the error):

https://gist.github.com/ryanleesipes/a18d37875f0ecf411f345961eb6686de

@ryanleesipes
Copy link

Messages that are not saved to the sent folder appear to have problems being archived. Gets a IMAP uid error. This is the error:

#3308

@jstejada
Copy link
Contributor

wow thanks for tracking that down!, yes the uid error is a separate one, we're also working on that one

@FeherMarcell
Copy link

I get the same error when sending emails from my one.com IMAP account. I just noticed that my "Sent" folder is listed as an ordinary folder, not where the Inbox and the others are. Is there any way to manually fix this?

screenshot from 2017-04-20 09-05-24

@ryanleesipes
Copy link

We tried adding these as IMAP accounts and the problem persisted. (Addressing an earlier comment about it not happening with IMAP). Still think it has something to do with signatures.

@franzos
Copy link

franzos commented Apr 21, 2017

Alright, I've been able to replicate this issue consistently thanks to @ryanleesipes and the tip with the signature. In some cases, a little \n sneaks into your signature. Let's try:

  1. Create a new Signature (Edit RAW HTML)
<p>Best,
<br>Franz</b>
  1. Send a new Email to yourself, with nothing but the signature in the body
  2. Check:

If you're seeing this error, here's how you can verify whether this is the same issue:

screen shot 2017-04-21 at 9 49 22 pm

  1. Go to Nylas Mail > Window > Activity > Provider Syncback Requests (Mac)
  2. Look for the first occurrence of "body":, this should reflect the content of your Email
  3. Look for an anomaly such as the one I'm seeing \n

Here's how the body of the above email signature would look like:
"body":"<br><br><signature><p>Best,\n<br>Franz</p></signature>"

Let's get this fixed 👍

Side note: I noticed something else fishy. When I send an Email to myself, and this error occurs, the Email does not show up in the Fastmail outbox (because it couldn't be saved), however it shows up in the Nylas Mail / Fastmail Inbox. On the other hand, Emails with a Signature that does not cause this error, show up in the Fastmail outbox but don't show up in the Nylas Inbox.

@jstejada
Copy link
Contributor

thanks for the extra details! Looking into this!

@Rob-Gill
Copy link

I have this problem with my Fastmail account too.

@ryanleesipes
Copy link

@jstejada any updates? Tracked this down?

@stevemaughan
Copy link

I think I have this problem. Having added two IMAP accounts they don't have a "Sent" folder. Every time I send I get the error. The IMAP accounts are hosted at Rackspace (if that matters)

@blabj
Copy link

blabj commented May 5, 2017

I'm getting this error on replies only, not on composing new messages.
This is on a self-hosted IMAP/SMTP (Cyrus/Postfix) server, with Nylas-Mail 2.0 on Ubuntu 14.04.
But in both cases (compose and reply), it is not saving to my Sent folder, yet the message is being sent!

Addendum to above - after restarting Nylas, I found it created/used a "Sent Items" folder and put sent mail there.. but I cannot find configuration option to map the IMAP/Sent folder to be default instead of "Sent Items".

@theurso
Copy link

theurso commented May 17, 2017

+1
This same error occurs w/ Windows 10 / Nylas 2.0.32 / Fastmail IMAP

@kareem
Copy link

kareem commented Jun 6, 2017

+1
Getting this with OS X 10.12.1, Nylas 2.0.32, and Fastmail IMAP.

@dingolfsson
Copy link

+1
Also getting this on Ubuntu 16.04, Nylas 2.0.32.

@pablox-cl
Copy link

+1
Same in Windows 10 / Nylas 2.0.32, Fastmail IMAP.

@juddey
Copy link

juddey commented Jul 26, 2017

+1
Same on Elementary OS Loki, Nylas 2.0.32, Fastmail IMAP.

@samhains
Copy link

samhains commented Aug 7, 2017

+1 getting this on ubuntu 16.04, Nylas 2.0.32, Fastmail IMAP

@giltee
Copy link

giltee commented Aug 7, 2017

Same here... Nylas is such a sexy email client, a real shame that there are so many outstanding bugs...

heres the log:

Error
at new APIError (/src/flux/errors.es6:57:19)
at _actions2.default.didReceiveSyncbackRequestDeltas.listen.syncbackRequests (/src/flux/syncback-task-api-request.es6:30:25)
at EventEmitter.eventHandler (/usr/share/nylas-mail/resources/app.asar/node_modules/reflux/src/PublisherMethods.js:36:22)
at EventEmitter.emit (/usr/share/nylas-mail/resources/app.asar/node_modules/eventemitter3/index.js:72:35)
at Function.trigger (/usr/share/nylas-mail/resources/app.asar/node_modules/reflux/src/PublisherMethods.js:52:26)
at Function.functor [as didReceiveSyncbackRequestDeltas] (/usr/share/nylas-mail/resources/app.asar/node_modules/reflux/src/createAction.js:32:56)
at DeltaProcessor._notifyOfSyncbackRequestDeltas (/src/services/delta-processor.es6:139:13)
at /src/services/delta-processor.es6:77:12
at next ()
at step (/usr/share/nylas-mail/resources/app.asar/src/services/delta-processor.js:35:191)
at /usr/share/nylas-mail/resources/app.asar/src/services/delta-processor.js:35:361
at tryCatcher (/usr/share/nylas-mail/resources/app.asar/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/share/nylas-mail/resources/app.asar/node_modules/bluebird/js/release/promise.js:510:31)
at Promise._settlePromise (/usr/share/nylas-mail/resources/app.asar/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromiseCtx (/usr/share/nylas-mail/resources/app.asar/node_modules/bluebird/js/release/promise.js:604:10)
at Async._drainQueue (/usr/share/nylas-mail/resources/app.asar/node_modules/bluebird/js/release/async.js:138:12)
at Async._drainQueues (/usr/share/nylas-mail/resources/app.asar/node_modules/bluebird/js/release/async.js:143:10)
at Async.drainQueues (/usr/share/nylas-mail/resources/app.asar/node_modules/bluebird/js/release/async.js:17:14)

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

No branches or pull requests