android-sdk icon indicating copy to clipboard operation
android-sdk copied to clipboard

手机连代理抓包,上传图片失败,如何解决呢?

Open hust-twj opened this issue 3 years ago • 4 comments

错误信息: {ver:8.4.2,ResponseInfo:1658735114477872,status:-1200, reqId:, xlog:null, xvia:null, host:api.qiniu.com, time:1658735227,error:java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.}

看类似的 issue,说是SSL 要求时间必须匹配,但我手机的时间是没问题的。

ps:手机连代理后,抓其他的接口都可以,唯独这个上传图片的失败。

hust-twj avatar Jul 25 '22 07:07 hust-twj

@hust-twj 抓包时使用 http 请求:

Configuration configuration = new Configuration.Builder()
                .useHttps(false)
                .build();

YangSen-qn avatar Jul 25 '22 09:07 YangSen-qn

@hust-twj 抓包时使用 http 请求:

Configuration configuration = new Configuration.Builder()
                .useHttps(false)
                .build();

用 http 还是不行,仍然报错: {ver:8.4.2,ResponseInfo:1658801322050626,status:-1009, reqId:, xlog:null, xvia:null, host:null, time:1658801374,error:check origin statusCode:-1200 error:java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.}

hust-twj avatar Jul 26 '22 02:07 hust-twj

@hust-twj 上传使用姿势方便发下吗?我们这边测试 https 和 http 抓包都是可以正常上传的,且使用 useHttps(false) 后正常会走 http 进行上传,并不会涉及 ssl 证书问题了。

YangSen-qn avatar Jul 28 '22 06:07 YangSen-qn

可以先关了吧

hust-twj avatar Aug 11 '22 07:08 hust-twj