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

Failed to get IMAP folder information at initialization #149

Open
juntakei opened this issue Jan 13, 2021 · 8 comments
Open

Failed to get IMAP folder information at initialization #149

juntakei opened this issue Jan 13, 2021 · 8 comments

Comments

@juntakei
Copy link

Emacs ver: This is GNU Emacs 27.1 (build 1, x86_64-apple-darwin19.6.0, NS appkit-1894.60 Version 10.15.7 (Build 19H114))
of 2020-12-27
Mew ver: from Github on Jan 11, 2021
Server: Gmail IMAP server via stunnel

Situation:

  • Emacs27.1 on OSX (10.15.7) with latest Mew.
  • .emacs, .mew.el and other configuration files are working configuration on the other machine.
  • Folder initilization run C-uZ to get IMAP folder information from the server.
  • When I run C-uZ, the process complete without any error but nothing happen.
  • IMAP communication includes auth worked well which was checked by sending email (tcpdump and log)
    (confirmed successful copy the email in Sent folder via IMAP port which means stunnel is working over IMAP)
  • Looks some process doesn't work or skip in mew.el between line 241 and 262.
  • There is no message when running with mew-debug flag
  • I guess the process returned before accessing IMAP since there is no packet confirmed by C-uZ

Please let me know if anything I should check.

Thank you!

@tats
Copy link
Collaborator

tats commented Jan 14, 2021

  • .emacs, .mew.el and other configuration files are working configuration on the other machine.
  • When I run C-uZ, the process complete without any error but nothing happen.

To compare behaviors in your environments, evaluate
(setq mew-debug 'net), go to %inbox, type C-u Z, and then
look in the *Messages* buffer and the *Mew debug* buffer.

  • Looks some process doesn't work or skip in mew.el between line 241 and 262.

See the condition (consp arg) in mew-status-update() for C-u Z.
mew-imap-update() should be invoked, and finally the message
"Collecting mailbox list...done" should be displayed by mew-imap-sentinel().

@kazu-yamamoto
Copy link
Owner

I can reproduce this:

<=SEND=>
isqu5990 LOGIN "kazu..." "...."

<LOGIN>
isqu5990 NO [ALERT] Application-specific password required: https://support.google.com/accounts/answer/185833 (Failure)

Probably, two factor authentication is necessary.

@kazu-yamamoto
Copy link
Owner

@yoshinari-nomura Would you summarize the status of authentication on gmail? Japanese is OK.

@juntakei
Copy link
Author

<=SEND=>
isqu5990 LOGIN "kazu..." "...."

isqu5990 NO [ALERT] Application-specific password required: https://support.google.com/accounts/answer/185833 (Failure) ```

Probably, two factor authentication is necessary.

On the other machine, I can get access my inbox through another version of mew with same configuration files.
Mew version 6.7
GNU Emacs 25.1.2 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G1004)) of 2016-10-07

I will post debug message later today. Thanks.

@juntakei
Copy link
Author

@tats, I set debug flag you mentioned and also did (setq mew-debug t), there is no useful message in Message buffer.

mew-imap-namespace: Type ’M-x universal-argumentZ’ to collect IMAP folders!
command-execute: Buffer is read-only: #<buffer %inbox>
debug
****Updating status...
8888Updating status...done

Then I added some debug message in the source to check your suggestions.In my case, the program skips the block line 227-237. But after adding debug message next to the line226. All the sudden it starts working. After the first folder check, now Mew is working fine now. If it may help for the community, I can erase my local folder and check the phenomenon again. Anyway thank you for all the suggestion and advises. I'm happy to be back Mew community. Thanks > @kazu-yamamoto

@tats
Copy link
Collaborator

tats commented Jan 15, 2021

@juntakei

mew-imap-namespace: Type ’M-x universal-argumentZ’ to collect IMAP folders!

Your Emacs seems to lost the key binding C-u to universal-argument,
so C-u Z cannot pass the argument to mew-status-update().

It should normally be:

(mew-substitute-for-summary "Type '\\[universal-argument]\\[mew-status-update]' to collect IMAP folders!")
"Type ’C-uZ’ to collect IMAP folders!"

(substitute-command-keys "\\<mew-summary-mode-map>\\[universal-argument]")
"C-u"

(substitute-command-keys "\\<global-map>\\[universal-argument]")
"C-u"

@juntakei
Copy link
Author

@tats, you are right. It was caused by my local key binding. I remember I had same issue long time ago, may be in 90s. Kazu found it during a camp. Let me ask primitive question. When I manually typed M-x universal-argument [space] Z (it's replaced to "universal-argument-Z" )or M-x universal-argumentZ, emacs just say "no match". Anyway, now I can use Mew again and thank you for your advice.

@kazu-yamamoto , your issue posted above can be solved by using "Google App specific password". Please check this page. https://support.google.com/accounts/answer/185833?hl=en

Thank you, all!

@yoshinari-nomura
Copy link
Contributor

@yoshinari-nomura Would you summarize the status of authentication on gmail? Japanese is OK.

My IMAP XOAUTH2 branch is here: https://github.com/yoshinari-nomura/Mew/tree/mew-support-xoauth2
and some comments on the branch: https://groups.google.com/g/mew-ja/c/Hn9L27ll-eY/m/RBEYHOwqAwAJ

It works well for my daily use, but unfortunately, this would not be helpful for this issue.

By the way, Google is planning to turn off less secure app access to G Suite accounts:
https://workspaceupdates.googleblog.com/2019/12/less-secure-apps-oauth-google-username-password-incorrect.html

I recomment G Suite users to migrate to OAuth2 authentication.

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

4 participants