question

sinitreo avatar image
sinitreo asked

SecureChannelFailure when making HTTP request from Cloud Script

Hello.
Here is the Error JSON:

{
  "cloudScriptErrorCode": "CloudScriptHTTPRequestError",
  "stack": "Error\n    at Object.__playfab_internal_v2.http_request (Script Document:215:28)\n    at Object.http.request (Script Document:253:35)\n    at Object.log.debug.firebase.request.set.getLastByKey.getFirstByKey.delete.patch.patchRoot.handlers_utility.TestFirebase.TestRollbar.TestException.utils.GetRankByPlayerId.GetResultFromStep.GenerateId.GetRandom.GetTriviaQuestions (E361-main.js:306:25)\n    at log.debug.firebase.request.set.getLastByKey.getFirstByKey.delete.patch.patchRoot.handlers_utility.TestFirebase.TestRollbar.TestException.utils.GetRankByPlayerId.GetResultFromStep.GenerateId.handlers_invites.SubmitInvite.handlers_roundcycling.PostReady.PostClaimSessionComplete.PostTriviaAnswer.PostSmack (E361-main.js:692:34)\n    at E361-main.js:72:33\n    at Object.__playfab_internal_v2.invokeFunction (Script Document:111:33)",
  "requestInfo": {
    "url": "https:\/\/opentdb.com\/api.php?amount=3&difficulty=easy&type=multiple&encode=url3986",
    "method": "get",
    "content": null,
    "contentType": "application\/json",
    "result": {
      "responseContent": null,
      "httpStatus": null,
      "httpStatusCode": 0,
      "requestError": "SecureChannelFailure"
    },
    "httpRequestError": "SecureChannelFailure"
  }
}

The error's only hint is "SecureChannelFailure". It happens for me randomly: it does not depend on remote url, content, method or parameters. It does happen from time to time with any host I use, not matter if it "https://opentdb.com" or another adress.

Please, advise.

Thanks,

Sini.

CloudScript
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Are there any other details you can provide? I just copied that exact URL into my own test project, and repeatedly hit it from an http.request in Cloud Script and encountered no issues. How often do you see this? Is it more frequent with some URLs?

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sinitreo avatar image sinitreo commented ·

Hello, Brendan

I could not spot any particular pattern regarding URLs. However, often those error come in groups: i.e. if it fails once, it often fails again during a short interval of time (5-10 minutes). My rough estimation is that it fails once per 30-40 calls.

It worths noting that I make 3-4 http requests per Cloudscript call.

I do understand the issue is hard to reproduce. I was hoping someone in PlayFab could look at the system sources and peek at under what conditions this error is thrown.

Thanks.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.