未收到解析云功能响应

时间:2015-04-06 06:26:00

标签: c# json unity3d parse-platform

我编写了一个Parse云函数,它在执行时发回一个JSON响应。但是,我无法收到回到Unity3d的回复。

解析云功能如下:

Parse.Cloud.define("SearchQuery2", function(request, response) {
var Algolia = require('cloud/algoliasearch-node');
console.log('Alogolia dictionary required');
var client  = new Algolia('APIid','APIKey');
var index   = client.initIndex('projects');
var SearchedObjectIDs = [];


index.search(request.params.searchThis, function(error, content) { 

  if (content ==null) {
      console.log("error here");
      response.error("nothing found");
  }
  else {
      console.log("success here");
      console.log(content.hits);

      response.success(content.hits);

  };
  ;


}); 
});

日志中的所有内容都打印得很好。

但是,当我尝试使用云调用函数调用Unity3d中的结果时:

private IEnumerator PayPoints( )
{

    IDictionary<string, object> searchText = new Dictionary<string, object>
    {
        { "searchThis", "hsr" }
    };

    Task cloudFunctionTask = ParseCloud.CallFunctionAsync<JSONObject>("SearchQuery2", searchText)

        .ContinueWith(t =>
      {
            Debug.Log("AABBCC");

            if(t.IsFaulted)
            {
                Debug.Log(t.Exception.GetBaseException().Message + "error here");
            }
            Debug.Log(t.Result);
        }
        );


    Debug.Log("We are running the cloud function now ... ");
    while (! cloudFunctionTask.IsCompleted) yield return null;
    Debug.Log(" .... we ran the cloud function OK !!!");

    yield break;
}

我在日志中收到以下错误:

Exception of type 'System.AggregateException' was thrown.error here

内部例外是:

Error message Unknown SSL protocol error in connection to api.parse.com:443 
Error code: OtherCause

服务器登录:http://imgur.com/1UCsAIN

我在这里错过了什么吗?

0 个答案:

没有答案