Closed Bug 1394642 Opened 6 years ago Closed 3 years ago

"[CLIENTBUG] SELECT command is not valid in this state" for yahoo account


(Thunderbird :: Untriaged, defect)

53 Branch
Not set


(Not tracked)



(Reporter: stargateak, Unassigned)




(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.0; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170802111520

Steps to reproduce:

Trying to send email through yahoo account. Get the error: [CLIENTBUG] SELECT command is not valid in this state

Actual results:

Composed email rejected. Now all folders and emails gone under email account window drop down.

Expected results:

emil should have sent
Which version of Thunderbird are you using? TB 53 does not exist.

Looks like some more IMAP trouble for Gene to look at.
Flags: needinfo?(gds) is also a recent reports of CLIENTBUG SELECT
Summary: [CLIENTBUG] SELECT command is not valid in this state → "[CLIENTBUG] SELECT command is not valid in this state" for yahoo account
Reporter are you using Yahoo email app on phone or tablet device? Other reporter claims that is the problem.
Flags: needinfo?(gds)
(In reply to Jorg K (GMT+2) from comment #1)
> Which version of Thunderbird are you using? TB 53 does not exist.
> Looks like some more IMAP trouble for Gene to look at.

Sorry.. 52.3.0 32 bit
(In reply to Wayne Mery (:wsmwk, NI for questions) from comment #2)
> is also a recent reports

Thanks.. I tried all of the suggestions and it didn't solve the issue. I can receive mail, just can't send it using Thunderbird.
(In reply to gene smith from comment #3)
> Reporter are you using Yahoo email app on phone or tablet device? Other
> reporter claims that is the problem.

Using it on laptop through Thunderbird 52.3.0 32 Bit
(In reply to stargateak from comment #6)
> (In reply to gene smith from comment #3)
> > Reporter are you using Yahoo email app on phone or tablet device? Other
> > reporter claims that is the problem.
> Using it on laptop through Thunderbird 52.3.0 32 Bit

So you are definitely *not* using another phone/tablet app to use your yahoo email account? Just want to make sure that is what you are saying.

I just sent an email with tb from my yahoo account and it worked fine. I also sent an email with my phone app (blue mail) from yahoo account, which also worked OK. Then I sent another email from yahoo account on tb and it still worked OK. So not seeing a problem here. (I have not tried the yahoo email app on my phone like the other reporter on the mozilla support site mentioned as being a problem.)

When you send and email, tb fails and all your folders and emails are not listed? If so, how are you getting them back?

I think we might need an imap/smtp log to be recorded while you are sending the email. The details on how to do it are here:

Specifically, from a cmd window (assuming you are on windows) do this:

set NSPR_LOG_MODULES=IMAP:5,SMTP:5,timestamp
set NSPR_LOG_FILE=%USERPROFILE%\Desktop\imap.log
"%ProgramFiles(x86)%\Mozilla Thunderbird\thunderbird.exe"

Then use the "Attach File" bugzilla feature above for the resulting imap.log.  Thanks!
Attached file imap.log
(In reply to stargateak from comment #10)
> Created attachment 8902951 [details]
> imap.log

I don't see any "BAD" or "NO" imap responses in the log. Only one select on yahoo inbox occurs and that is successful. However, for SMTP I do see login errors with the final entry as 
SMTP connection error quitting 80004004, ignoring. 

stargatek, Did you maybe see prompts for userid and password when sending?

stargatek, What happened while you were recording the log? Did you try to send an email? I don't see SMTP sending activity, just attemped logins and authenticating. Also, did you see the error pop-up regarding CLIENTBUG and SELECT like this: ?
I don't see the string "CLIENTBUG" in the log which should be there if this pop-uo occurred. 
Also, did your yahoo folders etc disappear like you reported before?

This seem like a similar error as Bug 1382010 where the case for imap AUTH and LOGIN were send as lower by tb and yahoo complained. However, AUTH and LOGIN for smtp look OK and are uppercase. But supposedly yahoo had fixed that problem, at least for imap, and now ignore the case. However, it could be that from your location you are accessing a yahoo server that still doesn't have the fix. So you might try using the latest tb beta (if it has the fix for Bug 1382010 -- Jorg?) or as last resort, try the daily build.
(In reply to gene smith from comment #11)
> SMTP connection error quitting 80004004, ignoring. 
Sadly, that's always there, try it.
Flags: needinfo?(stargateak)
Have reviewed, tried resetting password to 12 or more and still can't send, keep getting "Login to server failed." . Tried reentering the password but won't send. When canceled get "Sending of the message failed.
The message could not be sent using Outgoing server (SMTP) for an unknown reason. Please verify that your Outgoing server (SMTP) settings are correct and try again.". Last time I was able to send an email was on 8/20/17
Flags: needinfo?(stargateak)
Weird thing is that while we are discussing TB trouble here, Outlook 2016 is working fine with Yahoo Mail.  What spell is Outlook using?
I have finally sort of duplicated this bug. I went to my setting and turned off "allow insecure apps" which now causes all the folders in yahoo account to disappear and can't send a message plus I see the CLIENTBUG error pop-up as reported. When I turned back on "allow insecure app" all was well again.

Reading yahoo's documentation page, it talked about setting up "app specific" passwords. However, and they don't tell you, you have to first enable two-level authentication. When I did that, you can then have yahoo generate a special password to use in tb. However, tb doesn't seem to have a direct way to enter a new password for an account without deleting and re-establishing the account. But after I did this, I again could not use the yahoo account in tb since it now had the same problems. Going to two-level and generating the app password also removed the "allow insecure app" switch from the yahoo security page. The only way to get the "allow insecure app" switch back was to turn off the "two level" switch and, I think, remove/disable the app specific tb password. However, even after doing this and turning on "allow insecure apps" tb still had the same problems with yahoo, even when setting the password in tb back to the original non-app-specific password.

Looking at the imap log with the problems present, I don't see authentication errors. All I see is errors returned by yahoo whenever tb tries to do any other imap command, e.g., list, lsub, namespace and select. So it seems like yahoo is allowing tb to login to imap but fails every other imap command that tb sends.

I tried to log in to yahoo using openssl but couldn't when using the original password. At that point the app-specific password I had forgot so I tried to generate a new one. Unfortunately, yahoo said there was too much activity within the last 24 hours and I should "try again later". So right now I am locked out of the yahoo account just like the reporter seems to be (no folder listed, except sometimes inbox which appears empty, and can't send emails via
Well, although there seems to be no direct way to change a stored password for an account in tb, you can go the password storage screen and delete the lines for smtp and imap for the account, so you will be prompted to enter new ones. This is better than removing and re-entering the account to change the passwords.

Anyhow, part of my problem above was that when I removed and restored the account, I used the wrong account name for yahoo (one that was similar but old and locked out long ago). When I used the correct account name the "allow insecure apps" slider allowed tb to work again with yahoo (sending and receiving) with the switch green (on).

I want to try the two-step and app specific password method again tomorrow. Yahoo says I am locked out for some unknown time (up to 24 hours?) due to my excessive and error-prone activities.
Ok, 23 hours have elapsed and I can now set 2-step verification and generate app specific password for tb. I am able to send and receive with this new password.

So there seems to be two solutions for unable to send/receive email via yahoo:
1. Turn on the "allow insecure apps" switch at the yahoo account security page, or
2. Turn on 2-step verification and then have yahoo generate an app specific password for tb (use "other" in the list of apps provided by yahoo since tb is not listed). Now use this generated password (16 lower-case alpha chars) in tb (for sending and receiving) instead of your normal yahoo password.

Reporter stargateak: Let me know if this helps or if this is this is something you have already tried and it didn't help. Also, it seems that you are now only reporting unable to send emails via yahoo. I had the wrong port for smtp at one point and had that problem too. Just to be sure, these are the outgoing setting that work for smtp that I am using for yahoo:

Server name:
Port: 465
Connection security: SSL/TLS
Authentication method: Normal password
Username:      (maybe just myaccountname works here too, not sure)
Also, make sure that your smtp password is the same as your imap password; your normal yahoo password (when allowing insecure apps) or the generated password (if using 2-step verification).
Flags: needinfo?(stargateak)
My analysis starting at Comment 17 above is apparently wrong. See discussion continuing in Bug 1408610.

Do you also see this issue when using versoin 68?

Whiteboard: [closeme 2020-01-04

Resolved per whiteboard

Closed: 3 years ago
Resolution: --- → INCOMPLETE
Whiteboard: [closeme 2020-01-04
Flags: needinfo?(stargateak)
You need to log in before you can comment on or make changes to this bug.