fatal error : 'couldn't connect to host' ! (Facebook API) [closed] - facebook

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I'm trying to add Facebook API on my web application..
But when I tried to post links using the Graph API.. I got this error:
Fatal error: Uncaught exception 'Facebook\FacebookSDKException' with
message 'couldn't connect to host' in
/home/u614270703/public_html/test/vendor/facebook/php-sdk-v4/src/Facebook/HttpClients/FacebookCurlHttpClient.php:156
Stack trace: #0
/home/u614270703/public_html/test/vendor/facebook/php-sdk-v4/src/Facebook/FacebookRequest.php(248):
Facebook\HttpClients\FacebookCurlHttpClient->send('https://graph.f...',
'POST', Array) #1 /home/u614270703/public_html/test/session2.php(32):
Facebook\FacebookRequest->execute() #2 {main} thrown in
/home/u614270703/public_html/test/vendor/facebook/php-sdk-v4/src/Facebook/HttpClients/FacebookCurlHttpClient.php
on line 156
I don't have any idea what is going on. What does this error means? I don't know why I can't 'connect to host'.

Your server probably blocks outgoing CURL requests, contact your provider and ask him if he could open access to the Facebook API server (graph.facebook.com).
There are other threads about this too:
Fatal error: Uncaught CurlException: 7: couldn't connect to host thrown in ....src/base_facebook.php on line 887
How to resolve cURL Error (7): couldn't connect to host?
https://stackoverflow.com/questions/9425406/facebook-api-exception-object-error-on-facebook-app

Related

It seems that pthread_join() is not invoked or PTHREAD_ATTR_FLAG_DETACHED is not set. Flutter

I am working on flutter and trying to fetch details from an API using package http/http.dart. I am using http.get(Uri.parse()) for getting data from the API.
I/flutter (27793): HandshakeException: Handshake error in client (OS Error:
I/flutter (27793): CERTIFICATE_VERIFY_FAILED: certificate has expired(handshake.cc:393))
W/libc (27793): It seems that pthread_join() is not invoked or PTHREAD_ATTR_FLAG_DETACHED is not set.
W/libc (27793): pthread tid : 7654
W/libc (27793): pthread start_routine: 0x9eeaf8d9
I have found a similar question here.
Though the question in link was regarding Firebase Authentication hence I made this question.
I read pthread_join() — Wait for a thread to end but didn't understand how to resolve it in my code.
I can't tell you response.statusCode due to above mentioned error.
TIA

NPM UnhandledPromiseRejectionWarning [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I've set up a 20.04 Ubuntu server in a virtual machine and on AWS to run an uno bot that is no longer hosted by the developer. (https://github.com/Exium1/UnoBot) I've been following someone's guide on how to set it up (https://github.com/DaanWet/UnoBot/blob/master/documentation/Install.md) but it is failing when i go to start it.
I get the following error:
(node:14998) UnhandledPromiseRejectionWarning: DiscordHTTPError: 401 Unauthorized on GET /api/v9/gateway/bot
at RequestHandler.request (/home/ubuntu/UnoBot/node_modules/eris-sharder/node_modules/eris/lib/rest/RequestHandler.js:75:15)
at Client.getBotGateway (/home/ubuntu/UnoBot/node_modules/eris-sharder/node_modules/eris/lib/Client.js:2135:36)
at ClusterManager.calculateShards (/home/ubuntu/UnoBot/node_modules/eris-sharder/src/sharding/clustermanager.js:507:38)
at process.nextTick (/home/ubuntu/UnoBot/node_modules/eris-sharder/src/sharding/clustermanager.js:179:41)
at process._tickCallback (internal/process/next_tick.js:61:11)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
(node:14998) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by
rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:14998) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js pro
cess with a non-zero exit code.
could anyone help with resolving this issue?
In order to address the UnhandledPromiseRejectionWarning warning that was logged, you can fix it by adding the following to your code:
process.on("unhandledRejection", console.error);
This will log the error much more clearly, and will prevent your console from being filled up with those warnings.
As for what #mmenschig said, they are indeed correct. Ensure that you have the correct token passed into <Client>.login().

