Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upProblem with authentication #274
Comments
|
We can get more information if, in a fresh session, before you execute options(gargle_quiet = FALSE)Is your report above totally complete? You execute |
|
Thanks for your asnwer.
And here the traces:
Thanks in advance. |
|
So here is our problem:
It would be nice to know how things got this way. Have you done anything interesting with this files, like move them from one computer to another? Or have you upgraded R very recently? Or are you using your own OAuth app? But we don't actually have to solve that mystery to get you unstuck (unless it keeps recurring). You should delete the borked cached token and walk through the OAuth dance again. You could delete that file any way you know how, but here's one way to do it from R: cache <- gargle::gargle_oauth_cache()
if(is.na(cache)) {
cache <- "~/.R/gargle/gargle-oauth"
}
bad_hash <- "ff5ac8544ab9d11dda711c6555a0c8cf_asimon@bobochoses.com"
(delete_me <- fs::dir_ls(cache, regexp = bad_hash))
fs::file_delete(delete_me)Each |
|
Hi Jenny, Sorry for the delay.
|
|
Maybe our current struggle is around finding the "right" definition of home directory on Windows. Small adaptation of the troubleshooting code: cache <- gargle::gargle_oauth_cache()
if(is.logical(cache)) {
cache <- fs::path_home_r(".R/gargle/gargle-oauth")
}
bad_hash <- "ff5ac8544ab9d11dda711c6555a0c8cf_asimon@bobochoses.com"
(delete_me <- fs::dir_ls(cache, regexp = bad_hash))
fs::file_delete(delete_me)Feel free to accomplish this anyway you know how. We're just trying to delete the file that's generating this "Error: Cache contains tokens with names that do not match their hash". The code is just an attempt to be helfpul and explicit. |
|
Woo! This worked for me (Mac OS 10.14.6), thus resolving my +1 in r-lib/gargle#109. I ended up just manually going to (delete_me <- fs::dir_ls(cache, regexp = bad_hash))
#> Error in enc2utf8(path) : argument is not a character vector
fs::file_delete(delete_me)
#> Error in which(is.na(x)) : object 'delete_me' not foundFrom there, I was able to authenticate with multiple emails. Notes: My first troubleshooting move (which didn't work) was taken from the gmailr 1.0.0 release article:
Might it be worth adding something to a similar effect re. vestigial gargle-oauth hashes? Happy to PR this to wherever you think is best (gargle would take care of the possibility of running into this in multiple packages, but I'm not sure if end users will see it there). |
|
I reckon this is the difference between R 3.5 and 3.6 serialization of rds, as I had similar issues when I updated R. |
|
Yeah I have been suspecting what @MarkEdmondson1234 says. My main takeaway from these 2 threads is that I have to surface this sort of mismatch differently or repair it automatically or something. |
|
I have a similar problem in Rstudio server. createTcpServer: address already in use Error: Can't get Google credentials. Are you running googledrive in a non-interactive session? Consider: * Therefore I run and the following again: Then I run the following: trying token_fetch() putting token into the cache I also tried the same in Rstudio with a mac and the result is the same. Do you have any suggestions how to solve it? |
Hi,
I am trying to authenticate with the new authentication method but something goes wrong.
When I execute this code:
drive_auth()I am receiving this message:
Session info:
Can you help me please?
Thanks!