Closed anjiuzhe closed 1 year ago
上传对象报错,请求头本地时间获取不正确。 版本: com.huaweicloud:esdk-obs-android:3.21.4 日志: 2022-02-12 17:37:03.415 11635-12220/com.zx.box W/System.err: com.obs.services.exception.ObsException: Error message:Request Error.OBS servcie Error Message. -- ResponseCode: 403, ResponseStatus: Forbidden, XML Error Message: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>RequestTimeTooSkewedThe difference between the request time and the current time is too large.0000017EE824A5666407C4CE27B8F3943akWNnC/60hMoENBbJT2cZUYoRQrKXYhGmZliBpZZn5VlBfGjJj4BuRxrLizmpZ9900000Sat, 12 Feb 2022 09:37:03 GMT2022-02-11T09:37:02.823Z 2022-02-12 17:37:03.416 11635-12220/com.zx.box W/System.err: at com.obs.services.internal.utils.ServiceUtils.changeFromServiceException(ServiceUtils.java:610) 2022-02-12 17:37:03.416 11635-12220/com.zx.box W/System.err: at com.obs.services.AbstractClient.doActionWithResult(AbstractClient.java:398) 2022-02-12 17:37:03.416 11635-12220/com.zx.box W/System.err: at com.obs.services.AbstractMultipartObjectClient.initiateMultipartUpload(AbstractMultipartObjectClient.java:52) 2022-02-12 17:37:03.416 11635-12220/com.zx.box W/System.err: at com.obs.services.internal.UploadResumableClient.prepare(UploadResumableClient.java:369) 2022-02-12 17:37:03.416 11635-12220/com.zx.box W/System.err: at com.obs.services.internal.UploadResumableClient.prepareWithCheckpoint(UploadResumableClient.java:182) 2022-02-12 17:37:03.417 11635-12220/com.zx.box W/System.err: at com.obs.services.internal.UploadResumableClient.uploadFileCheckPoint(UploadResumableClient.java:104) 2022-02-12 17:37:03.417 11635-12220/com.zx.box W/System.err: at com.obs.services.internal.UploadResumableClient.uploadFileResume(UploadResumableClient.java:73) 2022-02-12 17:37:03.417 11635-12220/com.zx.box W/System.err: at com.obs.services.AbstractFileClient.uploadFile(AbstractFileClient.java:62) 2022-02-12 17:37:03.417 11635-12220/com.zx.box W/System.err: at com.zx.box.vm.util.OBSUploadKit$upload$1.invokeSuspend(OBSUploadKit.kt:607) 2022-02-12 17:37:03.417 11635-12220/com.zx.box W/System.err: at com.zx.box.vm.util.OBSUploadKit$upload$1.invoke(Unknown Source:8) 2022-02-12 17:37:03.417 11635-12220/com.zx.box W/System.err: at com.zx.box.vm.util.OBSUploadKit$upload$1.invoke(Unknown Source:4) 2022-02-12 17:37:03.417 11635-12220/com.zx.box W/System.err: at com.zx.box.base.ext.AnyExtKt$scope$1.invokeSuspend(AnyExt.kt:19) 2022-02-12 17:37:03.418 11635-12220/com.zx.box W/System.err: at com.zx.box.base.ext.AnyExtKt$scope$1.invoke(Unknown Source:11) 2022-02-12 17:37:03.418 11635-12220/com.zx.box W/System.err: at com.zx.box.base.ext.AnyExtKt$scope$1.invoke(Unknown Source:6) 2022-02-12 17:37:03.418 11635-12220/com.zx.box W/System.err: at com.zx.box.base.utils.ScopeUtil$launch$1.invokeSuspend(ScopeUtil.kt:37) 2022-02-12 17:37:03.418 11635-12220/com.zx.box W/System.err: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) 2022-02-12 17:37:03.418 11635-12220/com.zx.box W/System.err: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) 2022-02-12 17:37:03.418 11635-12220/com.zx.box W/System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) 2022-02-12 17:37:03.419 11635-12220/com.zx.box W/System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738) 2022-02-12 17:37:03.419 11635-12220/com.zx.box W/System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) 2022-02-12 17:37:03.419 11635-12220/com.zx.box W/System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
RequestTimeTooSkewed
出于安全考虑,计算签名时候会用到签名时间,如果差异大就好不匹配,把本地时间设置为正确时间即可
上传对象报错,请求头本地时间获取不正确。 版本: com.huaweicloud:esdk-obs-android:3.21.4 日志: 2022-02-12 17:37:03.415 11635-12220/com.zx.box W/System.err: com.obs.services.exception.ObsException: Error message:Request Error.OBS servcie Error Message. -- ResponseCode: 403, ResponseStatus: Forbidden, XML Error Message: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>The difference between the request time and the current time is too large. 0000017EE824A5666407C4CE27B8F394 3akWNnC/60hMoENBbJT2cZUYoRQrKXYhGmZliBpZZn5VlBfGjJj4BuRxrLizmpZ9 900000 Sat, 12 Feb 2022 09:37:03 GMT 2022-02-11T09:37:02.823Z
2022-02-12 17:37:03.416 11635-12220/com.zx.box W/System.err: at com.obs.services.internal.utils.ServiceUtils.changeFromServiceException(ServiceUtils.java:610)
2022-02-12 17:37:03.416 11635-12220/com.zx.box W/System.err: at com.obs.services.AbstractClient.doActionWithResult(AbstractClient.java:398)
2022-02-12 17:37:03.416 11635-12220/com.zx.box W/System.err: at com.obs.services.AbstractMultipartObjectClient.initiateMultipartUpload(AbstractMultipartObjectClient.java:52)
2022-02-12 17:37:03.416 11635-12220/com.zx.box W/System.err: at com.obs.services.internal.UploadResumableClient.prepare(UploadResumableClient.java:369)
2022-02-12 17:37:03.416 11635-12220/com.zx.box W/System.err: at com.obs.services.internal.UploadResumableClient.prepareWithCheckpoint(UploadResumableClient.java:182)
2022-02-12 17:37:03.417 11635-12220/com.zx.box W/System.err: at com.obs.services.internal.UploadResumableClient.uploadFileCheckPoint(UploadResumableClient.java:104)
2022-02-12 17:37:03.417 11635-12220/com.zx.box W/System.err: at com.obs.services.internal.UploadResumableClient.uploadFileResume(UploadResumableClient.java:73)
2022-02-12 17:37:03.417 11635-12220/com.zx.box W/System.err: at com.obs.services.AbstractFileClient.uploadFile(AbstractFileClient.java:62)
2022-02-12 17:37:03.417 11635-12220/com.zx.box W/System.err: at com.zx.box.vm.util.OBSUploadKit$upload$1.invokeSuspend(OBSUploadKit.kt:607)
2022-02-12 17:37:03.417 11635-12220/com.zx.box W/System.err: at com.zx.box.vm.util.OBSUploadKit$upload$1.invoke(Unknown Source:8)
2022-02-12 17:37:03.417 11635-12220/com.zx.box W/System.err: at com.zx.box.vm.util.OBSUploadKit$upload$1.invoke(Unknown Source:4)
2022-02-12 17:37:03.417 11635-12220/com.zx.box W/System.err: at com.zx.box.base.ext.AnyExtKt$scope$1.invokeSuspend(AnyExt.kt:19)
2022-02-12 17:37:03.418 11635-12220/com.zx.box W/System.err: at com.zx.box.base.ext.AnyExtKt$scope$1.invoke(Unknown Source:11)
2022-02-12 17:37:03.418 11635-12220/com.zx.box W/System.err: at com.zx.box.base.ext.AnyExtKt$scope$1.invoke(Unknown Source:6)
2022-02-12 17:37:03.418 11635-12220/com.zx.box W/System.err: at com.zx.box.base.utils.ScopeUtil$launch$1.invokeSuspend(ScopeUtil.kt:37)
2022-02-12 17:37:03.418 11635-12220/com.zx.box W/System.err: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2022-02-12 17:37:03.418 11635-12220/com.zx.box W/System.err: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
2022-02-12 17:37:03.418 11635-12220/com.zx.box W/System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
2022-02-12 17:37:03.419 11635-12220/com.zx.box W/System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
2022-02-12 17:37:03.419 11635-12220/com.zx.box W/System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
2022-02-12 17:37:03.419 11635-12220/com.zx.box W/System.err: at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
RequestTimeTooSkewed