GuzzleHttp\Exception\ConnectException: cURL error 28 when using Google Cloud Speech PHP API

Following Google's instructions to the letter.
This is what I get:
Fatal error: Uncaught GuzzleHttp\Exception\ConnectException: cURL error 28: Connection timed out after 500 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) in C:\xampp\htdocs\ModernMT\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:207 Stack trace: #0 C:\xampp\htdocs\ModernMT\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(162): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array) #1 C:\xampp\htdocs\ModernMT\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(109): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #2 C:\xampp\htdocs\ModernMT\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php(45): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #3 C:\xampp\htdocs\ModernMT\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php(30): GuzzleH in C:\xampp\htdocs\ModernMT\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 207
This happens right after:
# Instantiates a client
$client = new SpeechClient();
Straight from the developers of Google Cloud:
After investigating a bit further, it looks like this is a bug in the google/auth dependency. We just merged a fix, and it should be tagged by the end of the day. You can wait for that (watch this page for v1.11.1), or you could require guzzlehttp/guzzle at ^6.5 to get it working right now. Sorry for the trouble, and thanks for bringing it to our attention!

how to catch Uncaught SoapFault exception [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I am getting the following error. What is wrong? How I can catch or solve this exception.
Fatal error: Uncaught SoapFault exception: [a:InternalServiceFault] The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs. in G:\work\htdocs\Robi_Francis_API\application\controllers\mirsValidation.php:117 Stack trace: #0 G:\work\htdocs\Robi_Francis_API\application\controllers\mirsValidation.php(117): SoapClient->__call('processPayment', Array) #1 G:\work\htdocs\Robi_Francis_API\application\controllers\mirsValidation.php(117): SoapClient->processPayment(Array) #2 [internal function]: MirsValidation->process('13774373733576') #3 G:\work\htdocs\Robi_Francis_API\system\core\CodeIgniter.php(359): call_user_func_array(Array, Array) #4 G:\work\htdocs\Robi_F in G:\work\htdocs\Robi_Francis_API\application\controllers\mirsValidation.php on line 117
Try this:
<?php
try {
$url = "/api/TestService.asmx?wsdl";
$client = new SoapClient($url, array("trace" => 1, "exception" => 0));
} catch (SoapFault $exception) {
echo $exception->getMessage();
}
?>

Numerous exceptions thrown by base_facebook.php [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
I have a Facebook Application which works but every day I get an exception while testing. All exceptions are being thrown by base_facebook.php - is anyone else encountering these exceptions? Anyone has a stable base_facebook.php that they can share?
Update:
Seems like others are experiencing such exceptions as I found a bug opened with Facebook on high priority. How come nobody reported it yet on Stackoverflow?
http://developers.facebook.com/bugs/267344716670841
-
Fatal error: Uncaught CurlException: 28: connect() timed out! thrown in /home/dev-mpm/public_html/client/PHP3/base_facebook.php on line 814
Fatal error: Uncaught CurlException: 28: SSL connection timeout thrown in /home/dev-mpm/public_html/client/PHP3/base_facebook.php on line 814
Fatal error: Uncaught CurlException: 28: Operation timed out after 60001 milliseconds with 0 bytes received thrown in /home/dev-mpm/public_html/client/PHP3/base_facebook.php on line 814
Fatal error: Uncaught CurlException: 56: SSL read: error:00000000:lib(0):func(0):reason(0), errno 104 thrown in /home/dev-mpm/public_html/client/PHP3/base_facebook.php on line 814
Fatal error: Uncaught Exception: 102: parameters user or session key required thrown in /usr/share/nginx/html/client/PHP3/base_facebook.php on line 708
Fatal error: Uncaught OAuthException: An active access token must be used to query information about the current user. thrown in /usr/share/nginx/html/client/PHP3/base_facebook.php on line 1053