3

I've been using the bigrquery library in r to run queries on my google big query project for the past 6 months. This morning I ran a simple query_exec() command that I've run a number of times over the past few days and I got the simple message "Error: Invalid Credentials".

I haven't been able to find documentation telling me how to fix this. I'm also not sure how to give code that will recreate the error.

The only thing that I can think of that changed is that I signed into a different gmail account.

Steps attempted so far:

  1. I logged out of the gmail account and logged back in to the right one.

  2. I uninstalled everything about R on my computer and reinstalled it all.

Still no luck.

I'm also realizing that there isn't a ton of information here. If there's something else I can provide that I haven't thought of I will be happy to answer questions.

Thanks for any help you can provide.

nFrain
  • 149
  • 10

1 Answers1

4

After more searching I found a way to clear your access credentials in this question and answer: BigRquery - RUN_QUERY_JOB

To summarize, if you force the access credentials to be null set_access_cred(NULL), then get new credentials get_access_cred(); you can re-authenticate.

Community
  • 1
  • 1
nFrain
  • 149
  • 10
  • I have done same thing but gives same error. it gives this erroe : > bigrquery::set_access_cred(NULL) > igrquery::get_access_cred() authorize: https://accounts.google.com/o/oauth2/auth access: https://accounts.google.com/o/oauth2/token google key: 465736758727.apps.googleusercontent.com secret: error --- – Divyang Shah Jan 21 '16 at 11:52
  • 2
    Try running `reset_access_cred()`, then running the script again. I was able to get the same error, but my query is running just fine. – nFrain Jan 21 '16 at 17:21
  • 1
    I got solution. I need to remove .httr-oauth file and than reset_access_cred(). That solved issue – Divyang Shah Jan 23 '16 at 04:41
  • @DivyangShah Where do you find the .httr-oauth file? – Praxiteles May 17 '17 at 22:33
  • In working directory at the command line try `ls -a` to show hidden files. – nFrain May 17 '17 at 22:46
  • hi @Praxiteles I can't remind the location right now. but, I think with httr package you can use below command file.remove('.httr-oauth') – Divyang Shah May 18 '17 at 04:52