RGA icon indicating copy to clipboard operation
RGA copied to clipboard

"Error in : oauth_listener() needs an interactive environment" again

Open MarekLu opened this issue 6 years ago • 2 comments

I use RGA in Shiny web application: I authorize it using my client.id and client.secret:

  1. R Studio creates local file-token .myemail-token.rds, I must confirm it in web browser for the first time.
  2. R Studio need no authorization next times, it uses locally saved token everytime.
  3. When I copy all R scripts and token to Shiny FTP and run the app from web browser, it needs authorization again. This is error from JS console:
Access token will be stored in the '.myemail-token.rds' file.
Warning: Error in : oauth_listener() needs an interactive environment.
Stack trace (innermost first):
    44: oauth_listener
    43: init_oauth2.0
    42: self$init_credentials
    41: public_bind_env$initialize
    40: Token2.0$new
    39: oauth2.0_token
    38: authorize
     1: runApp
Error : oauth_listener() needs an interactive environment.

I've read the https://github.com/artemklevtsov/RGA/issues/20, I make everything like in this issue, but no effect, still the same error.

Can you give me an advice please?

MarekLu avatar May 22 '18 19:05 MarekLu

Have you considered using a Google API service account instead? Here's a link to an explanation on Stack Overflow: https://stackoverflow.com/a/38301278/1007029

jdeboer avatar Jul 01 '18 12:07 jdeboer

Unfortunately I can not use Service Acccount with these Google Analytics accounts. Corporate policy...

MarekLu avatar Jul 09 '18 14:07 MarekLu