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

Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' #2

Open
Evgeny-Ru opened this issue Apr 8, 2016 · 8 comments

Comments

@Evgeny-Ru
Copy link

Hi, @jonasva, thank's for GT API.

When I try to execute the code

require ('vendor/autoload.php');

use Jonasva\GoogleTrends\GoogleSession;
use Jonasva\GoogleTrends\GoogleTrendsResponse;
use GuzzleHttp\Exception\BadResponseException;

$config = [
    'email' =>  '[email protected]',
    'password' =>  'xxxx',
    'recovery-email'  =>  'xxxx'
];

$session = (new GoogleSession($config))->authenticate();

I'm getting the error

Fatal error: Uncaught exception 'GuzzleHttp\Exception\ClientException' with message 'Client error response [url] https://accounts.google.com/CheckCookie?chtml=LoginDoneHtml [status code] 400 [reason phrase] Bad Request' in /home/ubuntu/workspace/dba/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 89 GuzzleHttp\Exception\ClientException: Client error response [url] https://accounts.google.com/CheckCookie?chtml=LoginDoneHtml [status code] 400 [reason phrase] Bad Request in /home/ubuntu/workspace/dba/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 89 Call Stack: 0.0023 236712 1. {main}() /home/ubuntu/workspace/dba/dbaQueryToGT.php:0 0.0093 410440 2. Jonasva\GoogleTrends\GoogleSession->authenticate() /home/ubuntu/workspace/dba/dbaQueryToGT.php:17 0.7901 997848 3. GuzzleHttp\Client->get() /home/ubuntu/workspace/dba/vendor/jonasva/google-trends/src/Jonasva/GoogleTrends/GoogleSession.php:270 0.7904 1009608 4. GuzzleHttp\Client->send() /home/ubuntu/workspace/dba/vendor/guzzlehttp/guzzle/src/Client.php:204

Also, Google notify me about the ban

If the error with Guzzle arose from the ban, is there some way to fix it?

Thank's in advance.

@omergisha
Copy link

The same happened to me, though without the ban.

Any ideas?

@jonasva
Copy link
Owner

jonasva commented Apr 20, 2016

Google changed their login process a little bit, I'm working on updating the bundle to cope with that. Will have an update soon.

@sircovsw
Copy link

sircovsw commented May 5, 2016

The same error.

@tanxeel
Copy link

tanxeel commented Jul 11, 2016

having same issue, working fine on localhost but error on live server.
if any one have alternate for this please mention. Thanks

@serjgamover
Copy link

Hey @jonasva
Do you plan to update the task?

@Epizefiri
Copy link

Hola @jonasva,
news?

@mazard
Copy link

mazard commented Apr 18, 2017

This is not working anymore and the author doesn't look like is going to fix it. For who may interest, there is a working php library for google trends api that works pretty well. It has the same features than this library and some more.

@ReymOleg
Copy link

ReymOleg commented Jun 5, 2019

Google changed their login process a little bit, I'm working on updating the bundle to cope with that. Will have an update soon.

Thanks (no) for updates!!!!

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

9 participants