-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Receiving cURL error at random times #19
Comments
This issue is typically related to networking issues either in your infrastructure, or perhaps Trello's network. The issues do come up from time to time and from my research there is no code change evident that will fix the issue, so I typically close the issues. The issue you mentioned that offers a work around of not using HTTPS is not recommended by me. That choice was made by the issue's author. I suggest investigating any possible network configuration. Having said that, if you discover that there is some code change that needs to be made, I am happy to consider it. This package has been downloaded and installed over 2,000 times and this issue's frequency does not correlate with that volume. |
Hi Steven, Just to let you know that I am having this (or very similar issue also). I'm sure it is somehow related to my local setup but I can't find a fix after reading through everything I could find. Catching the error as you advised in a similar issue and printing it out however was interesting as it does actually complete the call and the data is returned. See below. Changing to http:// as the domain likewise removes the issue but obviously I'd rather not. Just posting it here in case it gives any insight and/or is useful to anyone else. Calling this: I get: `/usr/bin/php5 /home/joes/dev.local/maintenance-maker/test.php Process finished with exit code 0 Cheers. Joe |
Hi @mferreira92 , Today I have found that using 'domain' => 'https://api.trello.com' instead of https://trello.com is working way better! Let me know if this change working for you. |
Hi @mrajabtech , Thank you for the info. On my quest to solve this I've also tested this link but noticed no major improvements. I've also recompilerd curl to the latest version and no luck either. I had the exact same error you are having and also the same error that another person was having, but this issue was closed without any hesitation, so I built my own (simple) implementation and I never had any error again. I believe that this is not a problem directly related with @stevenmaguire implementaiton, but must be something by some module that it's using. Perhaps a larger timeout would fit, but I tested all these options, I even edited code of some modules, but no luck either. this might be related with the Linux distro I'm using (Ubuntu) or some modules that I have installed, altough I've upgraded curl to the latest version. |
Hi @mferreira92, Thanks for getting back! I am using Amazon EC2 Linux with Bitnami LAMPstack-5.6 and updated every piece I can possible and tried all the things you have mentioned but no luck. It is so weird that it works but fails at very random times. I am using Google, Slack API clients and this one altogether in my application(all of these clients using Guzzle module) and never had any issue like this with them. Could it be because some other PHP library interfering? @stevenmaguire Think am going to write a simple API wrapper just like you and give it a try and hope someone can find whats causing this meanwhile. |
Hi @mrajabtech no luck here changing the URL either I'm afraid. Currently I can only get it to work consistently by using the insecure URL for get requests (e.g. getBoardCards) and the secure URL for post actions (e.g. addCard). I'm using Ubuntu 15.04 (3.19), PHP 5.6.4, curl 7.38.0 (x86_64-pc-linux-gnu) libcurl/7.38.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3 |
Have you explored possible configuration issues with the peer verification certificate on your machines? (http://docs.guzzlephp.org/en/latest/request-options.html#verify) This library uses Guzzle v6, which is a very reliable library. I would encourage you explore the peer verification option as a potential solution. You can new up your own instance of $httpClient = new \GuzzleHttp\Client($yourHttpClientOptions);
$trelloClient = new \Stevenmaguire\Services\Trello\Client($yourTrelloClientOptions);
$trelloClient->setHttpClient($httpClient);
// attempt your requests If this proves to be effective in resolving your issues, I will look to adding an optional configuration item that expects you to pass the local SSL CA certificate path as a parameter. Additionally, in response to the comments:
This package is dependent on only two other libraries
There is no reason to expect that different companies providing different service resources will have the exact same technical expectations. |
@mferreira92 @joesken @mrajabtech did you have any luck with my previous suggestion? Does the project need to be updated to include optional configuration for local ssl certificate paths? |
Trying again... @mferreira92 @joesken @mrajabtech did you have any luck with my previous suggestion? |
Hi @stevenmaguire, Sorry I just got back from a vacation. I tried your suggestion replacing stock HttpClient with the configuration for local ssl certificate path but still no luck. I have made a little tweak in the code to make it work consistently as @joesken suggested that
https://github.com/mrajabtech/trello-php/commit/246155a9ef8ad7da3304fb7ce35a85453006ee1e @mferreira92 please let me know if @stevenmaguire's suggestion worked for you. Thanks. |
I am having the same problem. Looks like the tweak @mferreira92 did worked. |
Hi,
Ive been using this great tool since i discovered it a couple of days ago. Everything went fine, except today.
Some random times (doing the same task) I'm getting random cURL error, or a message saying "Bad Request".
The cURL error is the following:
cURL error 56: SSL read: error:00000000:lib(0):func(0):reason(0), errno 104 (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
I have seen a closed issue similar to mine, but the workaround was to disable https.
If i refresh the browser, the error goes away, and its totally random. I'm doing a simple task (e.g. listng cards from a board).
Can you please help me? I'm available to give some debug info.. Just let me know what do you need.
The text was updated successfully, but these errors were encountered: