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

Work around mail.163.com not returning UIDNEXT on SELECT and STATUS #5043

Closed
fengguowudi opened this issue Nov 24, 2023 · 15 comments · Fixed by #5045 or #5049
Closed

Work around mail.163.com not returning UIDNEXT on SELECT and STATUS #5043

fengguowudi opened this issue Nov 24, 2023 · 15 comments · Fixed by #5045 or #5049
Labels
blocker bug Something is not working

Comments

@fengguowudi
Copy link

  • Operating System (Linux/Mac/Windows/iOS/Android):
  • Delta Chat Version:1.42.0
  • Expected behavior:
    successful login
  • Actual behavior:
    could not read INBOX status Caused by: 0: STATUS (UIDNEXT) error for "INBOX" 1: io: Error(Error { input: [42, 32, 83, 84, 65, 84, 85, 83, 32, 34, 73, 78, 66, 79, 88, 34, 32, 40, 41, 13, 10, 65, 48, 48, 48, 56, 32, 79, 75, 32, 83, 84, 65, 84, 85, 83, 32, 99, 111, 109, 112, 108, 101, 116, 101, 100, 13, 10], code: TakeWhile1 }) during parsing of [42, 32, 83, 84, 65, 84, 85, 83, 32, 34, 73, 78, 66, 79, 88, 34, 32, 40, 41, 13, 10, 65, 48, 48, 48, 56, 32, 79, 75, 32, 83, 84, 65, 84, 85, 83, 32, 99, 111, 109, 112, 108, 101, 116, 101, 100, 13, 10] 2: Error(Error { input: [42, 32, 83, 84, 65, 84, 85, 83, 32, 34, 73, 78, 66, 79, 88, 34, 32, 40, 41, 13, 10, 65, 48, 48, 48, 56, 32, 79, 75, 32, 83, 84, 65, 84, 85, 83, 32, 99, 111, 109, 112, 108, 101, 116, 101, 100, 13, 10], code: TakeWhile1 }) during parsing of [42, 32, 83, 84, 65, 84, 85, 83, 32, 34, 73, 78, 66, 79, 88, 34, 32, 40, 41, 13, 10, 65, 48, 48, 48, 56, 32, 79, 75, 32, 83, 84, 65, 84, 85, 83, 32, 99, 111, 109, 112, 108, 101, 116, 101, 100, 13, 10]
  • Steps to reproduce the problem:
  • Screenshots:
image - Logs:
@fengguowudi
Copy link
Author

Other clients are working normally. I use mailbox 163.

@Simon-Laux Simon-Laux transferred this issue from deltachat/deltachat-desktop Nov 24, 2023
@hpk42 hpk42 added the bug Something is not working label Nov 24, 2023
@link2xt
Copy link
Collaborator

link2xt commented Nov 24, 2023

So we asked for (UIDNEXT) and the server returned nothing:

>>> ''.join(chr(x) for x in [42, 32, 83, 84, 65, 84, 85, 83, 32, 34, 73, 78, 66, 79, 88, 34, 32, 40, 41, 13, 10, 65, 48, 48, 48, 56, 32, 79, 75, 32, 83, 84, 65, 84, 85, 83, 32, 99, 111, 109, 112, 108, 101, 116, 101, 100, 13, 10])
'* STATUS "INBOX" ()\r\nA0008 OK STATUS completed\r\n'

I made a PR for imap-proto to allow parsing this: djc/tokio-imap#154

This is a bug in mail.163.com IMAP server.

@r10s
Copy link
Member

r10s commented Nov 24, 2023

there is a new android apk that should fix the bug:

🍋 download.delta.chat/android/deltachat-gplay-release-1.42.4.apk (android, overwrites existing gplay installs, keeps data)

EDIT: this is superseded by 1.42.5 from below

@fengguowudi
Copy link
Author

However, the latest desktop version of deltachat, which is 1.42.1, still has this problem of not being able to log in.

@fengguowudi
Copy link
Author

@link2xt

@link2xt link2xt reopened this Nov 26, 2023
@link2xt
Copy link
Collaborator

link2xt commented Nov 26, 2023

Ok, we will need to fallback to using UIDNEXT=0 when STATUS does not return any UIDNEXT. Guess 163 simply does not return UIDNEXT for SELECT and STATUS, but messages still have UID.

@link2xt
Copy link
Collaborator

link2xt commented Nov 26, 2023

Waiting for a new release of imap-proto from https://github.com/djc/tokio-imap that includes djc/tokio-imap#154

@link2xt link2xt changed the title cannot log in Work around mail.163.com not returning UIDNEXT on SELECT and STATUS Nov 26, 2023
@link2xt link2xt reopened this Nov 28, 2023
@link2xt
Copy link
Collaborator

link2xt commented Nov 28, 2023

This should be fixed by #5049 and in core 1.131.8, but let's keep the issue open until confirmed.

@r10s
Copy link
Member

r10s commented Nov 28, 2023

thanks all for helping fixing the issue! here is Delta Chat 1.42.5 that contains the recent fix #5049:

@fengguowudi can you confirm that 163.com works with that version?

@fengguowudi
Copy link
Author

thanks all for helping fixing the issue! here is Delta Chat 1.42.5 that contains the recent fix #5049:

@fengguowudi can you confirm that 163.com works with that version?

Sorry, I didn't make it clear what kind of hardware platform I used. I use IPhone and MAC. haha

@link2xt
Copy link
Collaborator

link2xt commented Nov 28, 2023

Then we need a macOS desktop release with core 1.131.8 for testing.

cc @Simon-Laux

@Simon-Laux
Copy link
Member

In half an hour or so there should be a test build at deltachat/deltachat-desktop#3573

@Simon-Laux
Copy link
Member

here is the test build: https://download.delta.chat/desktop/preview/deltachat-desktop-mas-3573.zip keep in mind that it is not signed, so needs to be allowed in the settings.

@fengguowudi
Copy link
Author

here is the test build: download.delta.chat/desktop/preview/deltachat-desktop-mas-3573.zip keep in mind that it is not signed, so needs to be allowed in the settings.

Perfect!

@link2xt
Copy link
Collaborator

link2xt commented Nov 29, 2023

@fengguowudi Does this build work for you, can it login to mail.163.com? If so we can close the issue, otherwise please post the logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Something is not working
Projects
None yet
5 participants