解析服务器实时查询在 Flutter 中不起作用

Parse Server Live Query Not working In Flutter

提问人:Artin Yunesi 提问时间:6/18/2023 更新时间:6/18/2023 访问量:33

问:

这些是我的configs.json

{
  "appId": "1VNASWJ6A1TCOUMEL2J4AV7C3XQNDT",
    "clientKey": "your-client-key",
  "masterKey": "1PWLGXKHO5EV75IYEZ9F444QUA6U0R",
  "appName": "1mir",
  "cloud": "./cloud/main",
  "databaseURI": "mongodb://localhost:27017/dev",
  "javascriptKey": "1D457LONDAI2OIJDBAF7KQB5TF9W5R",
"masterKeyIps": ["0.0.0.0/0", "::/0"], 
  "liveQuery": {
    "classNames": ["Test"]
  }
}

{
  "apps": [
    {
      "serverURL": "http://x.x.x.x:1337/parse",
      "appId": "myAppId",
          "clientKey": "your-client-key",
      "masterKey": "1PWLGXKHO5EV75IYEZ9F444QUA6U0R",
      "appName": "Amir"
    }
  ],
  "users": [
    {
      "user": "user11",
      "pass": "pass"
    },
    {
      "user": "user12",
      "pass": "pass"
    }
  ]
}

一切正常,我保存和编辑数据,但是当我尝试运行实时查询时,出现错误。

I/flutter ( 7239): ╭-- Parse Response
I/flutter ( 7239): Class: LiveQuery
I/flutter ( 7239): Function: ParseApiRQ.liveQuery
I/flutter ( 7239): Status Code: -1
I/flutter ( 7239): Type: OtherCause
I/flutter ( 7239): Exception: HandshakeException: Handshake error in client (OS Error: 
I/flutter ( 7239):  WRONG_VERSION_NUMBER(tls_record.cc:242))
I/flutter ( 7239): ╰-- 

  await Parse().initialize(
      Const.appId,
      Const.parseServerUrl,
      clientKey: Const.clientKey,
      debug: true,
      liveQueryUrl: Const.keyLiveQuery,
      autoSendSessionId: false,
      coreStore: await CoreStoreSembastImp.getInstance()
  ).then((value){
    print(value); // all live query code go here
  });

我不知道到底要放什么链接liveQueryUrl 解析服务器已在以下地址启动

http://x.x.x.x:133/parse

我重视 liveQueryUrl

wss://x.x.x.x:133/parse

我已经说我得到了一个错误

flutter 平台解析 服务器

评论


答: 暂无答案