请问如何解决?

path: /1.1/stats/collect
cost: 494.657ms
response: Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: not found (404)" UserInfo={NSLocalizedDescription=Request failed: not found (404), NSErrorFailingURLKey=https://api.leancloud.cn/1.1/collect?redirectByAPI=cn, com.alamofire.serialization.response.error.data=<7b22636f 6465223a 312c2265 72726f72 223a224e 6f742046 6f756e64 227d>, com.alamofire.serialization.response.error.response= { URL: https://api.leancloud.cn/1.1/collect?redirectByAPI=cn } { Status Code: 404, Headers {
"Cache-Control" = (
"no-cache,no-store"
);
"Content-Encoding" = (
gzip
);
"Content-Type" = (
"application/json;charset=utf-8"
);
Date = (
"Sat, 10 Mar 2018 11:41:30 GMT"
);
Pragma = (
"no-cache"
);
Server = (
nginx
);
Vary = (
"Accept-Encoding"
);
} }}

你好,请问使用什么 SDK ?

https://api.leancloud.cn/3 新版本已经不使用这个地址了,建议更新一下 SDK 的版本。

最新版本的 ObjC SDK,不过使用 Swift 调用的,Pod 文件:

# LeanCloud
pod 'AVOSCloud'
pod 'AVOSCloudIM'

安装时显示:

Installing AVOSCloud (9.0.1)
Installing AVOSCloudIM (9.0.1)

那请问旧版本使用这个地址的除了更新还能怎么办法?

您好,麻烦问一下这个问题可以稳定复现吗?我们这边在 9.0.1 版本中没有复现上面的报错。能麻烦您上传一个能稳定复现的 Demo 给我吗?

我试了试 9.0.1 和 8.2.3 都有这个问题

还出现了:, 基本上所有 LeanCloud 储存 服务都用不了,我换了其他的 AppID 和 AppKey 都不行

response: Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: bad request (400)" UserInfo={NSLocalizedDescription=Request failed: bad request (400), NSErrorFailingURLKey=https://tkqszfkb.api.lncld.net/1.1/fileTokens, com.alamofire.serialization.response.error.data=<7b22636f 6465223a 312c2265 72726f72 223a2247 65742066 696c6520 6275636b 65742066 61696c65 642c2070 6c656173 65207265 7472792e 227d>, com.alamofire.serialization.response.error.response= { URL: https://tkqszfkb.api.lncld.net/1.1/fileTokens } { Status Code: 400, Headers {

这个问题最后已经解决。

原因是:由于「appid 填错了」,导致一些错误的请求缓存,即使修改为正确的 「appid」,也是走了错误缓存的请求。

做法:将 APP 卸载重装(为了彻底清除请求缓存),再使用正确的 AppId 运行程序,就不再报错了。