0

I am using RGA package to import GA data. For that matter, I have a scheduled cron job. It was working fine so far since years but I recently started getting:

Waiting for authentication in browser...
Press Esc/Ctrl + C to abort
Please point your browser to the following url:

Why is it that it comes only when job runs through cron.

If I go and run this manually in RStudio though, It runs fine without any issues.

Here's the code:

# Load up the RGA package. This is the package that has the smarts to actually
# connect to and pull data from the Google Analytics API
Sys.setenv(HADOOP_CMD="/usr/bin/hadoop")

library(RGA)
library(rhdfs)

#Authentication
options(httr_oob_default=FALSE)


viewIds <- c( "ga:xxxxxxxx");

fileNames <- c();
token <- authorize(client.id = "ID.apps.googleusercontent.com", client.secret ="SECRET", cache = "/home/rstudio/gaToken3")
print("token in ga")
print(token)
systemdebt
  • 4,589
  • 10
  • 55
  • 116
  • This is rather difficult to troubleshoot or even speculate on without seeing any code. Can you provide a reproducible question? Refs: https://stackoverflow.com/questions/5963269/, https://stackoverflow.com/help/mcve, and https://stackoverflow.com/tags/r/info. – r2evans Sep 15 '18 at 22:44
  • @r2evans : check – systemdebt Sep 16 '18 at 09:46

0 Answers0