rhub
rhub copied to clipboard
Bad error message in `list_my_checks`
I have run several checks on rgl
recently, using the maintainer email [email protected]
. If I run list_my_checks()
without specifying that email address, email
defaults to [email protected]
, which account has been verified according to validate_email()
, but I get the error:
> list_my_checks()
Error in query("LIST BUILDS EMAIL", params = list(email = email, token = email_get_token(email))) :
Email address not validated
The message should probably say something like
No checks found for email [email protected]
instead.
Are you sure that [email protected]
has the right token? E.g. if you re-validated it on another machine, then it will not have the right token on this one, because one email address can only have one token currently.
That's not the issue. I'm only using one machine. Just to be sure, I just re-validated it and got the same result.
Just did some tracing. The message Email address not validated
is in raw characters in response$content
received from the call to GET()
in query()
called from list_my_checks()
:
Browse[3]> rawToChar(response$content)
[1] "{\"result\":\"error\",\"message\":\"Email address not validated\"}"
According to the server the @gmail.com email is pending validation. Does validate_email()
finish successfully for you?
I don't remember seeing a problem. I will try again now:
> library(rhub)
> validate_email()
── Choose email address to (re)validate (or 0 to exit)
1: ✓ [email protected]
2: ✓ [email protected]
3: New email address
Selection: 2
Please check your emails for the R-hub access token.
Token: 1ce53...d7d7f3a8f
Token added for ‘[email protected]’
Looks as though it worked (I edited out the middle of the token, that's not what I received).
Not sure what I've done wrong, but I'm again getting the message
> list_my_checks()
Error in query("LIST BUILDS EMAIL", params = list(email = email, token = email_get_token(email))) :
Email address not validated
It's using the [email protected]
address, which has been validated (and re-validated a few minutes ago).
Run rhub::list_validated_emails() and make sure that the token is the one you received in the last email after you have run rhub::validate_email()
On Wed, Nov 18, 2020 at 8:19 PM dmurdoch [email protected] wrote:
Not sure what I've done wrong, but I'm again getting the message
list_my_checks() Error in query("LIST BUILDS EMAIL", params = list(email = email, token = email_get_token(email))) : Email address not validated
It's using the [email protected] address, which has been validated (and re-validated a few minutes ago).
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/r-hub/rhub/issues/334#issuecomment-729929719, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFBGQH73IMLYGA7CHOYWQDSQQT47ANCNFSM4KNG3PXQ .
Yes, same token in both cases. I just removed my older email address (that I rarely use; it's not the one given by whoami::email_address()
) so it only lists one, and I get the most recent token but no luck with list_my_checks()
.
Found the error. I went back through old emails, and found a token that worked, the one that was validated on Jan 29 (i.e. 10 months ago). More recently validated ones from this afternoon did not work. I'll save all of them, in case it's just a case of slow updates.
I'm experiencing the same problem. I've used rhub while back, and now I'm getting all sort of strange errors. I've revalidated my email but I cannot get it to work for some reason. Although my email is freshly validated, I'll get this:
> rhub::list_my_checks()
Error in get_endpoint(endpoint, params) :
Cannot find token, email address is not validated?
And none of my builds go through. Any thoughts?
Investigating...
This is indeed a bug in list_my_checks()
, if you validate a new address, list_my_check()
does not work until you submit a checks.
I have fixed your case now, please try again.
As for the checks, they should go through eventually. If you see them in list_my_checks()
then there is no need to resubmit them.
It seems some of my build went thought but I guess that's because of your intervention, right? Before that, they looked pretty much stuck!