Open iammeenugupta96 opened 7 years ago
Please enable debug logging in lib/Brightcove/API/Client.php and post the results...
public static $debugRequests = "/tmp/bc.log";
Also you didn't mention what versions of the module and wrapper you're using.
Sure, will enable the logging. I'm using Drupal 7.34 and brightcove module 7.x-6.4 and this latest version of php-api-wrapper.
By the way, thank you for your response.
Module version 7.x-6.4 requires version 0.8 of the wrapper.
Okay, even with that version facing issues.
integrated this almost a month back. It was all working fine. We were able to connect to the client and communicate with Brightcove studio.
Suddenly from last two days it has stopped working and error which we get is:
Brightcove\API\Exception\APIException: Invalid status code: expected 200-299, got 0. in Brightcove\API\Client->request()
So the $code is 0. I'll debug more on this and get back to you.
Please let me know if you have any clue why we get 0 as $code value. Not sure why it suddenly stopped working.
It's difficult to say without the debug log.
In my case, from localhost, I had the same issue and the fired exception message was empty and the log of this kind:
array (
'request' => false,
'request_body' => 'grant_type=client_credentials',
'response' =>
array (
0 => 0,
1 => '',
),
'response_headers' => '',
)
Since I had already met this kind of issue with other libraries, I tried the same "fix" and it worked. It's related to SSL, I added these lines into curl_set_opt_array next to the others, in Client.php, HTTPRequest method:
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_SSL_VERIFYHOST => 0,
CURLOPT_PROXY_SSL_VERIFYPEER => 0,
CURLOPT_PROXY_SSL_VERIFYHOST => 0,
Hi Tamsad,
I'm integrating https://www.drupal.org/project/brightcove in one of my drupal project. Setting up the module requires this library to be installed https://github.com/brightcove/PHP-API-Wrapper/
I integrated this almost a month back. It was all working fine. We were able to connect to the client and communicate with Brightcove studio.
Suddenly from last two days it has stopped working and error which we get is:
Brightcove\API\Exception\APIException: Invalid status code: expected 200-299, got 0. in Brightcove\API\Client->request() (line 274 of /var/www/drupal-7.38/sites/all/libraries/PHP-API-Wrapper/lib/Brightcove/API/Client.php).
Thereafter, I tried with new release of the library and today installed https://github.com/brightcove/PHP-API-Wrapper/ allover again. But no luck.
Can you please suggest what could be the issue.