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

Authentication broken? "Invalid access credentials have been reset" #6

Closed
giacecco opened this issue Feb 1, 2014 · 7 comments · Fixed by #11
Closed

Authentication broken? "Invalid access credentials have been reset" #6

giacecco opened this issue Feb 1, 2014 · 7 comments · Fixed by #11

Comments

@giacecco
Copy link

giacecco commented Feb 1, 2014

Dear hadley,
I am trying reproduce the example in the README.md with a dataset of mine, but authentication first completes succesfully and then fails because of a "Invalid access credentials have been reset" error. This happens with both Google's sample data and mine.

Any hints? Thanks!

Giacecco

> library(bigrquery)
> query_exec("<project name>", "<dataset name>", sql, billing = billing_project)
Loading required package: Rook
Loading required package: tools
Loading required package: brew
Waiting for authentication in browser...
Authentication complete.
Loading required package: rjson
Error: Invalid access credentials have been reset. Please try again.
> 
@craigcitro
Copy link
Collaborator

does it happen immediately or after an hour or so?

@giacecco
Copy link
Author

giacecco commented Feb 2, 2014

Immediately.

@craigcitro
Copy link
Collaborator

yowza -- i just tried the same thing and i got a segfault. stacktrace:

Waiting for authentication in browser...
Authentication complete.

 *** caught segfault ***
address 0x18, cause 'memory not mapped'

Traceback:
 1: .Call("R_fromJSON", content, as.integer(sum(simplify)), nullValue,     
     as.logical(simplifyWithNames), enc, stringFun, stringFunType)
 2: fromJSON(content, handler, default.size, depth, allowComments,     
     asText = FALSE, data, maxChar, simplify = simplify, ...,     
     nullValue = nullValue, simplifyWithNames = simplifyWithNames,     
     encoding = encoding, stringFun = stringFun)
 3: fromJSON(content, handler, default.size, depth, allowComments,     
     asText = FALSE, data, maxChar, simplify = simplify, ...,     
     nullValue = nullValue, simplifyWithNames = simplifyWithNames,     
     encoding = encoding, stringFun = stringFun)
 4: RJSONIO::fromJSON(parse_text(x, encoding = "UTF-8"), simplifyWithNames = 
     simplifyWithNames, ...)
 5: RJSONIO::fromJSON(parse_text(x, encoding = "UTF-8"), simplifyWithNames = 
     simplifyWithNames, ...)
 6: parser(content, ...)
 7: parse_auto(x$content, type, encoding, ...)
 8: content(req, type = type)
 9: oauth2.0_token(google, bigqr, scope = "https://www.googleapis.com/auth/bigquery")
10: get_access_cred()
11: paste("Bearer", access_token)
12: add_headers(Authorization = paste("Bearer", access_token))
13: sign_oauth2.0(get_access_cred()$access_token)
14: get_sig()
15: bq_post(url, body)
16: insert_query_job(project, dataset, query, billing)
17: query_exec("clitest", "another_ds", "SELECT COUNT(*) FROM [test]",
      billing = "clitest")

Segmentation fault: 11 (core dumped)

i'll try and look into this soon ... @hadley, does it work for you?

@wsurles
Copy link

wsurles commented Feb 26, 2014

Same issue here

Waiting for authentication in browser...
Authentication complete.
Error: Invalid access credentials have been reset. Please try again.

@hadley
Copy link
Member

hadley commented Feb 27, 2014

I'm in the middle of an OAuth 2.0 overhaul in httr - once that's done, I'll take a look at this. I think it should be a relatively straightforward fix.

@Mullefa
Copy link

Mullefa commented Mar 6, 2014

Same issue for me.

craigcitro added a commit to craigcitro/bigrquery that referenced this issue Apr 1, 2014
This includes the following updates:

* switch from `RJSONIO` to `jsonlite`.

* deprecate `get_sig`

* change top-level functions in `request.r` to take a token instead of a
signature (which is necessary to be able to refresh the token as needed).

Fixes r-dbi#6, r-dbi#8, and r-dbi#10.
@craigcitro
Copy link
Collaborator

For anyone else who ran into this issue: I didn't bother trying to dig out the original cause, but I have another pull request out that makes everything work nicely with the new version of httr. Once that's merged, we should be back up and running.

@hadley hadley closed this as completed in #11 Apr 7, 2014
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

Successfully merging a pull request may close this issue.

5 participants