aliyun / aliyun-oss-ios-sdk

iOS SDK for aliyun object storage service
Other
466 stars 319 forks source link

OSSUtil 大量用户崩溃 急 急! #261

Closed xuwenxindeai closed 3 years ago

xuwenxindeai commented 3 years ago
0 libcorecrypto.dylib _AccelerateCrypto_SHA1_compress + 464
1 libcorecrypto.dylib ccdigest_update + 272
2 libcorecrypto.dylib cchmac_init + 76
3 libcorecrypto.dylib cchmac + 120
4 ArtVideoWBTeacher +[OSSUtil calBase64Sha1WithData:withSecret:] (OSSUtil.m:34)
5 ArtVideoWBTeacher +[OSSUtil sign:withToken:] (OSSUtil.m:0)
6 ArtVideoWBTeacher -[OSSSignerInterceptor interceptRequestMessage:] (OSSModel.m:0)
7 ArtVideoWBTeacher __38-[OSSNetworking dataTaskWithDelegate:]_block_invoke (OSSNetworking.m:0)
8 ArtVideoWBTeacher __63-[OSSTask continueWithExecutor:successBlock:cancellationToken:]_block_invoke (OSSTask.m:474)
9 ArtVideoWBTeacher __56-[OSSTask continueWithExecutor:block:cancellationToken:]_block_invoke (OSSTask.m:0)
10 Foundation _NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK + 16
11 Foundation -[NSBlockOperation main] + 84
12 Foundation _NSOPERATION_IS_INVOKING_MAIN + 20
13 Foundation -[NSOperation start] + 740
14 Foundation _NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION + 20
15 Foundation ___NSOQSchedule_f + 180
16 libdispatch.dylib __dispatch_block_async_invoke2 + 104
17 libdispatch.dylib __dispatch_client_callout + 16
18 libdispatch.dylib __dispatch_continuation_pop$VARIANT$mp + 412
19 libdispatch.dylib __dispatch_async_redirect_invoke + 656
20 libdispatch.dylib __dispatch_root_queue_drain + 376
21 libdispatch.dylib __dispatch_worker_thread2 + 124
22 libsystem_pthread.dylib _pthread_wqthread + 212

应用版本

2.8.2(28201)

使用时长

52 分 48 秒

设备机型

iPad 10.2-Inch,7nd generation 系统版本

13.6.1 (17G80)

CPU架构

arm64-v8a

可用内存大小 | 290.23 MB ( 9.68% ) | 可用存储空间 | 71.67 GB ( 60.12% )

线上用户出现,一直复现不了。SDK 2.10.8 版本

xuwenxindeai commented 3 years ago

应用版本

2.8.2(28201)

使用时长

52 分 48 秒

设备机型

iPad 10.2-Inch,7nd generation 系统版本

13.6.1 (17G80)

CPU架构

arm64-v8a

xuwenxindeai commented 3 years ago

线上用户出现,一直复现不了。SDK 2.10.8 版本

xuwenxindeai commented 3 years ago

image

wushuai1415 commented 3 years ago

你是用哪种CredentialProvider初始化client的

xuwenxindeai commented 3 years ago

`id credential = [[OSSFederationCredentialProvider alloc] initWithFederationTokenGetter:^OSSFederationToken { NSString stsUrl = [NSString stringWithFormat:@"%@/api/oss/sts",[ArtAliOSSConfig shared].ossModel.sBaseURL]; NSURL url = [NSURL URLWithString:stsUrl]; NSMutableURLRequest request = [NSMutableURLRequest requestWithURL:url]; request.HTTPMethod = @"post"; OSSTaskCompletionSource tcs = [OSSTaskCompletionSource taskCompletionSource]; NSURLSession session = [NSURLSession sharedSession]; NSURLSessionTask sessionTask = [session dataTaskWithRequest:request completionHandler:^(NSData data, NSURLResponse response, NSError error) { if (error) { [tcs setError:error]; return; } [tcs setResult:data]; }]; [sessionTask resume]; [tcs.task waitUntilFinished]; if (tcs.task.error) { NSLog(@"get token error: %@", tcs.task.error); return nil; } else { NSDictionary object = [NSJSONSerialization JSONObjectWithData:tcs.task.result options:kNilOptions error:nil]; NSDictionary param = [object objectForKey:@"data"]; OSSFederationToken * token = [OSSFederationToken new]; token.tAccessKey = [param objectForKey:@"accessKeyId"]; token.tSecretKey = [param objectForKey:@"accessKeySecret"]; token.tToken = [param objectForKey:@"securityToken"]; token.expirationTimeInGMTFormat = [param objectForKey:@"expiration"]; NSLog(@"get token: %@", token); return token; } }];

OSSClientConfiguration * conf = [OSSClientConfiguration new];
conf.maxRetryCount = MAXRETRYCOUNT;
conf.timeoutIntervalForRequest = TIMEOUTINTERVALFORREQUEST;
conf.timeoutIntervalForResource = TIMEOUTINTERVALFORRESOURCE;

_client = [[OSSClient alloc] initWithEndpoint:[ArtAliOSSConfig shared].ossModel.endPoint credentialProvider:credential clientConfiguration:conf];`

你是用哪种CredentialProvider初始化client的

xuwenxindeai commented 3 years ago

tSecretKey 异常导致