facebook / facebook-java-business-sdk

Java SDK for Meta Marketing APIs
https://developers.facebook.com/docs/business-sdk
Other
393 stars 324 forks source link

The cipher AES128-GCM-SHA256 is not supported for TLSv1.2. #415

Open skyjilygao opened 1 year ago

skyjilygao commented 1 year ago

Which SDK version are you using?

v16.0.0

What's the issue?

return msg: {"error":{"message":"The cipher AES128-GCM-SHA256 is not supported for TLSv1.2.","type":"GraphInsecureException","code":8,"fbtrace_id":"A8N-tgfyh73UaZ6B-iLuMTf"}}

Steps/Sample code to reproduce the issue

Linux env:

LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.9.2009 (Core)
Release:        7.9.2009
Codename:       Core

request log:

2023-03-02 14:43:56.344 [pool-1-thread-4] INFO  com.pw.ad.api.facebook.FbApiSdk - Facebook API Context Stdout Log: ========Start of API Call========
2023-03-02 14:43:56.344 [pool-1-thread-4] INFO  com.pw.ad.api.facebook.FbApiSdk - Facebook API Context Stdout Log: Request:
2023-03-02 14:43:56.345 [pool-1-thread-4] INFO  com.pw.ad.api.facebook.FbApiSdk - Facebook API Context Stdout Log: GET: https://graph.facebook.com/v16.0/act_<ignore actual account_id>/advideos?limit=3&access_token=...ignore actual access token...
2023-03-02 14:43:56.523 [pool-1-thread-4] ERROR com.powerwin.center.commons.filter.DubboProviderFilter - error={"error":{"message":"The cipher AES128-GCM-SHA256 is not supported for TLSv1.2.","type":"G
raphInsecureException","code":8,"fbtrace_id":"A8N-tgfyh73UaZ6B-iLuMTf"}}
com.facebook.ads.sdk.APIException$FailedRequestException: {"error":{"message":"The cipher AES128-GCM-SHA256 is not supported for TLSv1.2.","type":"GraphInsecureException","code":8,"fbtrace_id":"A8N-tgfyh73UaZ6B-iLuMTf"}}
        at com.facebook.ads.sdk.APIRequest.readResponse(APIRequest.java:313)
        at com.facebook.ads.sdk.APIRequest.access$100(APIRequest.java:54)
        at com.facebook.ads.sdk.APIRequest$DefaultRequestExecutor.sendGet(APIRequest.java:539)
        at com.facebook.ads.sdk.APIRequest$DefaultRequestExecutor.execute(APIRequest.java:523)
        at com.facebook.ads.sdk.APIRequest.executeInternal(APIRequest.java:199)
        at com.facebook.ads.sdk.AdAccount$APIRequestGetAdVideos.execute(AdAccount.java:10471)
        at com.facebook.ads.sdk.AdAccount$APIRequestGetAdVideos.execute(AdAccount.java:10466)

Observed Results:

Expected Results:

Eisbaeeer commented 1 year ago

Same issue with Iot device and Bearssl connection. Got 'The cipher AES128-SHA is not supported for TLSv1.2'

stcheng commented 1 year ago

It seems that the issue is on the client side due to the JCA in the JRE. Could you check the env settings and try to update the JRE to support the cipher suites?