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

"Google Login Failed" #56

Closed
alexmill opened this issue Jan 20, 2016 · 9 comments
Closed

"Google Login Failed" #56

alexmill opened this issue Jan 20, 2016 · 9 comments

Comments

@alexmill
Copy link

I've seen some previous issues on this get closed due to lack of reproducibility, so I've created an account that anyone can use (below). I'm working on Windows 7, but I would be surprised if the change in platform would fix this.

library(gtrendsR)
usr = "gtrendsrtest@gmail.com"
psw = "gtrendsR123"
gconnect(usr,psw)

I've tried logging in with many different accounts and none of them seem to work. I always get presented with a login challenge by Google during the authenticatePage <- postForm(authenticateURL, .params = formparams, curl = ch) operation in gconnect.

Is there any setting within Google that I can set to allow this kind of login? Is the only alternative to use Google's OAuth2 API? I'd really like to use this package, but I haven't even been able to get off the ground due to the login issues. I'd love to know if anyone has rolled their own OAuth patch that I can use to get by here. Thanks!

@eddelbuettel
Copy link
Collaborator

It's not that simple. When an account is in a bad state, Google keeps it there. You need to somehow log into Google and deal with it

The package itself work. On my server just now:

R> library(gtrendsR)                   
R> res <- gtrends("NBA")
R> 
R> usr = "gtrendsrtest@gmail.com"   
R> psw = "gtrendsR123"   
R> gconnect(usr,psw)        
Google login failed! Check your login information.NULL
R> 

As you can see with my account details (set in ~/.Rprofile) it all works. But the account you created hit some limits already so it is of no use to use here.

There is little we can do for you here.

@alexmill
Copy link
Author

Thanks for the response. I think it's a little fatalistic to just say, "there's nothing we can do". I've tried logging in with 3 separate accounts myself and have seen at least 2 issues prior to mine with the exact same problem. Especially since this is the first step in using the package, I think it's a legitimate "issue" if many people are systematically unable to login to even try the package out.

This isn't my package and it may not merit your personal attention, but I would think keeping this issue open can only be a good thing. My problem clearly is reproducible (as you've experienced) and I don't think it's isolated. I'm going to try to find a fix, but it would be great to have a space to collaborate with others who have the same problem. I only see the package getting better if this problem gets addressed.

The key problem here is to figure out how to get one's Google account out of the login "challenge" state (or how to get around the challenge). If someone can figure this out, then I think it makes sense to change the error message and add some info on how to address the problem.

@eddelbuettel
Copy link
Collaborator

I think it happened to me once and I got it solved by a standard web browser login and re-validation.

This issue is between the account and Google. gtrendsR is a bystander which is why I will close this.

I'd love to help you, and I don't intend to come across as a meanie but there is nothing operational for Philippe and me here.

@eddelbuettel
Copy link
Collaborator

image

"They" clearly know something is wrong there. Your idea of providing a global login for tests was a good one; sadly Google has other ideas (and probably prohibits this in the terms and services anyway).

@alexmill
Copy link
Author

Fair enough; you can close if you'd like. But even just adding some info to the error message and potential solutions seems like an operational improvement to me. I also think saying gtrendsR is a "bystander" is a little disingenuous. If the package is using Google's services in a way that it doesn't deem secure, I think that's a problem with (or at least "opportunity for improvement" for) the package.

@eddelbuettel
Copy link
Collaborator

You continue to misunderstand or misconstruct what I said. We don't "design" Google Authentication. We ride this train like everybody else. It is a given for us.

@PMassicotte
Copy link
Owner

I will try to give a look soon. Meanwhile, your solution is more than welcome.

@antaldaniel
Copy link
Contributor

antaldaniel commented Oct 6, 2016

I think that here is a good answer on stackoverflow.

  1. In a web browser (perhaps Chrome/Incognito), log into your Gmail account (the one via which you're trying to send email from your app).
  2. In another browser tab, open https://accounts.google.com/DisplayUnlockCaptcha -- and follow the steps.

I doubt that a clean solution is possible without Google opening an official API. All official Google APIs are supported by identity management for remote use of your credentials. But (personal) gmail authentication is not designed as an API identification.

In a way, and with all respect for this great package, gtrendsR is a sort of a bypass. As far as I know, there is no official Google Trends API, and using your personal gmail address for scraping Google search results is not necessarily the intended use of the account. Especially when you are running a code from the code, it is likely that it will trigger a security alarm in Google, because your account is accessed from two geographically exclusive locations - a typical sign of identity theft.

@eddelbuettel
Copy link
Collaborator

I use a separate account for gtrendsR queries.

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

No branches or pull requests

4 participants