Closed 0FengQiang0 closed 1 year ago
我有两个存储桶: 1:img-nota-club-131789 2: vod-131789
第一次往 img-nota-club-131789 这个存储桶上传图片,能上传成功; 第二次往 vod-131789 这个存储桶上传视频,上传失败了。 只在安卓设备上会上传失败,在iOS系统的设备上是没问题的。
报错日志如下: I/flutter (18808): ~~~~~~ 开始上传到腾讯云存储服务器 ~~~~~~ I/flutter (18808): _bucket = vod-131789 I/flutter (18808): cosPath = /vod/20230518/98710ba9ba36920361816d5a6b66bff7/98710ba9ba36920361816d5a6b66bff7.mp4 I/flutter (18808): pickFilePath = /data/user/0/club.nota/cache/pm_359051_QQ视频_98710ba9ba36920361816d5a6b66bff71684062884.mp4 I/flutter (18808): uploadId = null I/flutter (18808): ~~~~~~ ^^^^^^^^^^^^^^^^^^^^^ ~~~~~~ I/QCloudHttp(18808): --> POST https://vod-131789.cos.ap-singapore.myqcloud.com/vod/20230518/98710ba9ba36920361816d5a6b66bff7/98710ba9ba36920361816d5a6b66bff7.mp4?uploads http/1.1 I/QCloudHttp(18808): Content-Length: 0 I/QCloudHttp(18808): User-Agent: cos-android-sdk-5.9.9-FlutterPlugin I/QCloudHttp(18808): Host: vod-131789.cos.ap-singapore.myqcloud.com I/QCloudHttp(18808): Authorization: q-sign-algorithm=sha1&q-ak=AKIDDvrj89ePwfPh5vatb_QJOJUYrPDVQmmxnopG1q-mG2lk9niBxvdhY9LTxQOzO1Dp&q-sign-time=1684385172;1684392372&q-key-time=1684385172;1684392372&q-header-list=content-length;host&q-url-param-list=uploads&q-signature=79b6c9ac540072baf488b9f95a31e19534fe0266 I/QCloudHttp(18808): x-cos-security-token: 4EupIJxBoDvsOai4W0Ze7gpc44IlpUHa24066a2cff0e47a3de2cd21e167962f4ICh8ZHFToVNCqFPQ1L9fmsm981xOBDPmRQsVdXu3XR805BU0LfUj7JReWpzF1PAxgV3sYWuebpiivLsNiDENA-MHYNfnpxTJHfn7AXa5VL4U7gFEzbyIVlIrnzu3FuHq6EQ76Gya-KX7Iu-1HqYzr8sjdw-Ss2n3EDcj8QOWwRI7fN7YCCjB3HDKB6jbeMFM2DLX2UysPEjwT1nlRouewkBT50QsCZE80M4Q2VFG1L0jb4_X_n4GSREW1zvFg2sMfKNCe2-1Xx76F9mhmPPGzqpXw_8QciGT0PJIazmsUcRAGzMzghuIv4dMZIY6QcddXi92QuDfrzopY57mzrEXEZXDpU0M-66DKJaQ09k9-cklZnRan4gWxKWNX8Ox-MRUzpL6oIKyJuCmcHfrl2EP4jC3pIceaHoaknlfJGM5LEN_sJqoaB6dQ1qN0xT3ah4txh5rrjjXwiX-gilVjHz3j-hteETZBHm3DZLecVlZvGrnz7MdPs7zjH1GElBQh3jm-c24So1Dtlkz1u__6Kn2LJoy9_bxgtVO52X93rf4hXI-BG2QHefhd3WkMc6I7OIniqOabZg1nUjJ4OtyKDxGiA I/QCloudHttp(18808): --> END POST I/QCloudHttp(18808): Request{method=POST, url=https://vod-131789.cos.ap-singapore.myqcloud.com/vod/20230518/98710ba9ba36920361816d5a6b66bff7/98710ba9ba36920361816d5a6b66bff7.mp4?uploads, tags={class java.lang.Object=HttpTask-CosXml-15}} start to execute, attempts is 0 I/QCloudHttp(18808): Request{method=POST, url=https://vod-131****789.cos.ap-singapore.myqcloud.com/vod/20230518/98710ba9ba36920361816d5a6b66bff7/98710ba9ba36920361816d5a6b66bff7.mp4?uploads, tags={class java.lang.Object=HttpTask-CosXml-15}} begin to execute I/QCloudHttp(18808): dns: vod-131789.cos.ap-singapore.myqcloud.com:{43.128.240.62,43.128.240.35,} I/flutter (18808): 上传状态回调:TransferState.WAITING I/imsdk (18808): TIM: |-longconnection.cpp:304 OnRecvSSOPingRequest |command:SSO.HelloPush|seq:2684354560 I/QCloudHttp(18808): attempts = 1, weight = 0, reliable = 4, addition = 3 I/QCloudHttp(18808): Request{method=POST, url=https://vod-131789.cos.ap-singapore.myqcloud.com/vod/20230518/98710ba9ba36920361816d5a6b66bff7/98710ba9ba36920361816d5a6b66bff7.mp4?uploads, tags={class java.lang.Object=HttpTask-CosXml-15}} ends for null, code is 403 I/QCloudHttp(18808): <-- 403 Forbidden https://vod-131****789.cos.ap-singapore.myqcloud.com/vod/20230518/98710ba9ba36920361816d5a6b66bff7/98710ba9ba36920361816d5a6b66bff7.mp4?uploads (1149ms) I/QCloudHttp(18808): Content-Type: application/xml I/QCloudHttp(18808): Content-Length: 535 I/QCloudHttp(18808): Connection: keep-alive I/QCloudHttp(18808): Date: Thu, 18 May 2023 05:27:35 GMT I/QCloudHttp(18808): Server: tencent-cos I/QCloudHttp(18808): x-cos-request-id: NjQ2NWI3NDdfZWU4YzdjMWVfMTFlY2VfMzFlMmU5MTk= I/QCloudHttp(18808): x-cos-trace-id: OGVmYzZiMmQzYjA2OWNhODk0NTRkMTBiOWVmMDAxODc0OWRkZjk0ZDM1NmI1M2E2MTRlY2MzZDhmNmI5MWI1OTQyYWVlY2QwZTk2MDVmZDQ3MmI2Y2I4ZmI5ZmM4ODFjM2NjYTQwYmE0ZDFhOThhMDFlYTNiMTVjOWRkYjZjNTg= I/QCloudHttp(18808): <-- END HTTP I/QCloudHttp(18808): Http Metrics: I/QCloudHttp(18808): domain : vod-131****789.cos.ap-singapore.myqcloud.com I/QCloudHttp(18808): retryCount : 0 I/QCloudHttp(18808): isClockSkewedRetry : false I/QCloudHttp(18808): dns : 43.128.240.62 I/QCloudHttp(18808): fullTaskTookTime : 1.154720312 I/QCloudHttp(18808): calculateMD5STookTime : 0.0 I/QCloudHttp(18808): signRequestTookTime : 0.002033333 I/QCloudHttp(18808): dnsStartTimestamp : 1684387654114 I/QCloudHttp(18808): dnsLookupTookTime : 0.008140885 I/QCloudHttp(18808): connectStartTimestamp : 1684387654123 I/QCloudHttp(18808): connectTookTime : 0.891116093 I/QCloudHttp(18808): secureConnectStartTimestamp : 1684387654326 I/QCloudHttp(18808): secureConnectTookTime : 0.68800651 I/QCloudHttp(18808): writeRequestHeaderStartTimestamp : 1684387655014 I/QCloudHttp(18808): writeRequestHeaderTookTime : 1.78282E-4 I/QCloudHttp(18808): writeRequestBodyStartTimestamp : 1684387655014 I/QCloudHttp(18808): writeRequestBodyTookTime : 4.6198E-5 I/QCloudHttp(18808): readResponseHeaderStartTimestamp : 1684387655015 I/QCloudHttp(18808): readResponseHeaderTookTime : 0.242214895 I/QCloudHttp(18808): readResponseBodyStartTimestamp : 1684387655257readResponseBodyTookTime : 2.83854E-4 W/beacon-thread-3(18808): type=1400 audit(0.0:215737): avc: denied { read } for name="type" dev="sysfs" ino=39772 scontext=u:r:untrusted_app:s0:c127,c258,c512,c768 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 I/flutter (18808): 上传失败了... I/flutter (18808): serviceException - 403 - Access Denied.
是临时秘钥权限问题
我有两个存储桶: 1:img-nota-club-131789 2: vod-131789
第一次往 img-nota-club-131789 这个存储桶上传图片,能上传成功; 第二次往 vod-131789 这个存储桶上传视频,上传失败了。 只在安卓设备上会上传失败,在iOS系统的设备上是没问题的。
报错日志如下: I/flutter (18808):![截屏2023-05-18 14 23 34](https://github.com/TencentCloud/cos-sdk-flutter-plugin/assets/16080084/b6ef0cf0-e560-4248-8515-305c9a0ef23c)
~~~~~~ 开始上传到腾讯云存储服务器 ~~~~~~I/flutter (18808): _bucket = vod-131789 I/flutter (18808): cosPath = /vod/20230518/98710ba9ba36920361816d5a6b66bff7/98710ba9ba36920361816d5a6b66bff7.mp4 I/flutter (18808): pickFilePath = /data/user/0/club.nota/cache/pm_359051_QQ视频_98710ba9ba36920361816d5a6b66bff71684062884.mp4 I/flutter (18808): uploadId = null I/flutter (18808):~~~~~~ ^^^^^^^^^^^^^^^^^^^^^ ~~~~~~I/QCloudHttp(18808): --> POST https://vod-131789.cos.ap-singapore.myqcloud.com/vod/20230518/98710ba9ba36920361816d5a6b66bff7/98710ba9ba36920361816d5a6b66bff7.mp4?uploads http/1.1 I/QCloudHttp(18808): Content-Length: 0 I/QCloudHttp(18808): User-Agent: cos-android-sdk-5.9.9-FlutterPlugin I/QCloudHttp(18808): Host: vod-131789.cos.ap-singapore.myqcloud.com I/QCloudHttp(18808): Authorization: q-sign-algorithm=sha1&q-ak=AKIDDvrj89ePwfPh5vatb_QJOJUYrPDVQmmxnopG1q-mG2lk9niBxvdhY9LTxQOzO1Dp&q-sign-time=1684385172;1684392372&q-key-time=1684385172;1684392372&q-header-list=content-length;host&q-url-param-list=uploads&q-signature=79b6c9ac540072baf488b9f95a31e19534fe0266 I/QCloudHttp(18808): x-cos-security-token: 4EupIJxBoDvsOai4W0Ze7gpc44IlpUHa24066a2cff0e47a3de2cd21e167962f4ICh8ZHFToVNCqFPQ1L9fmsm981xOBDPmRQsVdXu3XR805BU0LfUj7JReWpzF1PAxgV3sYWuebpiivLsNiDENA-MHYNfnpxTJHfn7AXa5VL4U7gFEzbyIVlIrnzu3FuHq6EQ76Gya-KX7Iu-1HqYzr8sjdw-Ss2n3EDcj8QOWwRI7fN7YCCjB3HDKB6jbeMFM2DLX2UysPEjwT1nlRouewkBT50QsCZE80M4Q2VFG1L0jb4_X_n4GSREW1zvFg2sMfKNCe2-1Xx76F9mhmPPGzqpXw_8QciGT0PJIazmsUcRAGzMzghuIv4dMZIY6QcddXi92QuDfrzopY57mzrEXEZXDpU0M-66DKJaQ09k9-cklZnRan4gWxKWNX8Ox-MRUzpL6oIKyJuCmcHfrl2EP4jC3pIceaHoaknlfJGM5LEN_sJqoaB6dQ1qN0xT3ah4txh5rrjjXwiX-gilVjHz3j-hteETZBHm3DZLecVlZvGrnz7MdPs7zjH1GElBQh3jm-c24So1Dtlkz1u__6Kn2LJoy9_bxgtVO52X93rf4hXI-BG2QHefhd3WkMc6I7OIniqOabZg1nUjJ4OtyKDxGiA I/QCloudHttp(18808): --> END POST I/QCloudHttp(18808): Request{method=POST, url=https://vod-131789.cos.ap-singapore.myqcloud.com/vod/20230518/98710ba9ba36920361816d5a6b66bff7/98710ba9ba36920361816d5a6b66bff7.mp4?uploads, tags={class java.lang.Object=HttpTask-CosXml-15}} start to execute, attempts is 0 I/QCloudHttp(18808): Request{method=POST, url=https://vod-131****789.cos.ap-singapore.myqcloud.com/vod/20230518/98710ba9ba36920361816d5a6b66bff7/98710ba9ba36920361816d5a6b66bff7.mp4?uploads, tags={class java.lang.Object=HttpTask-CosXml-15}} begin to execute I/QCloudHttp(18808): dns: vod-131789.cos.ap-singapore.myqcloud.com:{43.128.240.62,43.128.240.35,} I/flutter (18808): 上传状态回调:TransferState.WAITING I/imsdk (18808): TIM: |-longconnection.cpp:304 OnRecvSSOPingRequest |command:SSO.HelloPush|seq:2684354560 I/QCloudHttp(18808): attempts = 1, weight = 0, reliable = 4, addition = 3 I/QCloudHttp(18808): Request{method=POST, url=https://vod-131789.cos.ap-singapore.myqcloud.com/vod/20230518/98710ba9ba36920361816d5a6b66bff7/98710ba9ba36920361816d5a6b66bff7.mp4?uploads, tags={class java.lang.Object=HttpTask-CosXml-15}} ends for null, code is 403 I/QCloudHttp(18808): <-- 403 Forbidden https://vod-131****789.cos.ap-singapore.myqcloud.com/vod/20230518/98710ba9ba36920361816d5a6b66bff7/98710ba9ba36920361816d5a6b66bff7.mp4?uploads (1149ms) I/QCloudHttp(18808): Content-Type: application/xml I/QCloudHttp(18808): Content-Length: 535 I/QCloudHttp(18808): Connection: keep-alive I/QCloudHttp(18808): Date: Thu, 18 May 2023 05:27:35 GMT I/QCloudHttp(18808): Server: tencent-cos I/QCloudHttp(18808): x-cos-request-id: NjQ2NWI3NDdfZWU4YzdjMWVfMTFlY2VfMzFlMmU5MTk= I/QCloudHttp(18808): x-cos-trace-id: OGVmYzZiMmQzYjA2OWNhODk0NTRkMTBiOWVmMDAxODc0OWRkZjk0ZDM1NmI1M2E2MTRlY2MzZDhmNmI5MWI1OTQyYWVlY2QwZTk2MDVmZDQ3MmI2Y2I4ZmI5ZmM4ODFjM2NjYTQwYmE0ZDFhOThhMDFlYTNiMTVjOWRkYjZjNTg= I/QCloudHttp(18808): <-- END HTTP I/QCloudHttp(18808): Http Metrics: I/QCloudHttp(18808): domain : vod-131****789.cos.ap-singapore.myqcloud.com I/QCloudHttp(18808): retryCount : 0 I/QCloudHttp(18808): isClockSkewedRetry : false I/QCloudHttp(18808): dns : 43.128.240.62 I/QCloudHttp(18808): fullTaskTookTime : 1.154720312 I/QCloudHttp(18808): calculateMD5STookTime : 0.0 I/QCloudHttp(18808): signRequestTookTime : 0.002033333 I/QCloudHttp(18808): dnsStartTimestamp : 1684387654114 I/QCloudHttp(18808): dnsLookupTookTime : 0.008140885 I/QCloudHttp(18808): connectStartTimestamp : 1684387654123 I/QCloudHttp(18808): connectTookTime : 0.891116093 I/QCloudHttp(18808): secureConnectStartTimestamp : 1684387654326 I/QCloudHttp(18808): secureConnectTookTime : 0.68800651 I/QCloudHttp(18808): writeRequestHeaderStartTimestamp : 1684387655014 I/QCloudHttp(18808): writeRequestHeaderTookTime : 1.78282E-4 I/QCloudHttp(18808): writeRequestBodyStartTimestamp : 1684387655014 I/QCloudHttp(18808): writeRequestBodyTookTime : 4.6198E-5 I/QCloudHttp(18808): readResponseHeaderStartTimestamp : 1684387655015 I/QCloudHttp(18808): readResponseHeaderTookTime : 0.242214895 I/QCloudHttp(18808): readResponseBodyStartTimestamp : 1684387655257readResponseBodyTookTime : 2.83854E-4 W/beacon-thread-3(18808): type=1400 audit(0.0:215737): avc: denied { read } for name="type" dev="sysfs" ino=39772 scontext=u:r:untrusted_app:s0:c127,c258,c512,c768 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 I/flutter (18808): 上传失败了... I/flutter (18808): serviceException - 403 - Access Denied.