{"id":6831,"date":"2014-04-23T08:10:42","date_gmt":"2014-04-23T08:10:42","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/23\/what-is-fatal-error-uncaught-curlexception-52-gnutls-recv-error-12-a-tls-fatal-alert-has-been-received-in-facebook-php-sdk-collection-of-common-programming-errors\/"},"modified":"2014-04-23T08:10:42","modified_gmt":"2014-04-23T08:10:42","slug":"what-is-fatal-error-uncaught-curlexception-52-gnutls-recv-error-12-a-tls-fatal-alert-has-been-received-in-facebook-php-sdk-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/23\/what-is-fatal-error-uncaught-curlexception-52-gnutls-recv-error-12-a-tls-fatal-alert-has-been-received-in-facebook-php-sdk-collection-of-common-programming-errors\/","title":{"rendered":"What is: Fatal error: Uncaught CurlException: 52: GnuTLS recv error (-12): A TLS fatal alert has been received. &#8211; in Facebook PHP SDK-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m developing a Facebook canvas application and sometimes (3 times in one week) I get this error (to be honest, this time it&#8217;s a user getting the error):<\/p>\n<pre><code>Fatal error: Uncaught CurlException: 52: GnuTLS recv error (-12): A TLS fatal alert has been received. thrown in \/myURL\/facebook-php-sdk-master\/src\/base_facebook.php on line 1031 \n<\/code><\/pre>\n<p>myURL is the URL of my application&#8217;s original address (not the apps.facebook.com one).<\/p>\n<p>I can&#8217;t find the meaning of this error, the only thing I could guess is that it&#8217;s something about encryptions, hence the TLS.<\/p>\n<p>One possible thing (I&#8217;m guessing again) is that the application is running on an HTTPS subdomain, but our main domain is normal HTTP. The console is showing an error every time the app runs:<\/p>\n<pre><code>Refused to connect to 'http:\/\/www.someURL.hu\/' because it violates the following Content Security Policy directive: \"connect-src https:\/\/*.facebook.com http:\/\/*.facebook.com https:\/\/*.fbcdn.net http:\/\/*.fbcdn.net *.facebook.net *.spotilocal.com:* https:\/\/*.akamaihd.net ws:\/\/*.facebook.com:* http:\/\/*.akamaihd.net https:\/\/fb.scanandcleanlocal.com:* *.atlassolutions.com https:\/\/*.internet.org http:\/\/*.internet.org http:\/\/attachment.fbsbx.com https:\/\/attachment.fbsbx.com\".\n<\/code><\/pre>\n<p>But this was like this the whole time and Chrome is showing a warning on the HTTPS icon, saying something about 128-bit encryption and TLS (<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m developing a Facebook canvas application and sometimes (3 times in one week) I get this error (to be honest, this time it&#8217;s a user getting the error): Fatal error: Uncaught CurlException: 52: GnuTLS recv error (-12): A TLS fatal alert has been received. thrown in \/myURL\/facebook-php-sdk-master\/src\/base_facebook.php on line 1031 myURL is the URL of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6831","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6831","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6831"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6831\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}