nylas-mail icon indicating copy to clipboard operation
nylas-mail copied to clipboard

Syncback Actions Failing / Archive, Delete actions are not propagating to mail providers

Open joshvickerson opened this issue 10 years ago • 70 comments

Currently using build 0.3.32-b11131d (0.3.32-b11131d) and archiving threads doesn't actually archive them. They appear archived in N1 but remain unread and in my inbox in other clients (specifically, Outlook for iOS and Gmail web client).

Anything I can do to help debug this?

joshvickerson avatar Dec 19 '15 23:12 joshvickerson

I have exactly the same setup and I'm having this issue as well.

bellebethcooper avatar Dec 20 '15 00:12 bellebethcooper

Huh, this is odd. They work properly for me. It should remove the Inbox label, which dumps the thread into the All Mail folder.

mbilker avatar Dec 20 '15 16:12 mbilker

In N1 the Inbox label does seem to be removed from the archived emails. When I look at Gmail on the web, the same emails don't have any labels, are still in the inbox, and even show as being unread still.

bellebethcooper avatar Dec 20 '15 22:12 bellebethcooper

@bellebethcooper Could you check the Activity Window (Developer -> Open Activity Window) to see what the response codes of the requests are after hitting Archive?

mbilker avatar Dec 20 '15 22:12 mbilker

I'm getting 200s every time. Same for opening the email to mark it as read.

bellebethcooper avatar Dec 20 '15 22:12 bellebethcooper

@bellebethcooper Hmm. Then its some other part of the process that is causing this.

mbilker avatar Dec 21 '15 00:12 mbilker

I have the same issue for my gmail. It seems to be only the mails, that in gmail would go to e.g Social, Promotions, Updates, Forums; the special tabs.

It also seems like it doesn't mark mails without the inbox label as read, like I have a Github label, which skips the inbox. When reading mails in this label, they are marked as viewed in the app, but not on gmail.com.

omegahm avatar Dec 21 '15 09:12 omegahm

Today I'm getting 400s every time I try to change labels, including as the process of archiving/removing the inbox label. Trying to archive an email doesn't work, they just pop back into my inbox every time.

bellebethcooper avatar Dec 22 '15 03:12 bellebethcooper

@bellebethcooper Could you copy the command in the Requests starting with curl tab to the Terminal and run the command the command.

If you would be so kind to publish the results here, and please strip out the authentication details from the link and the published link would be like:

curl -X PUT -d '{"unread":false}' "https://xxx:@api.nylas.com/threads/xxx"

mbilker avatar Dec 22 '15 03:12 mbilker

@bellebethcooper The response will have a lot of personal information in it. Please take care to remove it. So the result to my previous command would be:

{
    "account_id": "REDACTED",
    "draft_ids": [],
    "first_message_timestamp": 1450650201,
    "has_attachments": false,
    "id": "REDACTED",
    "labels": [
        {
            "display_name": "Important",
            "id": "REDACTED",
            "name": "important"
        },
        {
            "display_name": "All Mail",
            "id": "REDACTED",
            "name": "all"
        },
        {
            "display_name": "Inbox",
            "id": "REDACTED",
            "name": "inbox"
        }
    ],
    "last_message_received_timestamp": 1450755099,
    "last_message_timestamp": 1450755099,
    "message_ids": [
        "REDACTED",
        "REDACTED",
        "REDACTED",
        "REDACTED"
    ],
    "object": "thread",
    "participants": [
        {
            "email": "[email protected]",
            "name": "nylas/N1"
        },
        {
            "email": "[email protected]",
            "name": "Mads Ohm Larsen"
        },
        {
            "email": "[email protected]",
            "name": "bellebethcooper"
        },
        {
            "email": "[email protected]",
            "name": "Matt Bilker"
        }
    ],
    "snippet": "Today I'm getting 400s every time I try to change labels, including as the process of archiving/removing the inbox label. Trying to archive an email doesn't work, they just pop back into my i",
    "starred": false,
    "subject": "Re: [N1] Archiving Threads... Don't (#781)",
    "unread": false,
    "version": 19
}

mbilker avatar Dec 22 '15 03:12 mbilker

@bellebethcooper That is what the success result would look like. A error response would be like the following, but this is not the same error as I cannot replicate it:

{
  "message": "Couldn't find thread `<REACTED>` ",
  "type": "invalid_request_error"
}

mbilker avatar Dec 22 '15 03:12 mbilker

The request:

curl -X PUT -d '{"labels":["xxx1","xxx2","xxx3","local-xxx-b528"]}' "https://xxx:@api.nylas.com/threads/xxx"

The response:

{
  "message": "Invalid id: local-xxx-b528",
  "type": "invalid_request_error"
}

xxx replaces any sensitive info.

bellebethcooper avatar Dec 22 '15 03:12 bellebethcooper

@bellebethcooper Thank you. For some reason, it is trying to set the labels for a local thread (usually a draft). Do you have any drafts present in N1 or in the web UI for your email provider?

mbilker avatar Dec 22 '15 03:12 mbilker

I do. I have 3 showing in N1 and 8 (including those same 3) in Gmail web. The email I tried to archive when testing earlier does not have any drafts in its thread that I can see.

bellebethcooper avatar Dec 22 '15 03:12 bellebethcooper

@bellebethcooper Hmm. The drafts disparity between Gmail and N1 is separate issue. This is odd. Could you possibly try deleting the drafts and seeing what the response code is after trying to set labels on that email?

mbilker avatar Dec 22 '15 03:12 mbilker

Hmm. I tried deleting the 3 drafts from N1. They're gone from the Drafts folder in N1 but they're still showing up in Gmail. In the activity window I had a 200 for one deletion and a 400 for each of the other two. After that I tried to archive the same email I was testing on before and it didn't work—got a 400.

bellebethcooper avatar Dec 22 '15 05:12 bellebethcooper

Hmm. I am going to cc @bengotow for this issue since he knows more regarding the Sync Engine and interaction with Gmail.

mbilker avatar Dec 22 '15 06:12 mbilker

In case it helps: I removed my account from N1 and re-added it. The 3 drafts were back when I re-added the account and I'm getting 200s again when archiving messages now, but the changes I make in N1 are still not syncing back to my Gmail account.

bellebethcooper avatar Dec 22 '15 09:12 bellebethcooper

Based on @omegahm's suggestion, I turned on bundling in my Gmail Inbox again (I had turned off all the bundling so my inbox behaved more like old-school Gmail). Now it seems like, with a small delay, N1 mark as read and archive actions are syncing to Gmail... at least for the moment. Hope that helps. Happy to share more details about my settings if it's useful.

bellebethcooper avatar Jan 02 '16 04:01 bellebethcooper

Hi folks,

Are any of you having issues with changes syncing back to Gmail able to email [email protected] with the email address that's having problems? This is usually indicative of account-specific sync problems that we need more info to address.

spang avatar Jan 04 '16 22:01 spang