-
Notifications
You must be signed in to change notification settings - Fork 96
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
Error With Guzzle #133
Comments
Interesting. I've tried to reproduce this but failed. What does your composer.json look like? |
Full Error Message: Fatal error: Call to undefined method GuzzleHttp\Client::sendAsync() in /var/www/includes/vendor/php-http/guzzle6-adapter/src/Client.php on line 64 My Composer.json: This is the call that is failing: $user=$linkedIn->get('v1/people/~:(firstName,lastName)'); It generates the getLoginUrl() fine. |
That is very strange. It looks alright, I tried to reproduce but I still cant.. Can you show me the output of:
(If you want to be more private it may be okey by:)
|
You are using the deprecated option "installed". Only installed packages are shown by default now. The --all option can be used to show all packages. |
It looks like you got all the proper versions and everything is fine.. Do you use the composer autoloader? Do you have the same issues when you use the curl client? |
I am unsure if this is related, but somehow I am getting a new error message: Catchable fatal error: Method Happyr\LinkedIn\AccessToken::__toString() must return a string value in /vendor/happyr/linkedin-api-client/src/LinkedIn.php on line 111 I tracked it down to this I believe: [__PHP_Incomplete_Class_Name] => Happyr\LinkedIn\AccessToken |
That is unrelated. But also strange. What PHP version do you run? |
PHP Version 5.5.9-1ubuntu4.20 Ok, I got past the Guzzle error by just removing everything but your project and dependencies. I will try to narrow it down to see what package is causing it, however I am stuck on the other error now. |
Ok, this combination works: |
That's what you had before, right? #133 (comment) |
Minus the php-http/guzzle6-adapter v1.1.1 Guzzle 6 HTTP Adapter |
Okey, so now you are using the Curl client, right? |
Yes, not setting the http client |
I reinstalled the guzzle6 adapter and am using Guzzle now, However I can't get past the
error now. |
Can you debug this line: https://github.com/Happyr/LinkedIn-API-client/blob/master/src/AccessToken.php#L42 And tell me what $this->token is before we print it? |
Sure thing; $this->token has the following value ) |
Can you try this branch to see if I fixed your problems: https://github.com/Happyr/LinkedIn-API-client/tree/issue-133 (You may have to clear your browser cookies)
|
It worked on first load, then I refreshed the page and got the same error message bout toString |
Thank you for helping me debug this. I've never been able to reproduce this issue. I've push another change to that branch. Would you mind giving it another try? |
Still getting the error after call back, Whats the correct way to get the access token after authenticating LinkedIn? |
That is strange... Can you debug how that value comes in to |
So it works the first time, but its gets stored in the session as an incomplete Object. |
Okey, I've pushed a change now where I serialize the access token before we store it |
Actual Behavior
Fatal error: Call to undefined method GuzzleHttp\Client::sendAsync()
Expected Behavior
Oauth
Steps to Reproduce
When I click the login URL, I get the error: Fatal error: Call to undefined method GuzzleHttp\Client::sendAsync()
The text was updated successfully, but these errors were encountered: